aboutsummaryrefslogtreecommitdiff
path: root/extra/completions/alacritty.bash
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2021-10-23 07:16:47 +0000
committerGitHub <noreply@github.com>2021-10-23 07:16:47 +0000
commit1df7dc5171abfe1eab3e95be964f61c5876198f1 (patch)
tree315ceaa093b86b8e875512825302f38e32f697a4 /extra/completions/alacritty.bash
parentd8a98f88295e59d6518ae780a9857c033a83161c (diff)
downloadalacritty-1df7dc5171abfe1eab3e95be964f61c5876198f1.tar.gz
alacritty-1df7dc5171abfe1eab3e95be964f61c5876198f1.zip
Add multi-window support
Previously Alacritty would always initialize only a single terminal emulator window feeding into the winit event loop, however some platforms like macOS expect all windows to be spawned by the same process and this "daemon-mode" can also come with the advantage of increased memory efficiency. The event loop has been restructured to handle all window-specific events only by the event processing context with the associated window id. This makes it possible to add new terminal windows at any time using the WindowContext::new function call. Some preliminary tests have shown that for empty terminals, this reduces the cost of additional terminal emulators from ~100M to ~6M. However at this point the robustness of the daemon against issues with individual terminals has not been refined, making the reliability of this system questionable. New windows can be created either by using the new `CreateNewWindow` action, or with the `alacritty msg create-window` subcommand. The subcommand sends a message to an IPC socket which Alacritty listens on, its location can be found in the `ALACRITTY_SOCKET` environment variable. Fixes #607.
Diffstat (limited to 'extra/completions/alacritty.bash')
-rw-r--r--extra/completions/alacritty.bash9
1 files changed, 6 insertions, 3 deletions
diff --git a/extra/completions/alacritty.bash b/extra/completions/alacritty.bash
index e514126c..464afe6e 100644
--- a/extra/completions/alacritty.bash
+++ b/extra/completions/alacritty.bash
@@ -11,7 +11,7 @@ _alacritty()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
prevprev="${COMP_WORDS[COMP_CWORD-2]}"
- opts="-h --help -V --version --print-events -q -qq -v -vv -vvv --ref-test --hold -e --command --config-file -o --option -t --title --embed --class --working-directory"
+ opts="-h --help -V --version --print-events -q -qq -v -vv -vvv --ref-test --hold -e --command --config-file -o --option -t --title --embed --class --working-directory --socket msg"
# If `--command` or `-e` is used, stop completing
for i in "${!COMP_WORDS[@]}"; do
@@ -29,8 +29,8 @@ _alacritty()
# Complete all commands in $PATH
COMPREPLY=( $(compgen -c -- "${cur}") )
return 0;;
- --config-file)
- # Path based completion
+ --config-file | --socket)
+ # File completion
local IFS=$'\n'
compopt -o filenames
COMPREPLY=( $(compgen -f -- "${cur}") )
@@ -44,6 +44,9 @@ _alacritty()
compopt -o filenames
COMPREPLY=( $(compgen -d -- "${cur}") )
return 0;;
+ msg)
+ COMPREPLY=( $(compgen -W "-h --help -V --version -s --socket" -- "${cur}") )
+ return 0;;
esac
# Show all flags if there was no previous word