File tree Expand file tree Collapse file tree 2 files changed +13
-14
lines changed
Expand file tree Collapse file tree 2 files changed +13
-14
lines changed Original file line number Diff line number Diff line change 1+ function fasd_cd -d ' Function to execute built-in cd'
2+ # if no $argv, identical with `fasd`
3+ if test (count $argv ) -le 1
4+ command fasd " $argv "
5+ else
6+ set -l ret (command fasd -e ' printf %s' $argv )
7+ test -z " $ret " ;
8+ and return
9+ test -d " $ret " ;
10+ and cd " $ret " ;
11+ or printf " %s\n" $ret
12+ end
13+ end
Original file line number Diff line number Diff line change @@ -10,20 +10,6 @@ function init --on-event init_fasd
1010 command fasd --proc (command fasd --sanitize " $argv " ) > " /dev/null" 2>&1
1111 end
1212
13- function fasd_cd -d ' Function to execute built-in cd'
14- # if no $argv, identical with `fasd`
15- if test (count $argv ) -le 1
16- command fasd " $argv "
17- else
18- set -l ret (command fasd -e ' printf %s' $argv )
19- test -z " $ret " ;
20- and return
21- test -d " $ret " ;
22- and cd " $ret " ;
23- or printf " %s\n" $ret
24- end
25- end
26-
2713 alias a=' command fasd -a'
2814 alias s=' command fasd -si'
2915 alias sd=' command fasd -sid'
You can’t perform that action at this time.
0 commit comments