mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Bash completion
- Added hostname completion for merge, push and pull
This commit is contained in:
parent
68d5e3f296
commit
adc7992608
1 changed files with 15 additions and 1 deletions
|
@ -120,7 +120,21 @@ _task()
|
|||
*)
|
||||
case "${prev}" in
|
||||
merge)
|
||||
COMPREPLY=( $(compgen -o "default" -- ${cur}) )
|
||||
local servers=$(_task_get_config | grep merge | grep uri | sed 's/^merge\.\(.*\)\.uri/\1/')
|
||||
COMPREPLY=( $(compgen -W "${servers}" -- ${cur}) )
|
||||
_known_hosts_real -a "$cur"
|
||||
return 0
|
||||
;;
|
||||
push)
|
||||
local servers=$(_task_get_config | grep push | grep uri | sed 's/^push\.\(.*\)\.uri/\1/')
|
||||
COMPREPLY=( $(compgen -W "${servers}" -- ${cur}) )
|
||||
_known_hosts_real -a "$cur"
|
||||
return 0
|
||||
;;
|
||||
pull)
|
||||
local servers=$(_task_get_config | grep pull | grep uri | sed 's/^pull\.\(.*\)\.uri/\1/')
|
||||
COMPREPLY=( $(compgen -W "${servers}" -- ${cur}) )
|
||||
_known_hosts_real -a "$cur"
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue