@@ -78,20 +78,20 @@ update() {
7878}
7979
8080init_bash () {
81- cat << EOF
81+ cat << " EOF "
8282wt() {
8383 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'
8585 return 1
8686 fi
8787
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}')"
9090
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"
9595 fi
9696
9797 return 0
@@ -100,20 +100,20 @@ EOF
100100}
101101
102102init_fish () {
103- cat << EOF
103+ cat << " EOF "
104104function wt
105105 if ! command -q wt
106- echo " wt was not found in your \\\ $ PATH"
106+ echo ' wt was not found in your $PATH'
107107 return 1
108108 end
109109
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}')"
112112
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"
117117 end
118118end
119119EOF
0 commit comments