Closed vermarine closed 2 years ago
This is an interesting idea, I'll think about it. 👌
@vermarine Question. Should it display also ~
when you are in your home directory?
Rather than introducing a new variable I went with a more economical alternative which works as follows:
~/C/@/hydro main ❱ set fish_prompt_pwd_dir_length 0 hydro main ❱ .. @jorgebucaran ❱ .. Code ❱ .. ~ ❱ .. Users ❱ .. / ❱
I like my prompt to be as short as possible so I've added an option to remove the trailing directories from the prompt to leave only the topmost (current) directory. This means that if you are in
/home/user/projects/foo/bar
it would only displaybar
. Since this would prevent the user to know when they are located in/
I've added a check for this so that it displays/
when at the root of the filesystem. This feature is turned off by default but can be enabled by settinghydro_pwd_currentdir_only
totrue