Warp icon indicating copy to clipboard operation
Warp copied to clipboard

Add commonly used (sub)folders in cd autocomplete

Open hyldmo opened this issue 3 years ago • 2 comments

Discord username (optional)

No response

Describe the solution you'd like?

I would like the `cd` autocomplete to also suggest relevant subfolders
Similar to https://github.com/skywind3000/z.lua.

Is your feature request related to a problem? Please describe.

Whenever I open a terminal, I always end up using cd and pressing tab a million times until I find the subdirectory (say `cd ~/dev/personal/monorepo/project-name/scripts`), as well as type `cd ..` + `ls` to get to the folder I want as I rarely remember the actual location

Additional context

No response

How important is this feature to you?

3

Warp Internal (ignore) - linear-label:770f6576-d6c0-4e4f-a259-fc64b5156087

No response

hyldmo avatar Sep 20 '22 12:09 hyldmo

Hi @hyldmo, I'm Danny, a Support Engineer at Warp.

So as far as I'm aware, cd takes into account the current folder you're in and Tab shows you a list of the subfolder options available to you ( hence avoiding the ls to see what files/folders are available ).

Also if you have a specific cd path you use often, it will be in the command history which you can access/find with CTRL-R. Alternatively, if you find that you are cding into a specific path very often, consider setting up an alias for it by putting something like alias cda=cd ~/a/project/folder/here into your ~/.bashrc or ~/.zshrc file.

Please see this loom for some examples.

I hope these help your use case. Please let me know if any of that helps or if you'd like to keep this FR open, please +1 as it helps us gauge interest.

dannyneira avatar Sep 20 '22 16:09 dannyneira

I am aware of how the current autocomplete work. Note that in the loom you have to press the arrow keys a lot to look through the folders. And i guess you could make aliases, but I think in the case I'm thinking of I'd have to constantly maintain that list as the folder usage greatly varies.

If I had a magic wand something like VScode's CMD+P feature would also work wonders. When I'm using that, it's usually a total of 5-10 key presses (including CMD & P) til I get to the exact file I want. I don't think any version of cd's autocomplete could do in its current form.

For me at least, navigating around is one of the biggest friction points of using a terminal, and something helping with that over the base linux tools available would be very valuable (to me at least, but I think this is a common gripe for many developers), and one of the reasons I would use a "supercharged" terminal over just a regular one.

I'll add that you could probably have this in a separate command-line tool or something else, but adding it to cd specifically would give the feature nice discoverability :)

hyldmo avatar Sep 29 '22 18:09 hyldmo

@hyldmo Huge +1 to solving this precise pain point!

elviskahoro avatar Sep 30 '22 07:09 elviskahoro