From 68c3c7573bfcd088f610f8b60a093d4123ee3da7 Mon Sep 17 00:00:00 2001 From: Andrew Paseltiner Date: Mon, 24 Jun 2024 09:16:02 -0400 Subject: [PATCH] Add missing shell completions --- se/completions/bash/se | 10 +++++++++- se/completions/fish/se.fish | 2 ++ se/completions/zsh/_se | 9 +++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/se/completions/bash/se b/se/completions/bash/se index 7ab9ce42..728df688 100644 --- a/se/completions/bash/se +++ b/se/completions/bash/se @@ -2,7 +2,7 @@ _se(){ COMPREPLY=() local cur="${COMP_WORDS[COMP_CWORD]}" local prev="${COMP_WORDS[COMP_CWORD-1]}" - local commands="--help --plain --version british2american build build-ids build-images build-manifest build-spine build-title build-toc clean compare-versions create-draft dec2roman extract-ebook find-mismatched-dashes find-mismatched-diacritics find-unusual-characters help hyphenate interactive-replace lint make-url-safe modernize-spelling prepare-release recompose-epub renumber-endnotes roman2dec semanticate shift-endnotes shift-illustrations split-file titlecase typogrify unicode-names version word-count xpath" + local commands="--help --plain --version british2american build build-ids build-images build-manifest build-spine build-title build-toc clean compare-versions create-draft css-select dec2roman extract-ebook find-mismatched-dashes find-mismatched-diacritics find-unusual-characters help hyphenate interactive-replace lint make-url-safe modernize-spelling prepare-release recompose-epub renumber-endnotes roman2dec semanticate shift-endnotes shift-illustrations split-file titlecase typogrify unicode-names version word-count xpath" if [[ $COMP_CWORD -gt 1 ]]; then case "${COMP_WORDS[1]}" in british2american) @@ -135,6 +135,14 @@ _se(){ COMPREPLY+=($(compgen -d -X ".*" -- "${cur}")) COMPREPLY+=($(compgen -f -X "!*.xhtml" -- "${cur}")) ;; + shift-endnotes) + COMPREPLY+=($(compgen -W "-a --amount -d --decrement -h --help -i --increment" -- "${cur}")) + COMPREPLY+=($(compgen -d -X ".*" -- "${cur}")) + ;; + shift-illustrations) + COMPREPLY+=($(compgen -W "-a --amount -d --decrement -h --help -i --increment" -- "${cur}")) + COMPREPLY+=($(compgen -d -X ".*" -- "${cur}")) + ;; split-file) COMPREPLY+=($(compgen -W "-f --filename-format= -h --help -s --start-at= -t --template-file=" -- "${cur}")) COMPREPLY+=($(compgen -f -X "!*.htm" -- "${cur}")) diff --git a/se/completions/fish/se.fish b/se/completions/fish/se.fish index 4de794bd..b0c2a11e 100644 --- a/se/completions/fish/se.fish +++ b/se/completions/fish/se.fish @@ -151,11 +151,13 @@ complete -c se -A -n "__fish_seen_subcommand_from semanticate" -s h -l help -x - complete -c se -A -n "__fish_seen_subcommand_from semanticate" -s v -l verbose -d "increase output verbosity" complete -c se -n "__fish_se_no_subcommand" -a shift-endnotes -d "Increment the specified endnote and all following endnotes by 1 or a specified amount." +complete -c se -A -n "__fish_seen_subcommand_from shift-endnotes" -s a -l amount -d "the amount to increment or decrement by; defaults to 1" complete -c se -A -n "__fish_seen_subcommand_from shift-endnotes" -s d -l decrement -d "decrement the target endnote number and all following endnotes" complete -c se -A -n "__fish_seen_subcommand_from shift-endnotes" -s h -l help -x -d "show this help message and exit" complete -c se -A -n "__fish_seen_subcommand_from shift-endnotes" -s i -l increment -d "increment the target endnote number and all following endnotes" complete -c se -n "__fish_se_no_subcommand" -a shift-illustrations -d "Increment the specified illustration and all following illustrations by 1 or a specified amount." +complete -c se -A -n "__fish_seen_subcommand_from shift-illustrations" -s a -l amount -d "the amount to increment or decrement by; defaults to 1" complete -c se -A -n "__fish_seen_subcommand_from shift-illustrations" -s d -l decrement -d "decrement the target illustration number and all following illustrations" complete -c se -A -n "__fish_seen_subcommand_from shift-illustrations" -s h -l help -x -d "show this help message and exit" complete -c se -A -n "__fish_seen_subcommand_from shift-illustrations" -s i -l increment -d "increment the target illustration number and all following illustrations" diff --git a/se/completions/zsh/_se b/se/completions/zsh/_se index 3b014115..59f9533c 100644 --- a/se/completions/zsh/_se +++ b/se/completions/zsh/_se @@ -243,11 +243,20 @@ case $state in ;; shift-endnotes) _arguments -s \ + {-a,--amount}'[the amount to increment or decrement by; defaults to 1]' \ {-d,--decrement}'[decrement the target endnote number and all following endnotes]' \ {-h,--help}'[show a help message and exit]' \ {-i,--increment}'[increment the target endnote number and all following endnotes]' \ '*: :_directories' ;; + shift-illustrations) + _arguments -s \ + {-a,--amount}'[the amount to increment or decrement by; defaults to 1]' \ + {-d,--decrement}'[decrement the target illustration number and all following illustrations]' \ + {-h,--help}'[show a help message and exit]' \ + {-i,--increment}'[increment the target illustration number and all following illustrations]' \ + '*: :_directories' + ;; split-file) _arguments -s \ {-f,--filename-format}'[a format string for the output files; `%n` is replaced with the current chapter number; defaults to `chapter-%n.xhtml`]' \