Skip to content

Commit

Permalink
redirect to dev/null a bit more POSIXly
Browse files Browse the repository at this point in the history
  • Loading branch information
rupa committed Jul 7, 2013
1 parent a3f3874 commit 6de4108
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions z.sh
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ alias ${_Z_CMD:-z}='_z 2>&1'

[ "$_Z_NO_RESOLVE_SYMLINKS" ] || _Z_RESOLVE_SYMLINKS="-P"

if compctl &> /dev/null; then
if compctl >/dev/null 2>&1; then
# zsh
[ "$_Z_NO_PROMPT_COMMAND" ] || {
# populate directory list, avoid clobbering any other precmds.
Expand All @@ -227,7 +227,7 @@ if compctl &> /dev/null; then
reply=(${(f)"$(_z --complete "$compl")"})
}
compctl -U -K _z_zsh_tab_completion _z
elif complete &> /dev/null; then
elif complete >/dev/null 2>&1; then
# bash
# tab completion
complete -o filenames -C '_z --complete "$COMP_LINE"' ${_Z_CMD:-z}
Expand Down

0 comments on commit 6de4108

Please sign in to comment.