summaryrefslogtreecommitdiffstats
path: root/content/posts/bash-incremental-directory-completion/index.org
diff options
context:
space:
mode:
Diffstat (limited to 'content/posts/bash-incremental-directory-completion/index.org')
-rw-r--r--content/posts/bash-incremental-directory-completion/index.org7
1 files changed, 5 insertions, 2 deletions
diff --git a/content/posts/bash-incremental-directory-completion/index.org b/content/posts/bash-incremental-directory-completion/index.org
index 95369fe..b0b15c3 100644
--- a/content/posts/bash-incremental-directory-completion/index.org
+++ b/content/posts/bash-incremental-directory-completion/index.org
@@ -70,8 +70,11 @@ after the completion instead of completing the directories under it.
My next attempt was to use the =find= command.
-=$(find ${src_root} -maxdepth 3 -mindepth 3 -type d -printf "%P\n")"=
-=COMPREPLY=($(repo cd && compgen -W "${dirs}" "${COMP_WORDS[2]}"))=
+#+begin_src bash
+dirs=$(find ${src_root} -maxdepth 3 -mindepth 3 -type d -printf "%P\n")"
+COMPREPLY=($(repo cd && compgen -W "${dirs}" "${COMP_WORDS[2]}"))
+#+end_src
+
This roughly worked but came with its own issues. Since it was listing
all three path components at once, between the hundreds of