Skip to content

tab completion for commands not working #749

Closed

Description

@zeenix

If i type git comm in bash, I cat hit TAB and either get the command completed for me. I'm sure many others are used to taking this very much for granted from a shell. It would be awesome if nushell also supported this.

Activity

  1. sophiajt commented on Oct 1, 2019

    @sophiajt
    Contributor

    We don't yet support command-based completions, but it's on the roadmap. Right now completions we support are for completing filenames and command names, but we'd like to grow that.

  2. matu3ba commented on Oct 5, 2019

    @matu3ba

    For the config file: I think a table-like format for a user-definable view on the table could make parsing the information much easier and faster.
    You already have implemented a table view and nice filters, so that would fit quite nicely. Program shortcuts for the table views like filter and searches like htop coult be added later.

    Specifically I was thinking of something like this for program calling flags:

    flag short flag description flag description regex or type for input output format ...
    dependency flag(s) enables flag(s) deprecated (by) link

    and:

    links program version standard pulled url

    regex for input (ie flag int or flag=int or flag=filepath etc).
    Output format being string,int,file format etc.
    Also that would mean man-page and shell completion are together aside of program text with examples.
    Maybe this could be expanded for some kind of type-checks, but I am unsure how useful that could be.
    Recursive commands or circular dependencies are however more difficult to resolve and I am unsure, if they can be properly mapped to tables.

    What do you think on that? Does anything like this already exist? Where is the catch?

  3. added
    category:enhancement
    on Nov 2, 2019
  4. andrasio commented on Nov 2, 2019

    @andrasio
    Member
  5. zeenix commented on Nov 19, 2019

    @zeenix
    Author

    @andrasio Which PR this got addressed in?

  6. andrasio commented on Nov 19, 2019

    @andrasio
    Member

    @zeenix Hi! Not fixed yet, just moved over to the #900 meta issue.

  7. zeenix commented on Nov 19, 2019

    @zeenix
    Author

    @zeenix Hi! Not fixed yet, just moved over to the #900 meta issue.

    Should meta-issues just track the actual issues? Having one big issue for multiple unrelated issues, seems a bit unorthodox to me. Just my two cents. Your project, your rules. :)

  8. andrasio commented on Nov 19, 2019

    @andrasio
    Member

    @zeenix What strategy do you suggest? There are currently ~150++ opened issues. Currently referencing all issues in that meta-issue and adding them in the checkbox list.

  9. andrasio commented on Nov 19, 2019

    @andrasio
    Member

    @zeenix Also, this one is considered priority. We are going to pin the meta-issue.

  10. andrasio commented on Nov 19, 2019

    @andrasio
    Member

    @zeenix reopening them. Thanks for your valuable comments :P

  11. klausi commented on Mar 8, 2020

    @klausi

    Missing tab completion becomes most apparent when using the cd command where folder names don't autocomplete.

    So one workaround would be to use the original cd command from bash? I believe I read somewhere that you can configure the original command to be used. Unfortunately the book does not have a search function at https://www.nushell.sh/book/en/table_of_contents.html , so I can't search the book. Will open an issue for that.

  12. klausi commented on Mar 8, 2020

    @klausi

    So turns out I was just confused by the starship prompt and cd autocompletes are working. Starship does not show the full directory path if you are in a git repository path. That confused me and I thought I was in another directory. For anyone else struggling with this you can set your ~/.config/starship.toml like this to always show absolute paths at the prompt:

    [directory]
    truncation_length = 8
    truncate_to_repo = false

    See https://starship.rs/config/#directory

  13. thegedge commented on Mar 9, 2020

    @thegedge
    Contributor

    There's also #290. Perhaps we should close this issue in favour of that one?

    [EDIT]
    We're consolidating the completions effort in #290 for now. After we close off that issue, we can open (or reopen) specific issues related to completions that weren't resolved with the consolidated effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    category:enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions