Skip to content

Commit

Permalink
pushd: Use _cd completion for CDPATH support, closes #38
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed May 11, 2016
1 parent 864cb34 commit e35c504
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions bash_completion
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ shopt -s extglob progcomp
# A lot of the following one-liners were taken directly from the
# completion examples provided with the bash 2.04 source distribution

# Make directory commands see only directories
complete -d pushd

# start of section containing compspecs that can be handled within bash

# user commands see only users
Expand Down Expand Up @@ -1680,9 +1677,9 @@ _cd()
return 0
}
if shopt -q cdable_vars; then
complete -v -F _cd -o nospace cd
complete -v -F _cd -o nospace cd pushd
else
complete -F _cd -o nospace cd
complete -F _cd -o nospace cd pushd
fi

# a wrapper method for the next one, when the offset is unknown
Expand Down

0 comments on commit e35c504

Please sign in to comment.