Skip to content

Commit

Permalink
Remove the old -p from autocomplete shell functions
Browse files Browse the repository at this point in the history
  • Loading branch information
joowani committed Jun 21, 2016
1 parent 0612282 commit 0d448ec
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 23 deletions.
21 changes: 4 additions & 17 deletions dtags/shells/bash.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,30 +153,17 @@
_e() {{
declare cur=${{COMP_WORDS[COMP_CWORD]}}
if [[ ${{COMP_CWORD}} -eq 1 ]]
if [[ ${{COMP_CWORD}} -eq 1 ]] && [[ -f "{tags_file}" ]]
then
if [[ -f "{tags_file}" ]]
then
COMPREPLY+=($(compgen -W "`cat {tags_file}`" -- $cur))
fi
COMPREPLY+=($(compgen -W "-p" -- $cur))
elif [[ ${{COMP_CWORD}} -eq 2 && ${{COMP_WORDS[1]}} = -p ]]
then
if [[ -f "{tags_file}" ]]
then
COMPREPLY+=($(compgen -W "`cat {tags_file}`" -- $cur))
fi
COMPREPLY+=($(compgen -W "`cat {tags_file}`" -- $cur))
fi
}}
_d() {{
declare cur=${{COMP_WORDS[COMP_CWORD]}}
if [[ ${{COMP_CWORD}} -eq 1 ]]
if [[ ${{COMP_CWORD}} -eq 1 ]] && [[ -f "{tags_file}" ]]
then
if [[ -f "{tags_file}" ]]
then
COMPREPLY+=($(compgen -W "`cat {tags_file}`" -- $cur))
fi
COMPREPLY+=($(compgen -W "`cat {tags_file}`" -- $cur))
fi
}}
Expand Down
5 changes: 0 additions & 5 deletions dtags/shells/zsh.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,6 @@
_e() {{
if [[ CURRENT -eq 2 ]]
then
[[ -f "{tags_file}" ]] && compadd `cat {tags_file}`
compadd -- -p
_files -/
elif [[ CURRENT -eq 3 && $words[2] = -p ]]
then
[[ -f "{tags_file}" ]] && compadd `cat {tags_file}`
_files -/
Expand Down
2 changes: 1 addition & 1 deletion dtags/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = '3.1.1'
VERSION = '3.1.2'

0 comments on commit 0d448ec

Please sign in to comment.