zsh:nameddirs: Only set ws/ss when they exist
This commit is contained in:
@@ -27,8 +27,15 @@ if (( $+nameddirs[uni] )); then
|
|||||||
# numeric order (most recent semester). The echo is necessary as else
|
# numeric order (most recent semester). The echo is necessary as else
|
||||||
# filename generation will include the wise= and nothing is matched.
|
# filename generation will include the wise= and nothing is matched.
|
||||||
# TODO!
|
# TODO!
|
||||||
hash -d sose="$(echo ~uni/[0-9][0-9]ss(NnOn[1]))"
|
dir="$(echo ~uni/[0-9][0-9]ss(NnOn[1]))"
|
||||||
hash -d wise="$(echo ~uni/[0-9][0-9]ws(NnOn[1]))"
|
if [[ $dir ]]; then
|
||||||
|
hash -d sose="$dir"
|
||||||
hash -d ss="$nameddirs[sose]"
|
hash -d ss="$nameddirs[sose]"
|
||||||
|
fi
|
||||||
|
dir="$(echo ~uni/[0-9][0-9]ws(NnOn[1]))"
|
||||||
|
if [[ $dir ]]; then
|
||||||
|
hash -d wise="$dir"
|
||||||
hash -d ws="$nameddirs[wise]"
|
hash -d ws="$nameddirs[wise]"
|
||||||
|
fi
|
||||||
|
unset dir
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user