summaryrefslogtreecommitdiffstats
path: root/extra/completions/alacritty.bash
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2021-11-22 21:34:09 +0300
committerGitHub <noreply@github.com>2021-11-22 18:34:09 +0000
commit8681f71084894db6d1e258be17db1f80bb669314 (patch)
tree24d3c0ced916d2d171fd03f50cd34dcda8f0aa06 /extra/completions/alacritty.bash
parentc89939b5d14e581e1aeaa940d81843192e0abc79 (diff)
Add parameters to `msg create-window` subcommand
Alacritty's `msg create-window` subcommand would previously inherit all the CLI parameters from the original executable. However not only could this lead to unexpected behavior, it also prevents multi-window users from making use of parameters like `-e`, `--working-directory`, or `--hold`. This is solved by adding a JSON-based message format to the IPC socket messages which instructs the Alacritty server on which CLI parameters should be used to create the new window. Fixes #5562. Fixes #5561. Fixes #5560.
Diffstat (limited to 'extra/completions/alacritty.bash')
-rw-r--r--extra/completions/alacritty.bash30
1 files changed, 21 insertions, 9 deletions
diff --git a/extra/completions/alacritty.bash b/extra/completions/alacritty.bash
index 0a9b286e..7ce57f9d 100644
--- a/extra/completions/alacritty.bash
+++ b/extra/completions/alacritty.bash
@@ -29,7 +29,7 @@ _alacritty() {
case "${cmd}" in
alacritty)
- opts=" -q -v -h -V -t -e -o --print-events --ref-test --hold --help --version --title --class --embed --working-directory --config-file --socket --command --option msg help"
+ 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"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
@@ -52,31 +52,31 @@ _alacritty() {
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
- --working-directory)
+ --config-file)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
- --config-file)
+ --socket)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
- --socket)
+ --option)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
- --command)
+ -o)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
- -e)
+ --working-directory)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
- --option)
+ --command)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
- -o)
+ -e)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
@@ -127,13 +127,25 @@ _alacritty() {
return 0
;;
alacritty__msg__create__window)
- opts=" -h -V --help --version "
+ opts=" -h -V -e --hold --help --version --working-directory --command "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
+ --working-directory)
+ COMPREPLY=($(compgen -f "${cur}"))
+ return 0
+ ;;
+ --command)
+ COMPREPLY=($(compgen -f "${cur}"))
+ return 0
+ ;;
+ -e)
+ COMPREPLY=($(compgen -f "${cur}"))
+ return 0
+ ;;
*)
COMPREPLY=()
;;