GiselleSerate / myaliases

Useful shell aliases and functions.
6 stars 1 forks source link

cds Tab Completion #16

Closed aryarm closed 6 years ago

aryarm commented 6 years ago

Wouldn't it be great if the cds command did tab completion?!

aryarm commented 6 years ago

Here's a resource: http://tldp.org/LDP/abs/html/tabexpansion.html and another: https://stackoverflow.com/questions/5570795/how-does-bash-tab-completion-work

From what it says in the article, this enhancement might warrant putting the cds command in it's own file, since it looks like it will make the function significantly more messy. This might be a good thing to do anyway because there are other plans I have that will make the command messy. @GiselleSerate, what do you think?

GiselleSerate commented 6 years ago

I'm so down. (Also I love the footnotes on the first resource.) [Time frame wise, winter break is going to be way better for this if you want my help on this . . . I'm not going to promise I'll even attempt any of this for the next two weeks.]

aryarm commented 6 years ago

I agree (with everything you just said)

aryarm commented 6 years ago

Tab completion is finished! However, things still need heavy testing. All edge cases need to be ironed out. This particularly applies to weird characters (like backslashes). Also, it hasn't yet been tested on other shells (like zsh, for example) or on Macs (see related issue #19).

Also, it seems to have trouble adding slashes to the ends of the suggestions. But I'll open a different issue for that. (See issue #18).