From 437f42f8d30fb6d4843738fbd46bb801679443a7 Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Tue, 4 Jan 2022 19:25:26 +0100 Subject: Migrate from structopt to clap 3 --- extra/completions/_alacritty | 93 +++++++++++++++++----------------------- extra/completions/alacritty.bash | 31 ++++++-------- extra/completions/alacritty.fish | 53 +++++++++++------------ 3 files changed, 77 insertions(+), 100 deletions(-) (limited to 'extra') diff --git a/extra/completions/_alacritty b/extra/completions/_alacritty index ad93e6bc..4f482236 100644 --- a/extra/completions/_alacritty +++ b/extra/completions/_alacritty @@ -15,26 +15,26 @@ _alacritty() { local context curcontext="$curcontext" state line _arguments "${_arguments_options[@]}" \ -'--embed=[Defines the X11 window ID (as a decimal integer) to embed Alacritty within]' \ -'--config-file=[Specify alternative configuration file \[default: $XDG_CONFIG_HOME/alacritty/alacritty.yml\]]' \ -'--socket=[Path for IPC socket creation]' \ -'*-o+[Override configuration file options \[example: cursor.style=Beam\]]' \ -'*--option=[Override configuration file options \[example: cursor.style=Beam\]]' \ -'--working-directory=[Start the shell in the specified working directory]' \ -'*-e+[Command and args to execute (must be last argument)]' \ -'*--command=[Command and args to execute (must be last argument)]' \ -'-t+[Defines the window title \[default: Alacritty\]]' \ -'--title=[Defines the window title \[default: Alacritty\]]' \ -'--class=[Defines window class/app_id on X11/Wayland \[default: Alacritty\]]' \ +'--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: ' \ +'*-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: ' \ +'*-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> | ,alacritty" \ && ret=0 @@ -46,16 +46,15 @@ _alacritty() { case $line[1] in (msg) _arguments "${_arguments_options[@]}" \ -'-s+[IPC socket connection path override]' \ -'--socket=[IPC socket connection path override]' \ -'-h[Prints help information]' \ -'--help[Prints help information]' \ -'-V[Prints version information]' \ -'--version[Prints version information]' \ +'-s+[IPC socket connection path override]:SOCKET: ' \ +'--socket=[IPC socket connection path override]:SOCKET: ' \ +'-h[Print help information]' \ +'--help[Print help information]' \ ":: :_alacritty__msg_commands" \ "*::: :->msg" \ && ret=0 -case $state in + + case $state in (msg) words=($line[1] "${words[@]}") (( CURRENT += 1 )) @@ -63,25 +62,23 @@ case $state in case $line[1] in (create-window) _arguments "${_arguments_options[@]}" \ -'--working-directory=[Start the shell in the specified working directory]' \ -'*-e+[Command and args to execute (must be last argument)]' \ -'*--command=[Command and args to execute (must be last argument)]' \ -'-t+[Defines the window title \[default: Alacritty\]]' \ -'--title=[Defines the window title \[default: Alacritty\]]' \ -'--class=[Defines window class/app_id on X11/Wayland \[default: Alacritty\]]' \ +'--working-directory=[Start the shell in the specified working directory]:WORKING_DIRECTORY: ' \ +'*-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> | ,