File tree 1 file changed +6
-9
lines changed
1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -15,19 +15,16 @@ func PrintHook() {
15
15
// important: do not use $status as a variable
16
16
// because it's a readonly reserved special var in ZSH
17
17
fmt .Println (`
18
- alias dir &> /dev/null
19
- if [[ $? -eq 0 ]]; then
20
- unalias dir
21
- fi
18
+ unalias dir >/dev/null 2>&1
22
19
23
20
_DIRP_CD=cd
24
- type pushd &> /dev/null && _DIRP_CD=pushd
21
+ type pushd > /dev/null 2>&1 && _DIRP_CD=pushd
25
22
26
- function dir() {
23
+ dir () {
27
24
stdout=$(dirp $@)
28
25
stat=$?
29
- if [[ -n $stdout ] ]; then
30
- if [[ $stat -eq 2 ] ]; then
26
+ if [ -n $stdout ]; then
27
+ if [ $stat -eq 2 ]; then
31
28
$EDITOR "$stdout"
32
29
return $?
33
30
fi
@@ -37,7 +34,7 @@ function dir() {
37
34
fi
38
35
}
39
36
40
- export -f dir &> /dev/null` )
37
+ export -f dir > /dev/null 2>&1 ` )
41
38
}
42
39
43
40
// PrintFishHook emits shell code for Fish
You can’t perform that action at this time.
0 commit comments