fixed to not also include the current directory
parent
c74378632f
commit
8744f6899c
|
|
@ -1,8 +1,6 @@
|
||||||
_pj() {
|
_pj() {
|
||||||
[ -z "$PROJECT_PATHS" ] && return
|
[ -z "$PROJECT_PATHS" ] && return
|
||||||
|
|
||||||
shift
|
shift
|
||||||
|
|
||||||
[ "$1" == "open" ] && shift
|
[ "$1" == "open" ] && shift
|
||||||
|
|
||||||
local cur prev words cword
|
local cur prev words cword
|
||||||
|
|
@ -26,8 +24,6 @@ _pj() {
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
_filedir -d
|
|
||||||
|
|
||||||
if [[ ${#COMPREPLY[@]} -eq 1 ]]; then
|
if [[ ${#COMPREPLY[@]} -eq 1 ]]; then
|
||||||
i=${COMPREPLY[0]}
|
i=${COMPREPLY[0]}
|
||||||
if [[ "$i" == "$cur" && $i != "*/" ]]; then
|
if [[ "$i" == "$cur" && $i != "*/" ]]; then
|
||||||
|
|
@ -37,8 +33,6 @@ _pj() {
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
if shopt -q cdable_vars; then
|
|
||||||
complete -v -F _pj -o nospace pj
|
complete -F _pj -o nospace pj
|
||||||
else
|
|
||||||
complete -F _pj -o nospace pj
|
|
||||||
fi
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue