dotcli: Support nested folder commands.

This commit is contained in:
2026-07-05 17:52:03 -04:00
parent 0d6f0d2fc9
commit 8ce46a7b98
5 changed files with 62 additions and 10 deletions

View File

@@ -2,6 +2,13 @@ function __dot_custom_subcommands
echo init
echo help
path basename $HOME/.config/dot/commands/*.fish 2>/dev/null | path change-extension ''
for d in $HOME/.config/dot/commands/*/
test -d $d; or continue
set -l name (path basename $d)
test -f $d$name.fish; or continue
echo $name
end
end
complete -c dot -n __fish_use_subcommand -a "(__dot_custom_subcommands)"