nu_scripts icon indicating copy to clipboard operation
nu_scripts copied to clipboard

cd-path completion

Open skelly37 opened this issue 2 years ago • 3 comments

The idea is to display all possible destinations for the c command, i.e. display all folders located in the $env.CDPATH variable's elements on TAB.

Like it works with cd but instead of just ls --all $env.PWD | where $it.type == dir, do it in each CDPATH-ed location.

I'll be playing with it in my spare time, just posting it here to discuss the concept, implementation and maybe to inspire someone :)

skelly37 avatar Jun 04 '22 09:06 skelly37

what is $env.CDPATH? I don't see it on Mac. Not sure about Windows.

fdncred avatar Jun 06 '22 11:06 fdncred

what is $env.CDPATH? I don't see it on Mac. Not sure about Windows.

It's a variable needed to be provided by user for cdpath.nu to work. Not a default one but required by the script. Example usage is in the comment in the script source

skelly37 avatar Jun 06 '22 11:06 skelly37

ok, I get it now. thanks.

fdncred avatar Jun 06 '22 11:06 fdncred

I did this in #644 (except for c ~ which I could not figure out)

drbrain avatar Oct 19 '23 00:10 drbrain