@@ -78,20 +78,20 @@ update() {
78
78
}
79
79
80
80
init_bash () {
81
- cat << EOF
81
+ cat << " EOF "
82
82
wt() {
83
83
if ! command -v wt &> /dev/null; then
84
- echo " wt was not found in your \\\ $ PATH"
84
+ echo ' wt was not found in your $PATH'
85
85
return 1
86
86
fi
87
87
88
- result="\ $ (command wt "\ $ @")"
89
- dest_path="\ $ (echo "\ $ result" | awk '/^$CHANGE_DIRECTORY_PREFIX .*/ {sub("$CHANGE_DIRECTORY_PREFIX ", ""); print; exit}')"
88
+ result="$(command wt "$@")"
89
+ dest_path="$(echo "$result" | awk '/^$CHANGE_DIRECTORY_PREFIX.*/ {sub("$CHANGE_DIRECTORY_PREFIX", ""); print; exit}')"
90
90
91
- if [[ -n "\ $ dest_path" ]]; then
92
- cd "\ $ dest_path" || return
93
- elif [[ -n \ $ result ]]; then
94
- echo "\ $ result"
91
+ if [[ -n "$dest_path" ]]; then
92
+ cd "$dest_path" || return
93
+ elif [[ -n $result ]]; then
94
+ echo "$result"
95
95
fi
96
96
97
97
return 0
@@ -100,20 +100,20 @@ EOF
100
100
}
101
101
102
102
init_fish () {
103
- cat << EOF
103
+ cat << " EOF "
104
104
function wt
105
105
if ! command -q wt
106
- echo " wt was not found in your \\\ $ PATH"
106
+ echo ' wt was not found in your $PATH'
107
107
return 1
108
108
end
109
109
110
- set -l result "\ $ (command wt \ $ argv)"
111
- set -l dest_path "\ $ (echo "\ $ result" | awk '/^$CHANGE_DIRECTORY_PREFIX .*/ {sub("$CHANGE_DIRECTORY_PREFIX ", ""); print; exit}')"
110
+ set -l result "$(command wt $argv)"
111
+ set -l dest_path "$(echo "$result" | awk '/^$CHANGE_DIRECTORY_PREFIX.*/ {sub("$CHANGE_DIRECTORY_PREFIX", ""); print; exit}')"
112
112
113
- if test -n "\ $ dest_path"
114
- cd "\ $ dest_path"
115
- else if test -n "\ $ result"
116
- echo "\ $ result"
113
+ if test -n "$dest_path"
114
+ cd "$dest_path"
115
+ else if test -n "$result"
116
+ echo "$result"
117
117
end
118
118
end
119
119
EOF
0 commit comments