config/zsh: improve completion handling

This commit is contained in:
xeruf 2022-08-09 22:53:27 +02:00
parent 5a19b3e1f3
commit 00b1f35572
3 changed files with 16 additions and 10 deletions

View File

@ -12,18 +12,18 @@ then
alias -g T=" | tree -C --fromfile . | less -F"
# Edit zsh completion
edcomp() {
edit-completion() {
file=$(echo "$1" | sed 's/^\([^_]\)/_\1/')
$EDITOR "${fpath[-1]}/$file"
filepath="${fpath[-1]}/$file"
test -f "$filepath" ||
echo "#compdef $1" >"$filepath"
$EDITOR "$filepath"
unfunction "$file" && compinit
}
compdef "_files -W ${fpath[-1]}/" edcomp
writecompletion() {
echo "#compdef $1" > "_$1"
$EDITOR "_$1"
}
compdef "_files -W ${fpath[-1]}/" edit-completion
alias comp='edit-completion'
else
# So bash does not error out on zsh completion definitions
compdef() { true; }
fi

View File

@ -1,4 +1,5 @@
#compdef edit-bin
_files -W $HOME/.local/bin/scripts
dirs=($HOME/.local/bin/*/)
_files -W dirs
#compadd $(ls --almost-all --indicator-style=slash $HOME/.local/bin/scripts)
#$(echo $PATH | cut -d':' -f1 | xargs ls -pA)

View File

@ -86,9 +86,14 @@ https://addons.mozilla.org/firefox/addon/passff
https://addons.mozilla.org/firefox/addon/masterpassword-firefox
**** [[https://addons.mozilla.org/en-US/firefox/collections/15727735/integration?collection_sort=-popularity][System Integration]]
**** [[https://addons.mozilla.org/en-US/firefox/collections/15727735/privacy?collection_sort=-popularity][Privacy]]
* Setup Tools
* Setup Tools to consider
** Ansible
:PROPERTIES:
:ID: ansible
:END:
https://github.com/Oefenweb/ansible-updatedb
* Issues
- emacstty sometimes breaks terminals
** Manjaro Sway
- zsh vim bindings don't work properly
- clipboard sync does not work in Doom Emacs