From 34435ed776988e765d9327dcedfe909e440e6bf8 Mon Sep 17 00:00:00 2001 From: Jason Date: Sun, 17 Jan 2021 20:22:06 +0900 Subject: Update shell completions This fixes the shell completion by removing the flags removed from the CLI in 0768428 and adding the new options flag. --- extra/completions/_alacritty | 8 ++------ extra/completions/alacritty.bash | 7 +------ extra/completions/alacritty.fish | 24 ++++-------------------- 3 files changed, 7 insertions(+), 32 deletions(-) (limited to 'extra') diff --git a/extra/completions/_alacritty b/extra/completions/_alacritty index f074042f..c97d563e 100644 --- a/extra/completions/_alacritty +++ b/extra/completions/_alacritty @@ -5,9 +5,6 @@ local ign (( $#words > 2 )) && ign='!' _arguments \ "$ign(-)"{-h,--help}"[print help information]" \ - "(--no-live-config-reload)--live-config-reload[enable automatic config reloading]" \ - "(--live-config-reload)--no-live-config-reload[disable automatic config reloading]" \ - "(--persistent-logging)--persistent-logging[keep the log file after quitting Alacritty]" \ "--print-events[print all events to stdout]" \ '(-v)'{-q,-qq}"[reduce the level of verbosity (min is -qq)]" \ "--ref-test[generate ref test]" \ @@ -18,7 +15,6 @@ _arguments \ "--embed=[define the X11 window ID (as a decimal integer) to embed Alacritty within]:windowId" \ "(-e --command)"{-e,--command}"[execute command (must be last arg)]:program: _command_names -e:*::program arguments: _normal" \ "--config-file=[specify an alternative config file]:file:_files" \ - "(-d --dimensions)"{-d,--dimensions}"[specify window dimensions]:columns: :lines" \ - "--position[specify window position]:x position: :y position" \ - "(-t --title)"{-t+,--title=}"[define the window title]:title" \ + "*"{-o=,--option=}"[override config file options]:option" \ + "(-t --title)"{-t=,--title=}"[define the window title]:title" \ "--working-directory=[start shell in specified directory]:directory:_directories" diff --git a/extra/completions/alacritty.bash b/extra/completions/alacritty.bash index d2abda7e..7d756644 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 --live-config-reload --no-live-config-reload --persistent-logging --print-events -q -qq -v -vv -vvv --ref-test --hold -e --command --config-file -d --dimensions --position -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" # If `--command` or `-e` is used, stop completing for i in "${!COMP_WORDS[@]}"; do @@ -23,11 +23,6 @@ _alacritty() fi done - # Make sure the Y dimension isn't completed - if [[ "${prevprev}" == "--dimensions" ]] || [[ "${prevprev}" == "-d" ]]; then - return 0 - fi - # Match the previous word case "${prev}" in --command | -e) diff --git a/extra/completions/alacritty.fish b/extra/completions/alacritty.fish index 4fb662d3..6f8da9b0 100644 --- a/extra/completions/alacritty.fish +++ b/extra/completions/alacritty.fish @@ -9,15 +9,6 @@ complete -c alacritty \ -d "Prints help information" # Config -complete -c alacritty \ - -l "live-config-reload" \ - -d "Enable automatic config reloading" -complete -c alacritty \ - -l "no-live-config-reload" \ - -d "Disable automatic config reloading" -complete -c alacritty \ - -l "persistent-logging" \ - -d "Keep the log file after quitting Alacritty" complete -c alacritty \ -f \ -l "config-file" \ @@ -40,6 +31,10 @@ complete -c alacritty \ complete -c alacritty \ -l "hold" \ -d "Remain open after child process exits" +complete -c alacritty \ + -s "o" \ + -l "option" \ + -d "Override config file options" # Output complete \ @@ -72,17 +67,6 @@ complete \ -l "ref-test" \ -d "Generates ref test" -complete \ - -c alacritty \ - -s "d" \ - -l "dimensions" \ - -d "Window dimensions " - -complete \ - -c alacritty \ - -l "position" \ - -d "Window position " - complete \ -c alacritty \ -s "e" \ -- cgit v1.2.3-54-g00ecf