From 7b077cbf33599d7260ed2054e447a22cffc49b62 Mon Sep 17 00:00:00 2001 From: Dante Catalfamo Date: Sat, 30 Dec 2023 02:20:24 -0500 Subject: bash-incremental: Put code in block --- content/posts/bash-incremental-directory-completion/index.org | 7 +++++-- 1 file 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 -- cgit v1.2.3