Last active
August 23, 2018 03:25
-
-
Save c02y/97b6e32ecb520093abee810d8cad71c7 to your computer and use it in GitHub Desktop.
tweak config.fish
This file contains 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
in `function d` | |
change(type character/number without pressing Enter) | |
read -l -p 'echo "Goto: "' choice | |
to | |
read -n 1 -l -p 'echo "Goto: "' choice | |
change(echo path without /home/users) | |
if string match -q -r '^\d+$' $choice | |
if test $choice -ge 1 -a $choice -le $dirc | |
cd $uniq_dirs[$choice] | |
echo cd $uniq_dirs[$choice] | |
to | |
if string match -q -r '^\d+$' $choice | |
if test $choice -ge 1 -a $choice -le $dirc | |
cd $uniq_dirs[$choice] | |
set -l dir_short (string match -r "$HOME(/.*|\$)" "$uniq_dirs[$choice]") | |
set -l cd_dir "~$dir_short[2]" | |
echo cd $cd_dir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment