Add frequent-directory function
`frequent-directory` exports and environment variable and creates a hash directory with the given argument of the form `<name>=<path>`.
This commit is contained in:
parent
01fcdc1863
commit
a67649e844
7
zshrc
7
zshrc
@ -173,6 +173,10 @@ if [[ ! -z "$cursor_block" && ! -z "$cursor_line" ]]; then
|
||||
zle -N zle-line-finish
|
||||
fi
|
||||
|
||||
# Frequntly used directories
|
||||
function frequent-directory() { export $1; hash -d $1 }
|
||||
frequent-directory Projects="$HOME/Projects"
|
||||
|
||||
# Load work related config
|
||||
[ -f ~/.config/work/zshrc ] && source ~/.config/work/zshrc
|
||||
|
||||
@ -205,6 +209,3 @@ case `uname` in
|
||||
alias debug='lldb --'
|
||||
;;
|
||||
esac
|
||||
|
||||
# Hashed Directories
|
||||
hash -d Projects="$HOME/Projects"
|
||||
|
Loading…
x
Reference in New Issue
Block a user