diff options
author | Christian Duerr <contact@christianduerr.com> | 2023-06-12 02:23:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-12 00:23:41 +0000 |
commit | bd4906722a1a026b01f06c94c33b13ff63a7e044 (patch) | |
tree | a2713a7b0a5fa23ec8b9055d7ed06f1cede62447 /extra/completions/alacritty.bash | |
parent | ea2c39e65d21728e0f04b0eafcec7153e4447cd5 (diff) | |
download | alacritty-bd4906722a1a026b01f06c94c33b13ff63a7e044.tar.gz alacritty-bd4906722a1a026b01f06c94c33b13ff63a7e044.zip |
Switch to TOML configuration format
This switches Alacritty's default configuration format from yaml to
toml. While yaml is still supported, it is done by converting it to toml
and should be removed entirely in the future.
All existing features were persisted based on my testing. Behavior
should not change much, though `--option` might have slightly different
behavior since the entire line is not interpreted as one line of toml.
A new `alacritty migrate` subcommand has been added which allows
automatic migration from yaml to toml. This also could be used as a
facility to automatically fix configuration file changes in the future.
Closes #6592.
Diffstat (limited to 'extra/completions/alacritty.bash')
-rw-r--r-- | extra/completions/alacritty.bash | 46 |
1 files changed, 44 insertions, 2 deletions
diff --git a/extra/completions/alacritty.bash b/extra/completions/alacritty.bash index bb70ef3f..f7f2caf1 100644 --- a/extra/completions/alacritty.bash +++ b/extra/completions/alacritty.bash @@ -15,12 +15,18 @@ _alacritty() { alacritty,help) cmd="alacritty__help" ;; + alacritty,migrate) + cmd="alacritty__migrate" + ;; alacritty,msg) cmd="alacritty__msg" ;; alacritty__help,help) cmd="alacritty__help__help" ;; + alacritty__help,migrate) + cmd="alacritty__help__migrate" + ;; alacritty__help,msg) cmd="alacritty__help__msg" ;; @@ -55,7 +61,7 @@ _alacritty() { case "${cmd}" in alacritty) - opts="-q -v -o -e -T -h -V --print-events --ref-test --embed --config-file --socket --option --working-directory --hold --command --title --class --help --version msg help" + opts="-q -v -o -e -T -h -V --print-events --ref-test --embed --config-file --socket --option --working-directory --hold --command --title --class --help --version msg migrate help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -113,7 +119,7 @@ _alacritty() { return 0 ;; alacritty__help) - opts="msg help" + opts="msg migrate help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -140,6 +146,20 @@ _alacritty() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; + alacritty__help__migrate) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; alacritty__help__msg) opts="create-window config" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then @@ -182,6 +202,28 @@ _alacritty() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; + alacritty__migrate) + opts="-c -d -i -s -h --config-file --dry-run --skip-imports --skip-renames --silent --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-file) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; alacritty__msg) opts="-s -h --socket --help create-window config help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then |