Add conf completion for programs in HOME
This commit is contained in:
@@ -12,12 +12,16 @@ local w3="${words[$#words - 3]}"
|
|||||||
if [ -z $w2 ]; then # first word to complete
|
if [ -z $w2 ]; then # first word to complete
|
||||||
# move into config directory
|
# move into config directory
|
||||||
pushd -q "${XDG_CONFIG_HOME:-$HOME/.config}/"
|
pushd -q "${XDG_CONFIG_HOME:-$HOME/.config}/"
|
||||||
|
|
||||||
# list all directories
|
# list all directories
|
||||||
local paths="$(find -L *(-/) -maxdepth $_MAX_DEPTH -type d 2>/dev/null | xargs)"
|
local paths="$(find -L *(-/) -maxdepth $_MAX_DEPTH -type d 2>/dev/null | xargs)"
|
||||||
# TODO: find in $HOME
|
# move back from config directory
|
||||||
|
popd -q
|
||||||
|
|
||||||
# move back
|
# move into HOME
|
||||||
|
pushd -q "$HOME"
|
||||||
|
# list all directories starting with a dot (but remove that dot)
|
||||||
|
paths+="$(find -L .*~.cache(-/) -maxdepth $_MAX_DEPTH -type d 2>/dev/null | sed 's/^\.//' | xargs)"
|
||||||
|
# move back from HOME
|
||||||
popd -q
|
popd -q
|
||||||
|
|
||||||
# use list for completion
|
# use list for completion
|
||||||
|
|||||||
Reference in New Issue
Block a user