# ABSTRACT: tracker bash autocomplete # PODNAME: tracker_bash_autocomplete _tracker() { local cur prev opts base COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" # The basic options we'll complete. opts=`tracker commands --autocomplete` # # Complete the arguments to some of the basic commands. # case "${prev}" in # rt) # local ticket="TODO" # COMPREPLY=( $(compgen -W "${ticket}" -- ${cur}) ) # return 0 # ;; # tag) # local tag="TODO" # COMPREPLY=( $(compgen -W "${tag}" -- ${cur}) ) # return 0 # ;; # esac COMPREPLY=($(compgen -W "${opts}" -- ${cur})) return 0 } complete -F _tracker tracker __END__ =pod =encoding UTF-8 =head1 NAME tracker_bash_autocomplete - tracker bash autocomplete =head1 VERSION version 3.010 =head1 AUTHOR Thomas Klausner =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2011 - 2021 by Thomas Klausner. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut