diff options
| author | Dante Catalfamo | 2023-12-30 02:20:24 -0500 |
|---|---|---|
| committer | Dante Catalfamo | 2023-12-30 02:20:24 -0500 |
| commit | 7b077cbf33599d7260ed2054e447a22cffc49b62 (patch) | |
| tree | 12819189ed33dfda72a4e22fc06b7a3d6d7ee6df /content | |
| parent | 059e609290c9f0b74eae8ad589529eeb5286a8a9 (diff) | |
| download | blog-7b077cbf33599d7260ed2054e447a22cffc49b62.tar.gz blog-7b077cbf33599d7260ed2054e447a22cffc49b62.tar.bz2 blog-7b077cbf33599d7260ed2054e447a22cffc49b62.zip | |
bash-incremental: Put code in block
Diffstat (limited to 'content')
| -rw-r--r-- | content/posts/bash-incremental-directory-completion/index.org | 7 |
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 |
