aboutsummaryrefslogtreecommitdiff
path: root/extra/completions/_alacritty
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2022-06-16 17:01:13 +0200
committerGitHub <noreply@github.com>2022-06-16 18:01:13 +0300
commit9f02fb95685f46c390148eeab760e3a0dcfa49a9 (patch)
tree50a05564188eaded4a3133560c5caeb7e8b1ddb1 /extra/completions/_alacritty
parentff7f74fd29945ec7913c7b99fd743298164c7888 (diff)
downloadalacritty-9f02fb95685f46c390148eeab760e3a0dcfa49a9.tar.gz
alacritty-9f02fb95685f46c390148eeab760e3a0dcfa49a9.zip
Add value hints for clap file paths
This ensures that the generated completions properly suggest file paths for arguments which accept them.
Diffstat (limited to 'extra/completions/_alacritty')
-rw-r--r--extra/completions/_alacritty20
1 files changed, 9 insertions, 11 deletions
diff --git a/extra/completions/_alacritty b/extra/completions/_alacritty
index 4f482236..86226236 100644
--- a/extra/completions/_alacritty
+++ b/extra/completions/_alacritty
@@ -16,11 +16,11 @@ _alacritty() {
local context curcontext="$curcontext" state line
_arguments "${_arguments_options[@]}" \
'--embed=[Defines the X11 window ID (as a decimal integer) to embed Alacritty within]:EMBED: ' \
-'--config-file=[Specify alternative configuration file \[default: $XDG_CONFIG_HOME/alacritty/alacritty.yml\]]:CONFIG_FILE: ' \
-'--socket=[Path for IPC socket creation]:SOCKET: ' \
+'--config-file=[Specify alternative configuration file \[default: $XDG_CONFIG_HOME/alacritty/alacritty.yml\]]:CONFIG_FILE:_files' \
+'--socket=[Path for IPC socket creation]:SOCKET:_files' \
'*-o+[Override configuration file options \[example: cursor.style=Beam\]]:OPTION: ' \
'*--option=[Override configuration file options \[example: cursor.style=Beam\]]:OPTION: ' \
-'--working-directory=[Start the shell in the specified working directory]:WORKING_DIRECTORY: ' \
+'--working-directory=[Start the shell in the specified working directory]:WORKING_DIRECTORY:_files' \
'*-e+[Command and args to execute (must be last argument)]:COMMAND: ' \
'*--command=[Command and args to execute (must be last argument)]:COMMAND: ' \
'-t+[Defines the window title \[default: Alacritty\]]:TITLE: ' \
@@ -46,8 +46,8 @@ _alacritty() {
case $line[1] in
(msg)
_arguments "${_arguments_options[@]}" \
-'-s+[IPC socket connection path override]:SOCKET: ' \
-'--socket=[IPC socket connection path override]:SOCKET: ' \
+'-s+[IPC socket connection path override]:SOCKET:_files' \
+'--socket=[IPC socket connection path override]:SOCKET:_files' \
'-h[Print help information]' \
'--help[Print help information]' \
":: :_alacritty__msg_commands" \
@@ -62,13 +62,12 @@ _arguments "${_arguments_options[@]}" \
case $line[1] in
(create-window)
_arguments "${_arguments_options[@]}" \
-'--working-directory=[Start the shell in the specified working directory]:WORKING_DIRECTORY: ' \
+'--working-directory=[Start the shell in the specified working directory]:WORKING_DIRECTORY:_files' \
'*-e+[Command and args to execute (must be last argument)]:COMMAND: ' \
'*--command=[Command and args to execute (must be last argument)]:COMMAND: ' \
'-t+[Defines the window title \[default: Alacritty\]]:TITLE: ' \
'--title=[Defines the window title \[default: Alacritty\]]:TITLE: ' \
'--class=[Defines window class/app_id on X11/Wayland \[default: Alacritty\]]:instance> | <instance>,<general: ' \
-'--version[Print version information]' \
'--hold[Remain open after child process exit]' \
'-h[Print help information]' \
'--help[Print help information]' \
@@ -76,9 +75,7 @@ _arguments "${_arguments_options[@]}" \
;;
(help)
_arguments "${_arguments_options[@]}" \
-'--version[Print version information]' \
-'-h[Print help information]' \
-'--help[Print help information]' \
+'*::subcommand -- The subcommand whose help message to display:' \
&& ret=0
;;
esac
@@ -87,6 +84,7 @@ esac
;;
(help)
_arguments "${_arguments_options[@]}" \
+'*::subcommand -- The subcommand whose help message to display:' \
&& ret=0
;;
esac
@@ -126,4 +124,4 @@ _alacritty__msg_commands() {
_describe -t commands 'alacritty msg commands' commands "$@"
}
-_alacritty "$@" \ No newline at end of file
+_alacritty "$@"