Skip to content

Commit

Permalink
Add missing shell completions
Browse files Browse the repository at this point in the history
  • Loading branch information
apasel422 authored and acabal committed Jun 24, 2024
1 parent db23ebe commit 634236e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
10 changes: 9 additions & 1 deletion se/completions/bash/se
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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}"))
Expand Down
2 changes: 2 additions & 0 deletions se/completions/fish/se.fish
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 9 additions & 0 deletions se/completions/zsh/_se
Original file line number Diff line number Diff line change
Expand Up @@ -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`]' \
Expand Down

0 comments on commit 634236e

Please sign in to comment.