fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
a53db7256
master
1# localization: skip(private) 2function __fish_move_last -d"Move the last element of a directory history from src to dest" 3set -l src$argv [ 1 ] 4set -l dest$argv [ 2 ] 5 6set -l size_src( count $$src ) 7 8if test $size_src = 0 9# Cannot make this step 10# Print a bel, which is the character to print for notifications like these. 11printf \a 12return 1 13end 14 15# Append current dir to the end of the destination 16set -g( echo $dest ) $$dest $PWD 17 18set -l ssrc$$src 19 20# Change dir to the last entry in the source dir-hist 21builtin cd$ssrc [ $size_src ] 22 23# Keep all but the last from the source dir-hist 24set -e( echo $src ) \[ $size_src ] 25 26# All ok, return success 27return 0 28end