config/zsh: improve completion handling
This commit is contained in:
parent
5a19b3e1f3
commit
00b1f35572
|
@ -12,18 +12,18 @@ then
|
||||||
alias -g T=" | tree -C --fromfile . | less -F"
|
alias -g T=" | tree -C --fromfile . | less -F"
|
||||||
|
|
||||||
# Edit zsh completion
|
# Edit zsh completion
|
||||||
edcomp() {
|
edit-completion() {
|
||||||
file=$(echo "$1" | sed 's/^\([^_]\)/_\1/')
|
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
|
unfunction "$file" && compinit
|
||||||
}
|
}
|
||||||
compdef "_files -W ${fpath[-1]}/" edcomp
|
compdef "_files -W ${fpath[-1]}/" edit-completion
|
||||||
|
alias comp='edit-completion'
|
||||||
writecompletion() {
|
|
||||||
echo "#compdef $1" > "_$1"
|
|
||||||
$EDITOR "_$1"
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
|
# So bash does not error out on zsh completion definitions
|
||||||
compdef() { true; }
|
compdef() { true; }
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#compdef edit-bin
|
#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)
|
#compadd $(ls --almost-all --indicator-style=slash $HOME/.local/bin/scripts)
|
||||||
#$(echo $PATH | cut -d':' -f1 | xargs ls -pA)
|
#$(echo $PATH | cut -d':' -f1 | xargs ls -pA)
|
||||||
|
|
|
@ -86,9 +86,14 @@ https://addons.mozilla.org/firefox/addon/passff
|
||||||
https://addons.mozilla.org/firefox/addon/masterpassword-firefox
|
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/integration?collection_sort=-popularity][System Integration]]
|
||||||
**** [[https://addons.mozilla.org/en-US/firefox/collections/15727735/privacy?collection_sort=-popularity][Privacy]]
|
**** [[https://addons.mozilla.org/en-US/firefox/collections/15727735/privacy?collection_sort=-popularity][Privacy]]
|
||||||
* Setup Tools
|
* Setup Tools to consider
|
||||||
** Ansible
|
** Ansible
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:ID: ansible
|
:ID: ansible
|
||||||
:END:
|
:END:
|
||||||
https://github.com/Oefenweb/ansible-updatedb
|
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
|
||||||
|
|
Loading…
Reference in New Issue