1
0
Fork 0
mirror of https://github.com/Findus23/pyLanguagetool.git synced 2024-09-09 04:13:46 +02:00

manually tweak fish completion

This commit is contained in:
Lukas Winkler 2024-07-20 23:03:50 +02:00
parent 3bfbf3093e
commit 7ca4fe2455
Signed by: lukas
GPG key ID: 54DE4D798D244853
2 changed files with 28 additions and 35 deletions

View file

@ -1,39 +1,30 @@
# FISH completion script for pylanguagetool
# Generated by pycomplete 0.4.0
function __fish_pylanguagetool_99ddd2e4751833f8_complete_no_subcommand
for i in (commandline -opc)
if contains -- $i
return 1
end
end
return 0
end
# modified to also add short arguments
# add -s letter for short options
# add -x (--no-files -r) for arguments accepting values
# global options
complete -c pylanguagetool -n '__fish_pylanguagetool_99ddd2e4751833f8_complete_no_subcommand' -l api-url -d 'the URL of the v2 languagetool API, should end with \'/v2/\''
complete -c pylanguagetool -n '__fish_pylanguagetool_99ddd2e4751833f8_complete_no_subcommand' -l clipboard -d 'get text from system clipboard'
complete -c pylanguagetool -n '__fish_pylanguagetool_99ddd2e4751833f8_complete_no_subcommand' -l disabled-categories -d 'IDs of categories to be disabled, comma-separated'
complete -c pylanguagetool -n '__fish_pylanguagetool_99ddd2e4751833f8_complete_no_subcommand' -l disabled-rules -d 'IDs of rules to be disabled, comma-separated'
complete -c pylanguagetool -n '__fish_pylanguagetool_99ddd2e4751833f8_complete_no_subcommand' -l enabled-categories -d 'IDs of categories to be enabled, comma-separated'
complete -c pylanguagetool -n '__fish_pylanguagetool_99ddd2e4751833f8_complete_no_subcommand' -l enabled-only -d 'enable only the rules and categories whose IDs are specified with --enabled-rules or --enabled-categories'
complete -c pylanguagetool -n '__fish_pylanguagetool_99ddd2e4751833f8_complete_no_subcommand' -l enabled-rules -d 'IDs of rules to be enabled, comma-separated'
complete -c pylanguagetool -n '__fish_pylanguagetool_99ddd2e4751833f8_complete_no_subcommand' -l explain-rule -d 'print URLs with more information about rules'
complete -c pylanguagetool -n '__fish_pylanguagetool_99ddd2e4751833f8_complete_no_subcommand' -l help -d 'show this help message and exit'
complete -c pylanguagetool -n '__fish_pylanguagetool_99ddd2e4751833f8_complete_no_subcommand' -l input-type -d 'if not plaintext'
complete -c pylanguagetool -n '__fish_pylanguagetool_99ddd2e4751833f8_complete_no_subcommand' -l lang -d 'A language code like en or en-US, or auto to guess the language automatically (see preferredVariants below). For languages with variants (English, German, Portuguese) spell checking will only be activated when you specify the variant, e.g. en-GB instead of just en.'
complete -c pylanguagetool -n '__fish_pylanguagetool_99ddd2e4751833f8_complete_no_subcommand' -l mother-tongue -d 'A language code of the user\'s native language, enabling false friends checks for some language pairs.'
complete -c pylanguagetool -n '__fish_pylanguagetool_99ddd2e4751833f8_complete_no_subcommand' -l no-color -d 'don\'t color output'
complete -c pylanguagetool -n '__fish_pylanguagetool_99ddd2e4751833f8_complete_no_subcommand' -l personal-word-list -d 'File name of personal dictionary. A private dictionary can be used to add special words that would otherwise be marked as spelling errors.'
complete -c pylanguagetool -n '__fish_pylanguagetool_99ddd2e4751833f8_complete_no_subcommand' -l picky -d 'if enabled, additional rules will be activated'
complete -c pylanguagetool -n '__fish_pylanguagetool_99ddd2e4751833f8_complete_no_subcommand' -l preferred-variants -d 'Comma-separated list of preferred language variants. The language detector used with language=auto can detect e.g. English, but it cannot decide whether British English or American English is used. Thus this parameter can be used to specify the preferred variants like en-GB and de-AT. Only available with language=auto.'
complete -c pylanguagetool -n '__fish_pylanguagetool_99ddd2e4751833f8_complete_no_subcommand' -l rule-categories -d 'show the the categories of the matching rules'
complete -c pylanguagetool -n '__fish_pylanguagetool_99ddd2e4751833f8_complete_no_subcommand' -l rules -d 'show the matching rules'
complete -c pylanguagetool -n '__fish_pylanguagetool_99ddd2e4751833f8_complete_no_subcommand' -l single-line -d 'check every line on its own'
complete -c pylanguagetool -n '__fish_pylanguagetool_99ddd2e4751833f8_complete_no_subcommand' -l verbose -d 'verbose output'
complete -c pylanguagetool -n '__fish_pylanguagetool_99ddd2e4751833f8_complete_no_subcommand' -l version -d 'print version and exit'
# commands
test
complete -c pylanguagetool -f
complete -c pylanguagetool -x -s a -l api-url -d 'the URL of the v2 languagetool API, should end with \'/v2/\''
complete -c pylanguagetool -s c -l clipboard -d 'get text from system clipboard'
complete -c pylanguagetool -x -l disabled-categories -d 'IDs of categories to be disabled, comma-separated'
complete -c pylanguagetool -x -s d -l disabled-rules -d 'IDs of rules to be disabled, comma-separated'
complete -c pylanguagetool -x -l enabled-categories -d 'IDs of categories to be enabled, comma-separated'
complete -c pylanguagetool -x -l enabled-only -d 'enable only the rules and categories whose IDs are specified with --enabled-rules or --enabled-categories'
complete -c pylanguagetool -x -s e -l enabled-rules -d 'IDs of rules to be enabled, comma-separated'
complete -c pylanguagetool -s u -l explain-rule -d 'print URLs with more information about rules'
complete -c pylanguagetool -l help -d 'show this help message and exit'
complete -c pylanguagetool -x -s t -l input-type -d 'if not plaintext' -a "txt html md markdown rst ipynb json xliff"
complete -c pylanguagetool -x -s l -l lang -d 'A language code like en or en-US, or auto to guess the language automatically (see preferredVariants below). For languages with variants (English, German, Portuguese) spell checking will only be activated when you specify the variant, e.g. en-GB instead of just en.'
complete -c pylanguagetool -x -s m -l mother-tongue -d 'A language code of the user\'s native language, enabling false friends checks for some language pairs.'
complete -c pylanguagetool -l no-color -d 'don\'t color output'
complete -c pylanguagetool -x -l pwl -l personal-word-list -d 'File name of personal dictionary. A private dictionary can be used to add special words that would otherwise be marked as spelling errors.'
complete -c pylanguagetool -l picky -d 'if enabled, additional rules will be activated'
complete -c pylanguagetool -x -s p -l preferred-variants -d 'Comma-separated list of preferred language variants. The language detector used with language=auto can detect e.g. English, but it cannot decide whether British English or American English is used. Thus this parameter can be used to specify the preferred variants like en-GB and de-AT. Only available with language=auto.'
complete -c pylanguagetool -x -l rule-categories -d 'show the the categories of the matching rules'
complete -c pylanguagetool -s r -l rules -d 'show the matching rules'
complete -c pylanguagetool -s s -l single-line -d 'check every line on its own'
complete -c pylanguagetool -s v -l verbose -d 'verbose output'
complete -c pylanguagetool -s V -l version -d 'print version and exit'
complete -c pylanguagetool -k -x -a '(__fish_complete_suffix .txt .md .markdown .rst .ipynb .html )'

View file

@ -45,3 +45,5 @@ optional = ["beautifulsoup4", "markdown2", "docutils"]
[project.scripts]
pylanguagetool = "pylanguagetool.cli:main"
[tool.setuptools]
py-modules = ["pylanguagetool"]