From cdb8a3148654d740f84a611b1424ef88bf6f9014 Mon Sep 17 00:00:00 2001 From: Thomas Vanbesien Date: Sun, 7 Jun 2026 20:44:42 +0200 Subject: fix(dotfiles): decouple `dotfiles` completion from on/off toggle Enable completion globally instead of only after running `dotfiles on` --- .local/share/bash-completion/completions/dotfiles | 4 ++++ .local/share/dotfiles/dotfiles_off.env | 2 -- .local/share/dotfiles/dotfiles_on.env | 5 ----- 3 files changed, 4 insertions(+), 7 deletions(-) create mode 100644 .local/share/bash-completion/completions/dotfiles (limited to '.local') diff --git a/.local/share/bash-completion/completions/dotfiles b/.local/share/bash-completion/completions/dotfiles new file mode 100644 index 0000000..4de2d37 --- /dev/null +++ b/.local/share/bash-completion/completions/dotfiles @@ -0,0 +1,4 @@ +_comp_dotfiles() { + COMPREPLY=(sync reinstall-nvim on off) +} +complete -F _comp_dotfiles dotfiles diff --git a/.local/share/dotfiles/dotfiles_off.env b/.local/share/dotfiles/dotfiles_off.env index 8a24a54..949494d 100644 --- a/.local/share/dotfiles/dotfiles_off.env +++ b/.local/share/dotfiles/dotfiles_off.env @@ -1,3 +1 @@ unset GIT_DIR GIT_WORK_TREE - -complete -r dotfiles 2>/dev/null; unset -f _comp_dotfiles diff --git a/.local/share/dotfiles/dotfiles_on.env b/.local/share/dotfiles/dotfiles_on.env index 99c6fdb..23ff778 100644 --- a/.local/share/dotfiles/dotfiles_on.env +++ b/.local/share/dotfiles/dotfiles_on.env @@ -1,6 +1 @@ export GIT_DIR="$DOTFILES_DIR" GIT_WORK_TREE="$HOME" - -function _comp_dotfiles() { - COMPREPLY=(sync reinstall-nvim on off) -} -complete -F _comp_dotfiles dotfiles -- cgit v1.3.1