From 0d448ecce7b8091e08c514e7e8b3e8fc7d9dd335 Mon Sep 17 00:00:00 2001 From: Joohwan Oh Date: Tue, 21 Jun 2016 00:34:09 -0400 Subject: [PATCH] Remove the old -p from autocomplete shell functions --- dtags/shells/bash.py | 21 ++++----------------- dtags/shells/zsh.py | 5 ----- dtags/version.py | 2 +- 3 files changed, 5 insertions(+), 23 deletions(-) diff --git a/dtags/shells/bash.py b/dtags/shells/bash.py index e23c78e..bcf179b 100644 --- a/dtags/shells/bash.py +++ b/dtags/shells/bash.py @@ -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 }} diff --git a/dtags/shells/zsh.py b/dtags/shells/zsh.py index 1268add..31a36cf 100644 --- a/dtags/shells/zsh.py +++ b/dtags/shells/zsh.py @@ -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 -/ diff --git a/dtags/version.py b/dtags/version.py index 3819552..26f5151 100644 --- a/dtags/version.py +++ b/dtags/version.py @@ -1 +1 @@ -VERSION = '3.1.1' +VERSION = '3.1.2'