Created
January 23, 2017 18:12
-
-
Save kodelint/229ecd71eb419ae4096372ddc53640d8 to your computer and use it in GitHub Desktop.
Fish Dir path toggle function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fish_user_key_bindings | |
bind ' ' __toggle_dir_length # toggle PWD on NORMAL mode | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function __toggle_dir_length -d "Toggle Directory length in prompt" | |
set -q fish_prompt_pwd_dir_length; or set -l fish_prompt_pwd_dir_length 0 | |
if [ $fish_prompt_pwd_dir_length -eq 0 ] | |
set -U fish_prompt_pwd_dir_length 1 | |
else | |
set -U fish_prompt_pwd_dir_length 0 | |
end | |
commandline -f repaint | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment