Skip to content

Commit

Permalink
Completion response not required anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
nickl- committed Dec 25, 2012
1 parent 538a468 commit 5ec10de
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions aero/argument.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,32 +232,6 @@ def _print_message(self, message, file=None):
file.write(message)


class CompletionResponse(argparse.Action):

def __call__(self, parser, namespace, values, option_string=None):
completion_script = {
'bash': """
_aero_completion()
{
COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \\
COMP_CWORD=$COMP_CWORD \\
AERO_AUTO_COMPLETE=1 $1 ) )
}
complete -o default -F _aero_completion aero
""", 'zsh': """
function _aero_completion {
local words cword
read -Ac words
read -cn cword
reply=( $( COMP_WORDS="$words[*]" \\
COMP_CWORD=$(( cword-1 )) \\
AERO_AUTO_COMPLETE=1 $words[1] ) )
}
compctl -K _aero_completion aero
"""}
print completion_script[values]
parser.exit()


from argparse import _SubParsersAction

Expand Down

0 comments on commit 5ec10de

Please sign in to comment.