|
|
|
|
|
by dasl
2571 days ago
|
|
I use zsh, and I have a thing in my profile that skips writing any `cd` command to history. Instead, it will rewrite the command using the absolute path of the directory I `cd`'d into and write that to history. Thus, all of the `cd` commands that get written to my history use absolute paths and are re-usable no matter where I am. It would be cool if this sort of functionality were generalizable to all commands where you type a relative path, not just `cd`. https://github.com/dasl-/settings/blob/3143bbfe23bd75c3e35c7... |
|
This isn't specific to `cd` commands either. It's useful if you are `rsync`ing different directories to different places, or checkout different `git` branches, etc.