summaryrefslogtreecommitdiffstats
path: root/completions/_svn
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:19 +0000
commit6c09f2a45c5541e9c207d14fc7aa21a4a0066bde (patch)
tree0221189d367bf661f6f9493c4f17a03f0dd4b7d2 /completions/_svn
parentReleasing progress-linux version 1:2.11-8~progress7.99u1. (diff)
downloadbash-completion-6c09f2a45c5541e9c207d14fc7aa21a4a0066bde.tar.xz
bash-completion-6c09f2a45c5541e9c207d14fc7aa21a4a0066bde.zip
Merging upstream version 1:2.12.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'completions/_svn')
-rw-r--r--completions/_svn27
1 files changed, 13 insertions, 14 deletions
diff --git a/completions/_svn b/completions/_svn
index 5d85c2b..862b62c 100644
--- a/completions/_svn
+++ b/completions/_svn
@@ -3,10 +3,10 @@
# Use of this file is deprecated. Upstream completion is available in
# subversion >= 0.12.0, use that instead.
-_svn()
+_comp_cmd_svn()
{
- local cur prev words cword
- _init_completion || return
+ local cur prev words cword comp_args
+ _comp_initialize -- "$@" || return
local commands
commands='add blame praise annotate ann cat checkout co cleanup commit \
@@ -18,28 +18,27 @@ _svn()
if ((cword == 1)); then
if [[ $cur == -* ]]; then
- COMPREPLY=($(compgen -W '--version' -- "$cur"))
+ _comp_compgen -- -W '--version'
else
- COMPREPLY=($(compgen -W "$commands" -- "$cur"))
+ _comp_compgen -- -W "$commands"
fi
else
case $prev in
--config-dir)
- _filedir -d
+ _comp_compgen_filedir -d
return
;;
-F | --file | --targets)
- _filedir
+ _comp_compgen_filedir
return
;;
--encoding)
- _xfunc iconv _iconv_charsets
+ _comp_compgen -x iconv charsets
return
;;
--editor-cmd | --diff-cmd | --diff3-cmd)
- compopt -o filenames
- COMPREPLY=($(compgen -c -- "$cur"))
+ _comp_compgen_commands
return
;;
esac
@@ -194,17 +193,17 @@ _svn()
esac
options+=" --help --config-dir"
- COMPREPLY=($(compgen -W "$options" -- "$cur"))
+ _comp_compgen -- -W "$options"
else
if [[ $command == @(help|[h?]) ]]; then
- COMPREPLY=($(compgen -W "$commands" -- "$cur"))
+ _comp_compgen -- -W "$commands"
else
- _filedir
+ _comp_compgen_filedir
fi
fi
fi
} &&
- complete -F _svn svn
+ complete -F _comp_cmd_svn svn
# ex: filetype=sh