aboutsummaryrefslogtreecommitdiff
path: root/extra/completions
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2022-01-03 21:55:22 +0300
committerGitHub <noreply@github.com>2022-01-03 18:55:22 +0000
commitce59fa4165500d8e242ae7a73e3da065e11e461e (patch)
treedfaaec5872d59d4c2b2e4907e3213134bea7125d /extra/completions
parente2b5219eb40eaf36d8255cd87c5202bbb8ba0825 (diff)
downloadalacritty-ce59fa4165500d8e242ae7a73e3da065e11e461e.tar.gz
alacritty-ce59fa4165500d8e242ae7a73e3da065e11e461e.zip
Add title/class CLI parameters to create-window
This adds the ability to pass title and class over IPC via the create-window subcommand, so users can run only one instance for windows of different spurposes in the window managers of their choice.
Diffstat (limited to 'extra/completions')
-rw-r--r--extra/completions/_alacritty9
-rw-r--r--extra/completions/alacritty.bash38
-rw-r--r--extra/completions/alacritty.fish6
3 files changed, 35 insertions, 18 deletions
diff --git a/extra/completions/_alacritty b/extra/completions/_alacritty
index 59ed92b2..ad93e6bc 100644
--- a/extra/completions/_alacritty
+++ b/extra/completions/_alacritty
@@ -15,9 +15,6 @@ _alacritty() {
local context curcontext="$curcontext" state line
_arguments "${_arguments_options[@]}" \
-'-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]' \
'--config-file=[Specify alternative configuration file \[default: $XDG_CONFIG_HOME/alacritty/alacritty.yml\]]' \
'--socket=[Path for IPC socket creation]' \
@@ -26,6 +23,9 @@ _alacritty() {
'--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\]]' \
'--print-events[Print all events to stdout]' \
'--ref-test[Generates ref test]' \
'(-v)*-q[Reduces the level of verbosity (the min level is -qq)]' \
@@ -66,6 +66,9 @@ _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\]]' \
'--hold[Remain open after child process exit]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
diff --git a/extra/completions/alacritty.bash b/extra/completions/alacritty.bash
index 7ce57f9d..cc1c1f42 100644
--- a/extra/completions/alacritty.bash
+++ b/extra/completions/alacritty.bash
@@ -29,54 +29,54 @@ _alacritty() {
case "${cmd}" in
alacritty)
- opts=" -q -v -h -V -t -o -e --print-events --ref-test --hold --help --version --title --class --embed --config-file --socket --option --working-directory --command msg help"
+ opts=" -q -v -h -V -o -e -t --print-events --ref-test --hold --help --version --embed --config-file --socket --option --working-directory --command --title --class msg help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
- --title)
+ --embed)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
- -t)
+ --config-file)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
- --class)
+ --socket)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
- --embed)
+ --option)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
- --config-file)
+ -o)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
- --socket)
+ --working-directory)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
- --option)
+ --command)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
- -o)
+ -e)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
- --working-directory)
+ --title)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
- --command)
+ -t)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
- -e)
+ --class)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
@@ -127,7 +127,7 @@ _alacritty() {
return 0
;;
alacritty__msg__create__window)
- opts=" -h -V -e --hold --help --version --working-directory --command "
+ opts=" -h -V -e -t --hold --help --version --working-directory --command --title --class "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
@@ -146,6 +146,18 @@ _alacritty() {
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
+ --title)
+ COMPREPLY=($(compgen -f "${cur}"))
+ return 0
+ ;;
+ -t)
+ COMPREPLY=($(compgen -f "${cur}"))
+ return 0
+ ;;
+ --class)
+ COMPREPLY=($(compgen -f "${cur}"))
+ return 0
+ ;;
*)
COMPREPLY=()
;;
diff --git a/extra/completions/alacritty.fish b/extra/completions/alacritty.fish
index 09cc6c0f..a94a81d3 100644
--- a/extra/completions/alacritty.fish
+++ b/extra/completions/alacritty.fish
@@ -1,11 +1,11 @@
-complete -c alacritty -n "__fish_use_subcommand" -s t -l title -d 'Defines the window title [default: Alacritty]'
-complete -c alacritty -n "__fish_use_subcommand" -l class -d 'Defines window class/app_id on X11/Wayland [default: Alacritty]'
complete -c alacritty -n "__fish_use_subcommand" -l embed -d 'Defines the X11 window ID (as a decimal integer) to embed Alacritty within'
complete -c alacritty -n "__fish_use_subcommand" -l config-file -d 'Specify alternative configuration file [default: $XDG_CONFIG_HOME/alacritty/alacritty.yml]'
complete -c alacritty -n "__fish_use_subcommand" -l socket -d 'Path for IPC socket creation'
complete -c alacritty -n "__fish_use_subcommand" -s o -l option -d 'Override configuration file options [example: cursor.style=Beam]'
complete -c alacritty -n "__fish_use_subcommand" -l working-directory -d 'Start the shell in the specified working directory'
complete -c alacritty -n "__fish_use_subcommand" -s e -l command -d 'Command and args to execute (must be last argument)'
+complete -c alacritty -n "__fish_use_subcommand" -s t -l title -d 'Defines the window title [default: Alacritty]'
+complete -c alacritty -n "__fish_use_subcommand" -l class -d 'Defines window class/app_id on X11/Wayland [default: Alacritty]'
complete -c alacritty -n "__fish_use_subcommand" -l print-events -d 'Print all events to stdout'
complete -c alacritty -n "__fish_use_subcommand" -l ref-test -d 'Generates ref test'
complete -c alacritty -n "__fish_use_subcommand" -s q -d 'Reduces the level of verbosity (the min level is -qq)'
@@ -22,6 +22,8 @@ complete -c alacritty -n "__fish_seen_subcommand_from msg" -f -a "create-window"
complete -c alacritty -n "__fish_seen_subcommand_from msg" -f -a "help" -d 'Prints this message or the help of the given subcommand(s)'
complete -c alacritty -n "__fish_seen_subcommand_from create-window" -l working-directory -d 'Start the shell in the specified working directory'
complete -c alacritty -n "__fish_seen_subcommand_from create-window" -s e -l command -d 'Command and args to execute (must be last argument)'
+complete -c alacritty -n "__fish_seen_subcommand_from create-window" -s t -l title -d 'Defines the window title [default: Alacritty]'
+complete -c alacritty -n "__fish_seen_subcommand_from create-window" -l class -d 'Defines window class/app_id on X11/Wayland [default: Alacritty]'
complete -c alacritty -n "__fish_seen_subcommand_from create-window" -l hold -d 'Remain open after child process exit'
complete -c alacritty -n "__fish_seen_subcommand_from create-window" -s h -l help -d 'Prints help information'
complete -c alacritty -n "__fish_seen_subcommand_from create-window" -s V -l version -d 'Prints version information'