-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Since we're currently drowning in cd (autocompletion) feature requests, I think it's probably best to group them together here. See also issues #16 and #35 and #50 Moreover we should sketch an approach to handle them here
A (non-exhaustive) list of cd autocompletion work, partially ordered by importance. I also added an indicator of task-difficulty-estimation:
-
easy: As I sketched out in issue Enhanced code completion #16 , we should change some of readline defaults and allow a user to override them in
~/.inputrc -
challenging: autocomplete for
cdshould only complete directory names, no file names. This can be tricky , since readline API sucks here, I think. This feature is probably the most usefulcdenhancement however. e.g.$ ls directory a_filename a_directoryname $ cd a<TAB> $ cd a_directoryname/ # detects a_filename isn't an appropriate completion -
easy: not really autocompletion, rather a bug, see issue cd built_in and PWD env var #22
-
moderate: a feature request to support "
cd -" and maybe some more "cd history" You're free to invent some usefull syntax here, but maybe look atzshsyntax as a starting point. See issue a stack of the n most recent directories #33 -
challenging:
cdautocompletion should escape spaces in directory names, see issue Autocompletion doesn't escape spaces #35 I started on this, but readline API is very confusing here. If someone wants to look at it --> go ahead. I think we'll need some Stackoverflow help here. Probably not very difficult once API is clear. Don't hesitate to claim this one, if you feel like it ;-) -
challenging: program name autocompletion now is only a hack, using a predefined array of program names. This array of program names should be constructed dynamically, when booting the shell, by scanning the
$PATHvariable. -
challenging: @GijsTimmers ' ideas for smart autocompletion: correct wrong directory names, autocomplete at deeper levels, etc. To start on this one, we should have fixed the "only completing of directories" above
I think it's probably best to implement the things above and put a hold on more cd feauture requests for the moment. If you want, you can group all "future cd work" in a (single) separate issue, but probably best not in this issue. I'll also lock the other cd issues, so all discussion happens in this central issue.
Then, finally, we need developers here! The tasks above vary in difficulty, so feel free to claim one of them and open a pull request. Comment below to "claim" an item and discuss various difficulties on implementing...