Skip to content

cd (autocompletion) feature requests #51

@jovanbulck

Description

@jovanbulck

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 cd should only complete directory names, no file names. This can be tricky , since readline API sucks here, I think. This feature is probably the most useful cd enhancement 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 at zsh syntax as a starting point. See issue a stack of the n most recent directories #33

  • challenging: cd autocompletion 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 $PATH variable.

  • 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...

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions