Fix alias overlap of fasd, pywal
sd was both set by fasd and pywal. Fixed fasd to not alias anything to sd, so my personal alias takes precedence.
This commit is contained in:
parent
5c433ca99e
commit
381031749e
1 changed files with 16 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# more usage instructions at https://github.com/clvv/fasd
|
# more usage instructions at https://github.com/clvv/fasd
|
||||||
eval "$(fasd --init zsh-hook zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcomp-install)"
|
eval "$(fasd --init posix-hook posix_alias bash-hook zsh-hook zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcomp-install)"
|
||||||
|
# eval "$(fasd --init auto)"
|
||||||
|
|
||||||
alias a='fasd -a' # any
|
alias a='fasd -a' # any
|
||||||
alias s='fasd -si' # show / search / select
|
alias s='fasd -si' # show / search / select
|
||||||
|
@ -10,3 +11,17 @@ alias s='fasd -si' # show / search / select
|
||||||
# alias sf='fasd -sif' # interactive file selection
|
# alias sf='fasd -sif' # interactive file selection
|
||||||
alias z='fasd_cd -d' # cd, same functionality as j in autojump
|
alias z='fasd_cd -d' # cd, same functionality as j in autojump
|
||||||
alias zz='fasd_cd -d -i' # cd with interactive selection
|
alias zz='fasd_cd -d -i' # cd with interactive selection
|
||||||
|
|
||||||
|
# from: https://github.com/clvv/fasd/issues/10
|
||||||
|
# since I can only load auto configuration and have default fasd_cd AND useless aliases
|
||||||
|
# or manually load the modules and NOT have fasd_cd
|
||||||
|
# it's easier to use this function
|
||||||
|
fasd_cd() {
|
||||||
|
fasd_ret="$(fasd -d "$@")"
|
||||||
|
if [ -d "$fasd_ret" ]; then
|
||||||
|
cd "$fasd_ret" || exit
|
||||||
|
else
|
||||||
|
print "$fasd_ret"
|
||||||
|
fi
|
||||||
|
unset fasd_ret
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue