summaryrefslogtreecommitdiff
path: root/completions/bts
diff options
context:
space:
mode:
Diffstat (limited to 'completions/bts')
-rw-r--r--completions/bts52
1 files changed, 26 insertions, 26 deletions
diff --git a/completions/bts b/completions/bts
index ba33fd66..c87b51e1 100644
--- a/completions/bts
+++ b/completions/bts
@@ -3,14 +3,14 @@
# List bug numbers from bugs cache in ~/.devscripts_cache/bts
_cached_bugs() {
[[ -d $HOME/.devscripts_cache/bts ]] && \
- find $HOME/.devscripts_cache/bts -maxdepth 1 -name "$cur[0-9]*.html" \
+ find $HOME/.devscripts_cache/bts -maxdepth 1 -name "${cur}[0-9]*.html" \
-printf "%f\n" | cut -d'.' -f1
}
# List APT source packages prefixed with "src:"
_src_packages_with_prefix() {
ppn=${cur:4} # partial package name, after stripping "src:"
- compgen -P "src:" -W '$( _xfunc apt-cache _apt_cache_sources "$ppn" )' \
+ compgen -P "src:" -W '$(_xfunc apt-cache _apt_cache_sources "$ppn")' \
-- "$ppn"
}
@@ -22,58 +22,58 @@ _bts()
case $prev in
show|bugs)
- COMPREPLY=( $( compgen -W 'release-critical RC from: tag:
- usertag:' -- "$cur" ) $( _cached_bugs )
- $( _src_packages_with_prefix ) )
+ COMPREPLY=( $(compgen -W 'release-critical RC from: tag:
+ usertag:' -- "$cur") $(_cached_bugs)
+ $(_src_packages_with_prefix) )
return
;;
select)
- COMPREPLY=( $( compgen -W 'package: source: maintainer: submitter:
+ COMPREPLY=( $(compgen -W 'package: source: maintainer: submitter:
severity: status: tag: owner: correspondent: affects: bugs:
- users: archive:' -- "$cur" ) )
+ users: archive:' -- "$cur") )
return
;;
status)
- COMPREPLY=( $( compgen -W 'file: fields: verbose' -- "$cur" )
- $( _cached_bugs ) )
+ COMPREPLY=( $(compgen -W 'file: fields: verbose' -- "$cur")
+ $(_cached_bugs) )
return
;;
block|unblock)
- COMPREPLY=( $( compgen -W 'by with' -- "$cur" ) )
+ COMPREPLY=( $(compgen -W 'by with' -- "$cur") )
return
;;
severity)
- COMPREPLY=( $( compgen -W 'wishlist minor normal important serious
- grave critical' -- "$cur" ) )
+ COMPREPLY=( $(compgen -W 'wishlist minor normal important serious
+ grave critical' -- "$cur") )
return
;;
limit)
- COMPREPLY=( $( compgen -W 'submitter date subject msgid package
- source tag severity owner affects archive' -- "$cur" ) )
+ COMPREPLY=( $(compgen -W 'submitter date subject msgid package
+ source tag severity owner affects archive' -- "$cur") )
return
;;
- clone|done|reopen|archive|unarchive|retitle|summary|submitter|found\
+ clone|"done"|reopen|archive|unarchive|retitle|summary|submitter|found\
|notfound|fixed|notfixed|merge|forcemerge|unmerge|claim|unclaim\
|forwarded|notforwarded|owner|noowner|subscribe|unsubscribe\
|reportspam|spamreport|affects|usertag|usertags|reassign|tag\
|tags)
- COMPREPLY=( $( _cached_bugs ) )
+ COMPREPLY=( $(_cached_bugs) )
return
;;
package)
- COMPREPLY=( $( _xfunc apt-cache _apt_cache_packages ) )
+ COMPREPLY=( $(_xfunc apt-cache _apt_cache_packages) )
return
;;
cache)
- COMPREPLY=( $( _xfunc apt-cache _apt_cache_packages )
- $( _src_packages_with_prefix )
- $( compgen -W 'from: release-critical RC' -- "$cur" ) )
+ COMPREPLY=( $(_xfunc apt-cache _apt_cache_packages)
+ $(_src_packages_with_prefix)
+ $(compgen -W 'from: release-critical RC' -- "$cur") )
return
;;
cleancache)
- COMPREPLY=( $( _xfunc apt-cache _apt_cache_packages )
- $( _src_packages_with_prefix )
- $( compgen -W 'from: tag: usertag: ALL' -- "$cur" ) )
+ COMPREPLY=( $(_xfunc apt-cache _apt_cache_packages)
+ $(_src_packages_with_prefix)
+ $(compgen -W 'from: tag: usertag: ALL' -- "$cur") )
return
;;
user)
@@ -86,7 +86,7 @@ _bts()
# COMP_WORDS would be: "bts cleancache src : <partial_pkg_name>"
pos=$((COMP_CWORD - 2))
if [[ $pos -gt 0 && "${COMP_WORDS[$pos]}" == "src" ]]; then
- COMPREPLY=( $( _xfunc apt-cache _apt_cache_src_packages ) )
+ COMPREPLY=( $(_xfunc apt-cache _apt_cache_src_packages) )
return
fi
;;
@@ -94,7 +94,7 @@ _bts()
$split && return
- COMPREPLY=( $( compgen -W '--offline --online --no-offline
+ COMPREPLY=( $(compgen -W '--offline --online --no-offline
--no-action --cache --no-cache --cache-mode --cache-delay --mbox
--mailreader --cc-addr --use-default-cc --no-use-default-cc
--sendmail --mutt --no-mutt --smtp-host --smtp-username
@@ -107,7 +107,7 @@ _bts()
merge forcemerge unmerge tag tags affects user usertag usertags claim
unclaim severity forwarded notforwarded package limit owner noowner
subscribe unsubscribe reportspam spamreport cache cleancache version
- help' -- "$cur" ) )
+ help' -- "$cur") )
} &&
complete -F _bts bts