task: Ensure compdef options only get set in zsh
This commit is contained in:
parent
ededd904b4
commit
21844e3a30
1 changed files with 5 additions and 3 deletions
|
|
@ -14,7 +14,9 @@ t() {
|
||||||
# copy the `task` zsh completions over to my little alias 😉
|
# copy the `task` zsh completions over to my little alias 😉
|
||||||
# FIXME: this is not very pretty and not super portable (needs ps) but
|
# FIXME: this is not very pretty and not super portable (needs ps) but
|
||||||
# works for now. from here: https://unix.stackexchange.com/a/72564/414758
|
# works for now. from here: https://unix.stackexchange.com/a/72564/414758
|
||||||
if exist task && [ "$(ps -p $$ -o comm --no-headers)" = "zsh" ]; then compdef t=task; fi
|
if echo "$SHELL" | grep -q zsh; then
|
||||||
|
if exist task && [ "$(ps -p $$ -o comm --no-headers)" = "zsh" ]; then compdef t=task; fi
|
||||||
|
fi
|
||||||
|
|
||||||
alias ta="task add"
|
alias ta="task add"
|
||||||
alias tal="task log"
|
alias tal="task log"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue