zsh:opts: Revert disabling CDABLE_VARS
This reverts commit a205a7c5ce ("zsh:opts: Disable CDABLE_VARS").
The main reason why the option annoyed me was primarily because I had
stupid named dirs to begin with. Remove children of HOME, since I get
there fast anyways.
This commit is contained in:
@@ -8,6 +8,12 @@
|
|||||||
# NOTE: Only copies first line. If there are multiple lines (as with
|
# NOTE: Only copies first line. If there are multiple lines (as with
|
||||||
# SHARE_HISTORY) the other lines have to be copied manually.
|
# SHARE_HISTORY) the other lines have to be copied manually.
|
||||||
|
|
||||||
|
# Changing Directories #########################################################
|
||||||
|
# Make cd push the old directory onto the directory stack.
|
||||||
|
setopt AUTO_PUSHD
|
||||||
|
|
||||||
|
# If the argument to a cd command (or an implied cd with the AUTO_CD option
|
||||||
|
# set) is not a directory, and does not begin with a slash, try to expand
|
||||||
# the expression as if it were preceded by a `~' (see the section `Filename
|
# the expression as if it were preceded by a `~' (see the section `Filename
|
||||||
# Expansion').
|
# Expansion').
|
||||||
setopt CDABLE_VARS
|
setopt CDABLE_VARS
|
||||||
|
|||||||
@@ -2,24 +2,23 @@
|
|||||||
## Created: 2021-07-21
|
## Created: 2021-07-21
|
||||||
|
|
||||||
# Children of HOME
|
# Children of HOME
|
||||||
for dir in "$HOME"/[^.]*(/); do
|
# for dir in "$HOME"/[^.]*(/); do
|
||||||
[[ ! ${dir:t} =~ " " ]] || continue
|
# [[ ! ${dir:t} =~ " " ]] || continue
|
||||||
hash -d -- ${dir:t}="$dir"
|
# hash -d -- ${dir:t}="$dir"
|
||||||
done
|
# done
|
||||||
|
|
||||||
# Children of documents
|
# Children of documents
|
||||||
hash="$(xdg-user-dir DOCUMENTS 2>/dev/null || echo docs)"
|
docs="$(xdg-user-dir DOCUMENTS 2>/dev/null)"
|
||||||
hash="$(basename "$hash")"
|
if [[ -e $docs ]]; then
|
||||||
if (( $+nameddirs[$hash] )); then
|
hash -d cheat="$docs"/cheat_sheets
|
||||||
hash -d cheat=~$hash/cheat_sheets
|
hash -d uni="$docs"/uni
|
||||||
hash -d uni=~$hash/uni
|
hash -d work="$docs"/work
|
||||||
hash -d work=~$hash/work
|
|
||||||
fi
|
fi
|
||||||
unset hash
|
unset hash
|
||||||
|
|
||||||
# Dotfiles
|
# Dotfiles
|
||||||
if (( $+nameddirs[projs] )); then
|
if [[ -e ~/projs ]]; then
|
||||||
hash -d dot{,s}=~projs/dotfiles
|
hash -d dot{,s}=~/projs/dotfiles
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Most recent semester folder
|
# Most recent semester folder
|
||||||
|
|||||||
Reference in New Issue
Block a user