Only show directories in p completion

This commit is contained in:
Kevin Cotugno 2022-12-23 07:15:48 -07:00
parent fbebe5b845
commit ecaddafd78

4
.zshrc
View File

@ -96,11 +96,13 @@ function p {
cd "$DEVPATH/$project" cd "$DEVPATH/$project"
} }
if [[ $(command -v fd) ]]; then
function _p { function _p {
compadd $(ls $DEVPATH) compadd $(fd --max-depth=1 --type=d . $DEVPATH | xargs basename -a)
} }
compdef _p p compdef _p p
fi
alias e='$EDITOR' alias e='$EDITOR'
alias s="du -sh" alias s="du -sh"