mirror of
https://github.com/kristoferssolo/solorice.git
synced 2026-03-18 08:09:40 +00:00
Update 2026-02-25
This commit is contained in:
235
config/fish/completions/sesh.fish
Normal file
235
config/fish/completions/sesh.fish
Normal file
@@ -0,0 +1,235 @@
|
||||
# fish completion for sesh -*- shell-script -*-
|
||||
|
||||
function __sesh_debug
|
||||
set -l file "$BASH_COMP_DEBUG_FILE"
|
||||
if test -n "$file"
|
||||
echo "$argv" >> $file
|
||||
end
|
||||
end
|
||||
|
||||
function __sesh_perform_completion
|
||||
__sesh_debug "Starting __sesh_perform_completion"
|
||||
|
||||
# Extract all args except the last one
|
||||
set -l args (commandline -opc)
|
||||
# Extract the last arg and escape it in case it is a space
|
||||
set -l lastArg (string escape -- (commandline -ct))
|
||||
|
||||
__sesh_debug "args: $args"
|
||||
__sesh_debug "last arg: $lastArg"
|
||||
|
||||
# Disable ActiveHelp which is not supported for fish shell
|
||||
set -l requestComp "SESH_ACTIVE_HELP=0 $args[1] __complete $args[2..-1] $lastArg"
|
||||
|
||||
__sesh_debug "Calling $requestComp"
|
||||
set -l results (eval $requestComp 2> /dev/null)
|
||||
|
||||
# Some programs may output extra empty lines after the directive.
|
||||
# Let's ignore them or else it will break completion.
|
||||
# Ref: https://github.com/spf13/cobra/issues/1279
|
||||
for line in $results[-1..1]
|
||||
if test (string trim -- $line) = ""
|
||||
# Found an empty line, remove it
|
||||
set results $results[1..-2]
|
||||
else
|
||||
# Found non-empty line, we have our proper output
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
set -l comps $results[1..-2]
|
||||
set -l directiveLine $results[-1]
|
||||
|
||||
# For Fish, when completing a flag with an = (e.g., <program> -n=<TAB>)
|
||||
# completions must be prefixed with the flag
|
||||
set -l flagPrefix (string match -r -- '-.*=' "$lastArg")
|
||||
|
||||
__sesh_debug "Comps: $comps"
|
||||
__sesh_debug "DirectiveLine: $directiveLine"
|
||||
__sesh_debug "flagPrefix: $flagPrefix"
|
||||
|
||||
for comp in $comps
|
||||
printf "%s%s\n" "$flagPrefix" "$comp"
|
||||
end
|
||||
|
||||
printf "%s\n" "$directiveLine"
|
||||
end
|
||||
|
||||
# this function limits calls to __sesh_perform_completion, by caching the result behind $__sesh_perform_completion_once_result
|
||||
function __sesh_perform_completion_once
|
||||
__sesh_debug "Starting __sesh_perform_completion_once"
|
||||
|
||||
if test -n "$__sesh_perform_completion_once_result"
|
||||
__sesh_debug "Seems like a valid result already exists, skipping __sesh_perform_completion"
|
||||
return 0
|
||||
end
|
||||
|
||||
set --global __sesh_perform_completion_once_result (__sesh_perform_completion)
|
||||
if test -z "$__sesh_perform_completion_once_result"
|
||||
__sesh_debug "No completions, probably due to a failure"
|
||||
return 1
|
||||
end
|
||||
|
||||
__sesh_debug "Performed completions and set __sesh_perform_completion_once_result"
|
||||
return 0
|
||||
end
|
||||
|
||||
# this function is used to clear the $__sesh_perform_completion_once_result variable after completions are run
|
||||
function __sesh_clear_perform_completion_once_result
|
||||
__sesh_debug ""
|
||||
__sesh_debug "========= clearing previously set __sesh_perform_completion_once_result variable =========="
|
||||
set --erase __sesh_perform_completion_once_result
|
||||
__sesh_debug "Successfully erased the variable __sesh_perform_completion_once_result"
|
||||
end
|
||||
|
||||
function __sesh_requires_order_preservation
|
||||
__sesh_debug ""
|
||||
__sesh_debug "========= checking if order preservation is required =========="
|
||||
|
||||
__sesh_perform_completion_once
|
||||
if test -z "$__sesh_perform_completion_once_result"
|
||||
__sesh_debug "Error determining if order preservation is required"
|
||||
return 1
|
||||
end
|
||||
|
||||
set -l directive (string sub --start 2 $__sesh_perform_completion_once_result[-1])
|
||||
__sesh_debug "Directive is: $directive"
|
||||
|
||||
set -l shellCompDirectiveKeepOrder 32
|
||||
set -l keeporder (math (math --scale 0 $directive / $shellCompDirectiveKeepOrder) % 2)
|
||||
__sesh_debug "Keeporder is: $keeporder"
|
||||
|
||||
if test $keeporder -ne 0
|
||||
__sesh_debug "This does require order preservation"
|
||||
return 0
|
||||
end
|
||||
|
||||
__sesh_debug "This doesn't require order preservation"
|
||||
return 1
|
||||
end
|
||||
|
||||
|
||||
# This function does two things:
|
||||
# - Obtain the completions and store them in the global __sesh_comp_results
|
||||
# - Return false if file completion should be performed
|
||||
function __sesh_prepare_completions
|
||||
__sesh_debug ""
|
||||
__sesh_debug "========= starting completion logic =========="
|
||||
|
||||
# Start fresh
|
||||
set --erase __sesh_comp_results
|
||||
|
||||
__sesh_perform_completion_once
|
||||
__sesh_debug "Completion results: $__sesh_perform_completion_once_result"
|
||||
|
||||
if test -z "$__sesh_perform_completion_once_result"
|
||||
__sesh_debug "No completion, probably due to a failure"
|
||||
# Might as well do file completion, in case it helps
|
||||
return 1
|
||||
end
|
||||
|
||||
set -l directive (string sub --start 2 $__sesh_perform_completion_once_result[-1])
|
||||
set --global __sesh_comp_results $__sesh_perform_completion_once_result[1..-2]
|
||||
|
||||
__sesh_debug "Completions are: $__sesh_comp_results"
|
||||
__sesh_debug "Directive is: $directive"
|
||||
|
||||
set -l shellCompDirectiveError 1
|
||||
set -l shellCompDirectiveNoSpace 2
|
||||
set -l shellCompDirectiveNoFileComp 4
|
||||
set -l shellCompDirectiveFilterFileExt 8
|
||||
set -l shellCompDirectiveFilterDirs 16
|
||||
|
||||
if test -z "$directive"
|
||||
set directive 0
|
||||
end
|
||||
|
||||
set -l compErr (math (math --scale 0 $directive / $shellCompDirectiveError) % 2)
|
||||
if test $compErr -eq 1
|
||||
__sesh_debug "Received error directive: aborting."
|
||||
# Might as well do file completion, in case it helps
|
||||
return 1
|
||||
end
|
||||
|
||||
set -l filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) % 2)
|
||||
set -l dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) % 2)
|
||||
if test $filefilter -eq 1; or test $dirfilter -eq 1
|
||||
__sesh_debug "File extension filtering or directory filtering not supported"
|
||||
# Do full file completion instead
|
||||
return 1
|
||||
end
|
||||
|
||||
set -l nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) % 2)
|
||||
set -l nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) % 2)
|
||||
|
||||
__sesh_debug "nospace: $nospace, nofiles: $nofiles"
|
||||
|
||||
# If we want to prevent a space, or if file completion is NOT disabled,
|
||||
# we need to count the number of valid completions.
|
||||
# To do so, we will filter on prefix as the completions we have received
|
||||
# may not already be filtered so as to allow fish to match on different
|
||||
# criteria than the prefix.
|
||||
if test $nospace -ne 0; or test $nofiles -eq 0
|
||||
set -l prefix (commandline -t | string escape --style=regex)
|
||||
__sesh_debug "prefix: $prefix"
|
||||
|
||||
set -l completions (string match -r -- "^$prefix.*" $__sesh_comp_results)
|
||||
set --global __sesh_comp_results $completions
|
||||
__sesh_debug "Filtered completions are: $__sesh_comp_results"
|
||||
|
||||
# Important not to quote the variable for count to work
|
||||
set -l numComps (count $__sesh_comp_results)
|
||||
__sesh_debug "numComps: $numComps"
|
||||
|
||||
if test $numComps -eq 1; and test $nospace -ne 0
|
||||
# We must first split on \t to get rid of the descriptions to be
|
||||
# able to check what the actual completion will be.
|
||||
# We don't need descriptions anyway since there is only a single
|
||||
# real completion which the shell will expand immediately.
|
||||
set -l split (string split --max 1 \t $__sesh_comp_results[1])
|
||||
|
||||
# Fish won't add a space if the completion ends with any
|
||||
# of the following characters: @=/:.,
|
||||
set -l lastChar (string sub -s -1 -- $split)
|
||||
if not string match -r -q "[@=/:.,]" -- "$lastChar"
|
||||
# In other cases, to support the "nospace" directive we trick the shell
|
||||
# by outputting an extra, longer completion.
|
||||
__sesh_debug "Adding second completion to perform nospace directive"
|
||||
set --global __sesh_comp_results $split[1] $split[1].
|
||||
__sesh_debug "Completions are now: $__sesh_comp_results"
|
||||
end
|
||||
end
|
||||
|
||||
if test $numComps -eq 0; and test $nofiles -eq 0
|
||||
# To be consistent with bash and zsh, we only trigger file
|
||||
# completion when there are no other completions
|
||||
__sesh_debug "Requesting file completion"
|
||||
return 1
|
||||
end
|
||||
end
|
||||
|
||||
return 0
|
||||
end
|
||||
|
||||
# Since Fish completions are only loaded once the user triggers them, we trigger them ourselves
|
||||
# so we can properly delete any completions provided by another script.
|
||||
# Only do this if the program can be found, or else fish may print some errors; besides,
|
||||
# the existing completions will only be loaded if the program can be found.
|
||||
if type -q "sesh"
|
||||
# The space after the program name is essential to trigger completion for the program
|
||||
# and not completion of the program name itself.
|
||||
# Also, we use '> /dev/null 2>&1' since '&>' is not supported in older versions of fish.
|
||||
complete --do-complete "sesh " > /dev/null 2>&1
|
||||
end
|
||||
|
||||
# Remove any pre-existing completions for the program since we will be handling all of them.
|
||||
complete -c sesh -e
|
||||
|
||||
# this will get called after the two calls below and clear the $__sesh_perform_completion_once_result global
|
||||
complete -c sesh -n '__sesh_clear_perform_completion_once_result'
|
||||
# The call to __sesh_prepare_completions will setup __sesh_comp_results
|
||||
# which provides the program's completion choices.
|
||||
# If this doesn't require order preservation, we don't use the -k flag
|
||||
complete -c sesh -n 'not __sesh_requires_order_preservation && __sesh_prepare_completions' -f -a '$__sesh_comp_results'
|
||||
# otherwise we use the -k flag
|
||||
complete -k -c sesh -n '__sesh_requires_order_preservation && __sesh_prepare_completions' -f -a '$__sesh_comp_results'
|
||||
276
config/fish/completions/typst.fish
Normal file
276
config/fish/completions/typst.fish
Normal file
@@ -0,0 +1,276 @@
|
||||
# Print an optspec for argparse to handle cmd's options that are independent of any subcommand.
|
||||
function __fish_typst_global_optspecs
|
||||
string join \n color= cert= h/help V/version
|
||||
end
|
||||
|
||||
function __fish_typst_needs_command
|
||||
# Figure out if the current invocation already has a command.
|
||||
set -l cmd (commandline -opc)
|
||||
set -e cmd[1]
|
||||
argparse -s (__fish_typst_global_optspecs) -- $cmd 2>/dev/null
|
||||
or return
|
||||
if set -q argv[1]
|
||||
# Also print the command, so this can be used to figure out what it is.
|
||||
echo $argv[1]
|
||||
return 1
|
||||
end
|
||||
return 0
|
||||
end
|
||||
|
||||
function __fish_typst_using_subcommand
|
||||
set -l cmd (__fish_typst_needs_command)
|
||||
test -z "$cmd"
|
||||
and return 1
|
||||
contains -- $cmd[1] $argv
|
||||
end
|
||||
|
||||
complete -c typst -n "__fish_typst_needs_command" -l color -d 'Whether to use color. When set to `auto` if the terminal to supports it' -r -f -a "auto\t''
|
||||
always\t''
|
||||
never\t''"
|
||||
complete -c typst -n "__fish_typst_needs_command" -l cert -d 'Path to a custom CA certificate to use when making network requests' -r -F
|
||||
complete -c typst -n "__fish_typst_needs_command" -s h -l help -d 'Print help'
|
||||
complete -c typst -n "__fish_typst_needs_command" -s V -l version -d 'Print version'
|
||||
complete -c typst -n "__fish_typst_needs_command" -f -a "compile" -d 'Compiles an input file into a supported output format'
|
||||
complete -c typst -n "__fish_typst_needs_command" -f -a "c" -d 'Compiles an input file into a supported output format'
|
||||
complete -c typst -n "__fish_typst_needs_command" -f -a "watch" -d 'Watches an input file and recompiles on changes'
|
||||
complete -c typst -n "__fish_typst_needs_command" -f -a "w" -d 'Watches an input file and recompiles on changes'
|
||||
complete -c typst -n "__fish_typst_needs_command" -f -a "init" -d 'Initializes a new project from a template'
|
||||
complete -c typst -n "__fish_typst_needs_command" -f -a "query" -d 'Processes an input file to extract provided metadata'
|
||||
complete -c typst -n "__fish_typst_needs_command" -f -a "fonts" -d 'Lists all discovered fonts in system and custom font paths'
|
||||
complete -c typst -n "__fish_typst_needs_command" -f -a "update" -d 'Self update the Typst CLI'
|
||||
complete -c typst -n "__fish_typst_needs_command" -f -a "completions" -d 'Generates shell completion scripts'
|
||||
complete -c typst -n "__fish_typst_needs_command" -f -a "info" -d 'Displays debugging information about Typst'
|
||||
complete -c typst -n "__fish_typst_needs_command" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
|
||||
complete -c typst -n "__fish_typst_using_subcommand compile" -s f -l format -d 'The format of the output file, inferred from the extension by default' -r -f -a "pdf\t''
|
||||
png\t''
|
||||
svg\t''
|
||||
html\t''"
|
||||
complete -c typst -n "__fish_typst_using_subcommand compile" -l root -d 'Configures the project root (for absolute paths)' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand compile" -l input -d 'Add a string key-value pair visible through `sys.inputs`' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand compile" -l font-path -d 'Adds additional directories that are recursively searched for fonts' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand compile" -l package-path -d 'Custom path to local packages, defaults to system-dependent location' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand compile" -l package-cache-path -d 'Custom path to package cache, defaults to system-dependent location' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand compile" -l creation-timestamp -d 'The document\'s creation date formatted as a UNIX timestamp' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand compile" -l pages -d 'Which pages to export. When unspecified, all pages are exported' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand compile" -l pdf-standard -d 'One (or multiple comma-separated) PDF standards that Typst will enforce conformance with' -r -f -a "1.4\t'PDF 1.4'
|
||||
1.5\t'PDF 1.5'
|
||||
1.6\t'PDF 1.6'
|
||||
1.7\t'PDF 1.7'
|
||||
2.0\t'PDF 2.0'
|
||||
a-1b\t'PDF/A-1b'
|
||||
a-1a\t'PDF/A-1a'
|
||||
a-2b\t'PDF/A-2b'
|
||||
a-2u\t'PDF/A-2u'
|
||||
a-2a\t'PDF/A-2a'
|
||||
a-3b\t'PDF/A-3b'
|
||||
a-3u\t'PDF/A-3u'
|
||||
a-3a\t'PDF/A-3a'
|
||||
a-4\t'PDF/A-4'
|
||||
a-4f\t'PDF/A-4f'
|
||||
a-4e\t'PDF/A-4e'
|
||||
ua-1\t'PDF/UA-1'"
|
||||
complete -c typst -n "__fish_typst_using_subcommand compile" -l ppi -d 'The PPI (pixels per inch) to use for PNG export' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand compile" -l make-deps -d 'File path to which a Makefile with the current compilation\'s dependencies will be written' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand compile" -l deps -d 'File path to which a list of current compilation\'s dependencies will be written. Use `-` to write to stdout' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand compile" -l deps-format -d 'File format to use for dependencies' -r -f -a "json\t'Encodes as JSON, failing for non-Unicode paths'
|
||||
zero\t'Separates paths with NULL bytes and can express all paths'
|
||||
make\t'Emits in Make format, omitting inexpressible paths'"
|
||||
complete -c typst -n "__fish_typst_using_subcommand compile" -s j -l jobs -d 'Number of parallel jobs spawned during compilation. Defaults to number of CPUs. Setting it to 1 disables parallelism' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand compile" -l features -d 'Enables in-development features that may be changed or removed at any time' -r -f -a "html\t''
|
||||
a11y-extras\t''"
|
||||
complete -c typst -n "__fish_typst_using_subcommand compile" -l diagnostic-format -d 'The format to emit diagnostics in' -r -f -a "human\t''
|
||||
short\t''"
|
||||
complete -c typst -n "__fish_typst_using_subcommand compile" -l open -d 'Opens the output file with the default viewer or a specific program after compilation. Ignored if output is stdout' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand compile" -l timings -d 'Produces performance timings of the compilation process. (experimental)' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand compile" -l ignore-system-fonts -d 'Ensures system fonts won\'t be searched, unless explicitly included via `--font-path`'
|
||||
complete -c typst -n "__fish_typst_using_subcommand compile" -l ignore-embedded-fonts -d 'Ensures fonts embedded into Typst won\'t be considered'
|
||||
complete -c typst -n "__fish_typst_using_subcommand compile" -l no-pdf-tags -d 'By default, even when not producing a `PDF/UA-1` document, a tagged PDF document is written to provide a baseline of accessibility. In some circumstances (for example when trying to reduce the size of a document) it can be desirable to disable tagged PDF'
|
||||
complete -c typst -n "__fish_typst_using_subcommand compile" -s h -l help -d 'Print help (see more with \'--help\')'
|
||||
complete -c typst -n "__fish_typst_using_subcommand c" -s f -l format -d 'The format of the output file, inferred from the extension by default' -r -f -a "pdf\t''
|
||||
png\t''
|
||||
svg\t''
|
||||
html\t''"
|
||||
complete -c typst -n "__fish_typst_using_subcommand c" -l root -d 'Configures the project root (for absolute paths)' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand c" -l input -d 'Add a string key-value pair visible through `sys.inputs`' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand c" -l font-path -d 'Adds additional directories that are recursively searched for fonts' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand c" -l package-path -d 'Custom path to local packages, defaults to system-dependent location' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand c" -l package-cache-path -d 'Custom path to package cache, defaults to system-dependent location' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand c" -l creation-timestamp -d 'The document\'s creation date formatted as a UNIX timestamp' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand c" -l pages -d 'Which pages to export. When unspecified, all pages are exported' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand c" -l pdf-standard -d 'One (or multiple comma-separated) PDF standards that Typst will enforce conformance with' -r -f -a "1.4\t'PDF 1.4'
|
||||
1.5\t'PDF 1.5'
|
||||
1.6\t'PDF 1.6'
|
||||
1.7\t'PDF 1.7'
|
||||
2.0\t'PDF 2.0'
|
||||
a-1b\t'PDF/A-1b'
|
||||
a-1a\t'PDF/A-1a'
|
||||
a-2b\t'PDF/A-2b'
|
||||
a-2u\t'PDF/A-2u'
|
||||
a-2a\t'PDF/A-2a'
|
||||
a-3b\t'PDF/A-3b'
|
||||
a-3u\t'PDF/A-3u'
|
||||
a-3a\t'PDF/A-3a'
|
||||
a-4\t'PDF/A-4'
|
||||
a-4f\t'PDF/A-4f'
|
||||
a-4e\t'PDF/A-4e'
|
||||
ua-1\t'PDF/UA-1'"
|
||||
complete -c typst -n "__fish_typst_using_subcommand c" -l ppi -d 'The PPI (pixels per inch) to use for PNG export' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand c" -l make-deps -d 'File path to which a Makefile with the current compilation\'s dependencies will be written' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand c" -l deps -d 'File path to which a list of current compilation\'s dependencies will be written. Use `-` to write to stdout' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand c" -l deps-format -d 'File format to use for dependencies' -r -f -a "json\t'Encodes as JSON, failing for non-Unicode paths'
|
||||
zero\t'Separates paths with NULL bytes and can express all paths'
|
||||
make\t'Emits in Make format, omitting inexpressible paths'"
|
||||
complete -c typst -n "__fish_typst_using_subcommand c" -s j -l jobs -d 'Number of parallel jobs spawned during compilation. Defaults to number of CPUs. Setting it to 1 disables parallelism' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand c" -l features -d 'Enables in-development features that may be changed or removed at any time' -r -f -a "html\t''
|
||||
a11y-extras\t''"
|
||||
complete -c typst -n "__fish_typst_using_subcommand c" -l diagnostic-format -d 'The format to emit diagnostics in' -r -f -a "human\t''
|
||||
short\t''"
|
||||
complete -c typst -n "__fish_typst_using_subcommand c" -l open -d 'Opens the output file with the default viewer or a specific program after compilation. Ignored if output is stdout' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand c" -l timings -d 'Produces performance timings of the compilation process. (experimental)' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand c" -l ignore-system-fonts -d 'Ensures system fonts won\'t be searched, unless explicitly included via `--font-path`'
|
||||
complete -c typst -n "__fish_typst_using_subcommand c" -l ignore-embedded-fonts -d 'Ensures fonts embedded into Typst won\'t be considered'
|
||||
complete -c typst -n "__fish_typst_using_subcommand c" -l no-pdf-tags -d 'By default, even when not producing a `PDF/UA-1` document, a tagged PDF document is written to provide a baseline of accessibility. In some circumstances (for example when trying to reduce the size of a document) it can be desirable to disable tagged PDF'
|
||||
complete -c typst -n "__fish_typst_using_subcommand c" -s h -l help -d 'Print help (see more with \'--help\')'
|
||||
complete -c typst -n "__fish_typst_using_subcommand watch" -s f -l format -d 'The format of the output file, inferred from the extension by default' -r -f -a "pdf\t''
|
||||
png\t''
|
||||
svg\t''
|
||||
html\t''"
|
||||
complete -c typst -n "__fish_typst_using_subcommand watch" -l root -d 'Configures the project root (for absolute paths)' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand watch" -l input -d 'Add a string key-value pair visible through `sys.inputs`' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand watch" -l font-path -d 'Adds additional directories that are recursively searched for fonts' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand watch" -l package-path -d 'Custom path to local packages, defaults to system-dependent location' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand watch" -l package-cache-path -d 'Custom path to package cache, defaults to system-dependent location' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand watch" -l creation-timestamp -d 'The document\'s creation date formatted as a UNIX timestamp' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand watch" -l pages -d 'Which pages to export. When unspecified, all pages are exported' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand watch" -l pdf-standard -d 'One (or multiple comma-separated) PDF standards that Typst will enforce conformance with' -r -f -a "1.4\t'PDF 1.4'
|
||||
1.5\t'PDF 1.5'
|
||||
1.6\t'PDF 1.6'
|
||||
1.7\t'PDF 1.7'
|
||||
2.0\t'PDF 2.0'
|
||||
a-1b\t'PDF/A-1b'
|
||||
a-1a\t'PDF/A-1a'
|
||||
a-2b\t'PDF/A-2b'
|
||||
a-2u\t'PDF/A-2u'
|
||||
a-2a\t'PDF/A-2a'
|
||||
a-3b\t'PDF/A-3b'
|
||||
a-3u\t'PDF/A-3u'
|
||||
a-3a\t'PDF/A-3a'
|
||||
a-4\t'PDF/A-4'
|
||||
a-4f\t'PDF/A-4f'
|
||||
a-4e\t'PDF/A-4e'
|
||||
ua-1\t'PDF/UA-1'"
|
||||
complete -c typst -n "__fish_typst_using_subcommand watch" -l ppi -d 'The PPI (pixels per inch) to use for PNG export' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand watch" -l make-deps -d 'File path to which a Makefile with the current compilation\'s dependencies will be written' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand watch" -l deps -d 'File path to which a list of current compilation\'s dependencies will be written. Use `-` to write to stdout' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand watch" -l deps-format -d 'File format to use for dependencies' -r -f -a "json\t'Encodes as JSON, failing for non-Unicode paths'
|
||||
zero\t'Separates paths with NULL bytes and can express all paths'
|
||||
make\t'Emits in Make format, omitting inexpressible paths'"
|
||||
complete -c typst -n "__fish_typst_using_subcommand watch" -s j -l jobs -d 'Number of parallel jobs spawned during compilation. Defaults to number of CPUs. Setting it to 1 disables parallelism' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand watch" -l features -d 'Enables in-development features that may be changed or removed at any time' -r -f -a "html\t''
|
||||
a11y-extras\t''"
|
||||
complete -c typst -n "__fish_typst_using_subcommand watch" -l diagnostic-format -d 'The format to emit diagnostics in' -r -f -a "human\t''
|
||||
short\t''"
|
||||
complete -c typst -n "__fish_typst_using_subcommand watch" -l open -d 'Opens the output file with the default viewer or a specific program after compilation. Ignored if output is stdout' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand watch" -l timings -d 'Produces performance timings of the compilation process. (experimental)' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand watch" -l port -d 'The port where HTML is served' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand watch" -l ignore-system-fonts -d 'Ensures system fonts won\'t be searched, unless explicitly included via `--font-path`'
|
||||
complete -c typst -n "__fish_typst_using_subcommand watch" -l ignore-embedded-fonts -d 'Ensures fonts embedded into Typst won\'t be considered'
|
||||
complete -c typst -n "__fish_typst_using_subcommand watch" -l no-pdf-tags -d 'By default, even when not producing a `PDF/UA-1` document, a tagged PDF document is written to provide a baseline of accessibility. In some circumstances (for example when trying to reduce the size of a document) it can be desirable to disable tagged PDF'
|
||||
complete -c typst -n "__fish_typst_using_subcommand watch" -l no-serve -d 'Disables the built-in HTTP server for HTML export'
|
||||
complete -c typst -n "__fish_typst_using_subcommand watch" -l no-reload -d 'Disables the injected live reload script for HTML export. The HTML that is written to disk isn\'t affected either way'
|
||||
complete -c typst -n "__fish_typst_using_subcommand watch" -s h -l help -d 'Print help (see more with \'--help\')'
|
||||
complete -c typst -n "__fish_typst_using_subcommand w" -s f -l format -d 'The format of the output file, inferred from the extension by default' -r -f -a "pdf\t''
|
||||
png\t''
|
||||
svg\t''
|
||||
html\t''"
|
||||
complete -c typst -n "__fish_typst_using_subcommand w" -l root -d 'Configures the project root (for absolute paths)' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand w" -l input -d 'Add a string key-value pair visible through `sys.inputs`' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand w" -l font-path -d 'Adds additional directories that are recursively searched for fonts' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand w" -l package-path -d 'Custom path to local packages, defaults to system-dependent location' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand w" -l package-cache-path -d 'Custom path to package cache, defaults to system-dependent location' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand w" -l creation-timestamp -d 'The document\'s creation date formatted as a UNIX timestamp' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand w" -l pages -d 'Which pages to export. When unspecified, all pages are exported' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand w" -l pdf-standard -d 'One (or multiple comma-separated) PDF standards that Typst will enforce conformance with' -r -f -a "1.4\t'PDF 1.4'
|
||||
1.5\t'PDF 1.5'
|
||||
1.6\t'PDF 1.6'
|
||||
1.7\t'PDF 1.7'
|
||||
2.0\t'PDF 2.0'
|
||||
a-1b\t'PDF/A-1b'
|
||||
a-1a\t'PDF/A-1a'
|
||||
a-2b\t'PDF/A-2b'
|
||||
a-2u\t'PDF/A-2u'
|
||||
a-2a\t'PDF/A-2a'
|
||||
a-3b\t'PDF/A-3b'
|
||||
a-3u\t'PDF/A-3u'
|
||||
a-3a\t'PDF/A-3a'
|
||||
a-4\t'PDF/A-4'
|
||||
a-4f\t'PDF/A-4f'
|
||||
a-4e\t'PDF/A-4e'
|
||||
ua-1\t'PDF/UA-1'"
|
||||
complete -c typst -n "__fish_typst_using_subcommand w" -l ppi -d 'The PPI (pixels per inch) to use for PNG export' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand w" -l make-deps -d 'File path to which a Makefile with the current compilation\'s dependencies will be written' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand w" -l deps -d 'File path to which a list of current compilation\'s dependencies will be written. Use `-` to write to stdout' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand w" -l deps-format -d 'File format to use for dependencies' -r -f -a "json\t'Encodes as JSON, failing for non-Unicode paths'
|
||||
zero\t'Separates paths with NULL bytes and can express all paths'
|
||||
make\t'Emits in Make format, omitting inexpressible paths'"
|
||||
complete -c typst -n "__fish_typst_using_subcommand w" -s j -l jobs -d 'Number of parallel jobs spawned during compilation. Defaults to number of CPUs. Setting it to 1 disables parallelism' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand w" -l features -d 'Enables in-development features that may be changed or removed at any time' -r -f -a "html\t''
|
||||
a11y-extras\t''"
|
||||
complete -c typst -n "__fish_typst_using_subcommand w" -l diagnostic-format -d 'The format to emit diagnostics in' -r -f -a "human\t''
|
||||
short\t''"
|
||||
complete -c typst -n "__fish_typst_using_subcommand w" -l open -d 'Opens the output file with the default viewer or a specific program after compilation. Ignored if output is stdout' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand w" -l timings -d 'Produces performance timings of the compilation process. (experimental)' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand w" -l port -d 'The port where HTML is served' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand w" -l ignore-system-fonts -d 'Ensures system fonts won\'t be searched, unless explicitly included via `--font-path`'
|
||||
complete -c typst -n "__fish_typst_using_subcommand w" -l ignore-embedded-fonts -d 'Ensures fonts embedded into Typst won\'t be considered'
|
||||
complete -c typst -n "__fish_typst_using_subcommand w" -l no-pdf-tags -d 'By default, even when not producing a `PDF/UA-1` document, a tagged PDF document is written to provide a baseline of accessibility. In some circumstances (for example when trying to reduce the size of a document) it can be desirable to disable tagged PDF'
|
||||
complete -c typst -n "__fish_typst_using_subcommand w" -l no-serve -d 'Disables the built-in HTTP server for HTML export'
|
||||
complete -c typst -n "__fish_typst_using_subcommand w" -l no-reload -d 'Disables the injected live reload script for HTML export. The HTML that is written to disk isn\'t affected either way'
|
||||
complete -c typst -n "__fish_typst_using_subcommand w" -s h -l help -d 'Print help (see more with \'--help\')'
|
||||
complete -c typst -n "__fish_typst_using_subcommand init" -l package-path -d 'Custom path to local packages, defaults to system-dependent location' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand init" -l package-cache-path -d 'Custom path to package cache, defaults to system-dependent location' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand init" -s h -l help -d 'Print help (see more with \'--help\')'
|
||||
complete -c typst -n "__fish_typst_using_subcommand query" -l field -d 'Extracts just one field from all retrieved elements' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand query" -l format -d 'The format to serialize in' -r -f -a "json\t''
|
||||
yaml\t''"
|
||||
complete -c typst -n "__fish_typst_using_subcommand query" -l target -d 'The target to compile for' -r -f -a "paged\t'PDF and image formats'
|
||||
html\t'HTML'"
|
||||
complete -c typst -n "__fish_typst_using_subcommand query" -l root -d 'Configures the project root (for absolute paths)' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand query" -l input -d 'Add a string key-value pair visible through `sys.inputs`' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand query" -l font-path -d 'Adds additional directories that are recursively searched for fonts' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand query" -l package-path -d 'Custom path to local packages, defaults to system-dependent location' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand query" -l package-cache-path -d 'Custom path to package cache, defaults to system-dependent location' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand query" -l creation-timestamp -d 'The document\'s creation date formatted as a UNIX timestamp' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand query" -s j -l jobs -d 'Number of parallel jobs spawned during compilation. Defaults to number of CPUs. Setting it to 1 disables parallelism' -r
|
||||
complete -c typst -n "__fish_typst_using_subcommand query" -l features -d 'Enables in-development features that may be changed or removed at any time' -r -f -a "html\t''
|
||||
a11y-extras\t''"
|
||||
complete -c typst -n "__fish_typst_using_subcommand query" -l diagnostic-format -d 'The format to emit diagnostics in' -r -f -a "human\t''
|
||||
short\t''"
|
||||
complete -c typst -n "__fish_typst_using_subcommand query" -l one -d 'Expects and retrieves exactly one element'
|
||||
complete -c typst -n "__fish_typst_using_subcommand query" -l pretty -d 'Whether to pretty-print the serialized output'
|
||||
complete -c typst -n "__fish_typst_using_subcommand query" -l ignore-system-fonts -d 'Ensures system fonts won\'t be searched, unless explicitly included via `--font-path`'
|
||||
complete -c typst -n "__fish_typst_using_subcommand query" -l ignore-embedded-fonts -d 'Ensures fonts embedded into Typst won\'t be considered'
|
||||
complete -c typst -n "__fish_typst_using_subcommand query" -s h -l help -d 'Print help (see more with \'--help\')'
|
||||
complete -c typst -n "__fish_typst_using_subcommand fonts" -l font-path -d 'Adds additional directories that are recursively searched for fonts' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand fonts" -l ignore-system-fonts -d 'Ensures system fonts won\'t be searched, unless explicitly included via `--font-path`'
|
||||
complete -c typst -n "__fish_typst_using_subcommand fonts" -l ignore-embedded-fonts -d 'Ensures fonts embedded into Typst won\'t be considered'
|
||||
complete -c typst -n "__fish_typst_using_subcommand fonts" -l variants -d 'Also lists style variants of each font family'
|
||||
complete -c typst -n "__fish_typst_using_subcommand fonts" -s h -l help -d 'Print help (see more with \'--help\')'
|
||||
complete -c typst -n "__fish_typst_using_subcommand update" -l backup-path -d 'Custom path to the backup file created on update and used by `--revert`, defaults to system-dependent location' -r -F
|
||||
complete -c typst -n "__fish_typst_using_subcommand update" -l force -d 'Forces a downgrade to an older version (required for downgrading)'
|
||||
complete -c typst -n "__fish_typst_using_subcommand update" -l revert -d 'Reverts to the version from before the last update (only possible if `typst update` has previously ran)'
|
||||
complete -c typst -n "__fish_typst_using_subcommand update" -s h -l help -d 'Print help'
|
||||
complete -c typst -n "__fish_typst_using_subcommand completions" -s h -l help -d 'Print help'
|
||||
complete -c typst -n "__fish_typst_using_subcommand info" -s f -l format -d 'The format to serialize in, if it should be machine-readable' -r -f -a "json\t''
|
||||
yaml\t''"
|
||||
complete -c typst -n "__fish_typst_using_subcommand info" -l pretty -d 'Whether to pretty-print the serialized output'
|
||||
complete -c typst -n "__fish_typst_using_subcommand info" -s h -l help -d 'Print help (see more with \'--help\')'
|
||||
complete -c typst -n "__fish_typst_using_subcommand help; and not __fish_seen_subcommand_from compile watch init query fonts update completions info help" -f -a "compile" -d 'Compiles an input file into a supported output format'
|
||||
complete -c typst -n "__fish_typst_using_subcommand help; and not __fish_seen_subcommand_from compile watch init query fonts update completions info help" -f -a "watch" -d 'Watches an input file and recompiles on changes'
|
||||
complete -c typst -n "__fish_typst_using_subcommand help; and not __fish_seen_subcommand_from compile watch init query fonts update completions info help" -f -a "init" -d 'Initializes a new project from a template'
|
||||
complete -c typst -n "__fish_typst_using_subcommand help; and not __fish_seen_subcommand_from compile watch init query fonts update completions info help" -f -a "query" -d 'Processes an input file to extract provided metadata'
|
||||
complete -c typst -n "__fish_typst_using_subcommand help; and not __fish_seen_subcommand_from compile watch init query fonts update completions info help" -f -a "fonts" -d 'Lists all discovered fonts in system and custom font paths'
|
||||
complete -c typst -n "__fish_typst_using_subcommand help; and not __fish_seen_subcommand_from compile watch init query fonts update completions info help" -f -a "update" -d 'Self update the Typst CLI'
|
||||
complete -c typst -n "__fish_typst_using_subcommand help; and not __fish_seen_subcommand_from compile watch init query fonts update completions info help" -f -a "completions" -d 'Generates shell completion scripts'
|
||||
complete -c typst -n "__fish_typst_using_subcommand help; and not __fish_seen_subcommand_from compile watch init query fonts update completions info help" -f -a "info" -d 'Displays debugging information about Typst'
|
||||
complete -c typst -n "__fish_typst_using_subcommand help; and not __fish_seen_subcommand_from compile watch init query fonts update completions info help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
|
||||
Reference in New Issue
Block a user