summaryrefslogtreecommitdiff
path: root/alacritty-completions.bash
diff options
context:
space:
mode:
authorChristian Duerr <chrisduerr@users.noreply.github.com>2019-04-01 22:41:20 +0000
committerGitHub <noreply@github.com>2019-04-01 22:41:20 +0000
commit6f4d1afcf88e275f4a6b8c73cfc904e3833d0dd0 (patch)
treebd2c870aea77c683e0725a59d1c8ce1f817dba7d /alacritty-completions.bash
parent5523f64c6f939ced94d55c569f592320442e8eb9 (diff)
downloadalacritty-6f4d1afcf88e275f4a6b8c73cfc904e3833d0dd0.tar.gz
alacritty-6f4d1afcf88e275f4a6b8c73cfc904e3833d0dd0.zip
Add official logov0.3.0-rc2
Diffstat (limited to 'alacritty-completions.bash')
-rw-r--r--alacritty-completions.bash57
1 files changed, 0 insertions, 57 deletions
diff --git a/alacritty-completions.bash b/alacritty-completions.bash
deleted file mode 100644
index 086e3cdc..00000000
--- a/alacritty-completions.bash
+++ /dev/null
@@ -1,57 +0,0 @@
-#/usr/bin/env bash
-
-# Load completion function
-complete -F _alacritty alacritty
-
-# Completion function
-_alacritty()
-{
- local cur prev prevprev opts
- COMPREPLY=()
- 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 -e --command --config-file -d --dimensions --position -t --title --working-directory"
-
- # If `--command` or `-e` is used, stop completing
- for i in "${!COMP_WORDS[@]}"; do
- if [[ "${COMP_WORDS[i]}" == "--command" ]] \
- || [[ "${COMP_WORDS[i]}" == "-e" ]] \
- && [[ "${#COMP_WORDS[@]}" -gt "$(($i + 2))" ]]
- then
- return 0
- 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)
- # Complete all commands in $PATH
- COMPREPLY=( $(compgen -c -- "${cur}") )
- return 0;;
- --config-file)
- # Path based completion
- local IFS=$'\n'
- compopt -o filenames
- COMPREPLY=( $(compgen -f -- "${cur}") )
- return 0;;
- --dimensions | -d | --title | -t)
- # Don't complete here
- return 0;;
- --working-directory)
- # Directory completion
- local IFS=$'\n'
- compopt -o filenames
- COMPREPLY=( $(compgen -d -- "${cur}") )
- return 0;;
- esac
-
- # Show all flags if there was no previous word
- COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
- return 0
-}