-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better installation of fasd [Close #123]
Now with zsh tab completion for `z` and other fasd commands!
- Loading branch information
Showing
1 changed file
with
14 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
# | ||
# only init if installed. | ||
if [[ -f $HOME/.fasd ]]; then | ||
# Initialize fasd (https://github.com/clvv/fasd) | ||
eval "$(fasd --init posix-alias zsh-hook)" | ||
|
||
# aliases | ||
|
||
# jump to recently used items | ||
alias a='fasd -a' # any | ||
alias s='fasd -s' # show / search / select | ||
alias d='fasd -d' # directory | ||
alias f='fasd -f' # file | ||
alias z='fasd_cd -d' # cd, same functionality as j in autojump | ||
alias v='f -e vim' # quick opening files with vim | ||
fasd_cache="$HOME/.fasd-init-bash" | ||
if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then | ||
eval "$(fasd --init posix-alias zsh-hook zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcomp-install)" >| "$fasd_cache" | ||
fi | ||
source "$fasd_cache" | ||
unset fasd_cache | ||
|
||
|
||
# jump to recently used items | ||
alias a='fasd -a' # any | ||
alias s='fasd -si' # show / search / select | ||
alias d='fasd -d' # directory | ||
alias f='fasd -f' # file | ||
alias z='fasd_cd -d' # cd, same functionality as j in autojump | ||
alias zz='fasd_cd -d -i' # interactive directory jump |