8ba81c71 | savedir() { |
8ef8fa75 | cmd="hash -d \"$1\"=\"$PWD\"" |
8ba81c71 | eval $cmd echo $cmd >> $HOME/.gtaliases } |
fe429cbf | source "$HOME/.gtaliases" |
8ba81c71 | hash -d "desktop=$HOME/Desktop" hash -d "downloads=$HOME/Downloads" hash -d "programming=$HOME/Programming" |
b9bcaac6 | |
fe429cbf | |
b9bcaac6 | git_dir=($HOME/git*_repos) num_git_dirs="$git_dir[(I)$git_dir[-1]]" if (( num_git_dirs > 0 )); then |
fe429cbf | hash -d "g=${${git_dir[1]}%/}" if [[ -d $HOME/dotfiles ]]; then hash -d zsh_conf=$HOME/dotfiles/zsh hash -d dotfiles=$HOME/dotfiles elif [[ -d ~g/dotfiles ]]; then hash -d zsh_conf=~g/dotfiles/zsh hash -d dotfiles=~g/dotfiles fi |
b9bcaac6 | else echo no git directories |
fe429cbf | if [[ -d $HOME/dotfiles ]]; then hash -d zsh_conf=$HOME/dotfiles/zsh hash -d dotfiles=$HOME/dotfiles fi |
b9bcaac6 | fi |
8ba81c71 | gtdo() { cd ~downloads/"${(j</>)*}" } |