summaryrefslogtreecommitdiffstats
path: root/completions/isort
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:18 +0000
commitf2621414ee5f2f601424c22f00e207903e3b6104 (patch)
tree56a856dafd1ca684bb23263cacaa723ee4f404fc /completions/isort
parentAdding debian version 1:2.11-8. (diff)
downloadbash-completion-f2621414ee5f2f601424c22f00e207903e3b6104.tar.xz
bash-completion-f2621414ee5f2f601424c22f00e207903e3b6104.zip
Merging upstream version 1:2.12.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'completions/isort')
-rw-r--r--completions/isort22
1 files changed, 12 insertions, 10 deletions
diff --git a/completions/isort b/completions/isort
index 2a84e25..a5c6dff 100644
--- a/completions/isort
+++ b/completions/isort
@@ -1,9 +1,9 @@
# isort completion -*- shell-script -*-
-_isort()
+_comp_cmd_isort()
{
- local cur prev words cword
- _init_completion || return
+ local cur prev words cword comp_args
+ _comp_initialize -- "$@" || return
case $prev in
--help | --add-import | --builtin | --future | --from-first | -ff | \
@@ -15,27 +15,29 @@ _isort()
return
;;
--jobs | -j)
- COMPREPLY=($(compgen -W "{1..$(_ncpus)}" -- "$cur"))
+ local REPLY
+ _comp_get_ncpus
+ _comp_compgen -- -W "{1..$REPLY}"
return
;;
--multi-line | -m)
- COMPREPLY=($(compgen -W '{0..5}' -- "$cur"))
+ _comp_compgen -- -W '{0..5}'
return
;;
--section-default | -sd)
- COMPREPLY=($(compgen -W 'FUTURE STDLIB THIRDPARTY FIRSTPARTY
- LOCALFOLDER' -- "$cur"))
+ _comp_compgen -- -W 'FUTURE STDLIB THIRDPARTY FIRSTPARTY
+ LOCALFOLDER'
return
;;
esac
if [[ $cur == -* ]]; then
- COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
+ _comp_compgen_help
return
fi
- _filedir '@(py|pyi)'
+ _comp_compgen_filedir '@(py|pyi)'
} &&
- complete -F _isort isort
+ complete -F _comp_cmd_isort isort
# ex: filetype=sh