Skip to content

Discussion: Use native shell autocompletion #59

Closed

Description

@aDotInTheVoid

Is your feature request related to a problem? Please describe.
Ex. I'm always frustrated when autocomplete doesnt work.

Eg:

  • touch TAB doesnt work
  • ~/pre TAB doesnt work (should expand to ~/prefix
  • ninja ins TAB completes to ninja install_manifest.txt, not ninja install
  • cd rustd TAB completes to cd rustdoc/, not cd rustdoc, where I can then specify I wanted to go to rustdoc-json, (in rustc src/test dir
  • man cla TAB doesn't comlete (zsh shows clang clang++ clang++-12 clang-12 classes.conf)

Describe the solution you'd like

I'd like to be able to deligate to the underlying shell to provide autocompletion.

Activity

  1. zachlloyd commented on Jul 23, 2021

    @zachlloyd
    Contributor

    Makes sense as a request.

    Our current approach is to try move this logic into Warp by building out our own completion grammar and library, with the rationale being:

    1. Shell autocomplete is pretty hard to configure
    2. You lose most of your completions when you go to remote boxes unless you've also configured completions on them
    3. The current shell completion specs are (in our opinion) pretty hard to write new completions for

    That said, we are missing a bunch of context right now from the shell which is making our completions worse than they should be. And we just have a number of bugs. I think we will see how far we can get without delegating to the shell, and add that as a fallback if we can't make it great.

    Thanks for the report.

  2. aDotInTheVoid commented on Jul 23, 2021

    @aDotInTheVoid
    Author

    Maybe a hybrid aproach works best, where if you know about a tool (npm, etc) you provide native support, but if not, you can delegate to the underlying shell (ninja, r2, rg etc).

    Some of the more basic stuff (starting with ~ or /, completing touch) should definatly be fixed in your layer

  3. zachlloyd commented on Jul 24, 2021

    @zachlloyd
    Contributor

    Yup, we will explore that. We actually started with an approach of delegating the shell, but it did introduce extra latency. As a fallback though it might be acceptable. Appreciate the feedback.

  4. simjnd commented on Jul 28, 2021

    @simjnd

    Is your feature request related to a problem? Please describe.
    Ex. I'm always frustrated when autocomplete doesnt work.

    Eg:

    • touch TAB doesnt work
    • ~/pre TAB doesnt work (should expand to ~/prefix
    • ninja ins TAB completes to ninja install_manifest.txt, not ninja install
    • cd rustd TAB completes to cd rustdoc/, not cd rustdoc, where I can then specify I wanted to go to rustdoc-json, (in rustc src/test dir
    • man cla TAB doesn't comlete (zsh shows clang clang++ clang++-12 clang-12 classes.conf)

    Describe the solution you'd like

    I'd like to be able to deligate to the underlying shell to provide autocompletion.

    Completion using variables is also broken, e.g. ls $HOME/Dow expands the variable and autocompletes to ls /Users/simjnd/Downloads but it doesn't work in Warp

  5. jklein24 commented on Jul 29, 2021

    @jklein24

    Throwing my +1 into the mix on this that the autocomplete issues definitely hinder my ability to use Warp as a primary driver right now. I also source an open source git_completion.sh script to get autocomplete for git branches and commands, but that doesn't seem to work with warp either. Would definitely like a fallback to native autocompletion when warp has no suggestions.

  6. maximkrouk commented on Aug 1, 2021

    @maximkrouk

    I think the lack of make autocompletion is related too.
    Otherwise I may open another feature-request to support make 🙂

  7. davecombs commented on Aug 7, 2021

    @davecombs

    While it's a beta (and pretty impressive so far - I find very little of what it actually does that I don't like a lot!), not having some sort of command completion at least for filenames working is really going to make things difficult to continue. Maybe my setup (bash) is interfering, but even just '. ~/.bash_al' doesn't do anything - no list of files, no default pick, nothing. I have no choice but to retype in the file name completely. Anybody reported anything in bash that might interfere with what you're building (so I could at least get the minimal file completion?)

  8. nesl247 commented on Aug 23, 2021

    @nesl247

    I definitely think that the shell needs to take precedence here over any autocompletion by the terminal. I have my shell configured exactly how I want it to be, with the autocomplete that I want it to have. Regardless of if I'm using Warp, iTerm2, Terminal.app, or any other terminal, I don't want to have a difference experience. The terminal should enhance the shell, not replace it.

  9. changed the title [-]Use native shell autocomplettion[/-] [+]Completions: Use native shell autocomplettion[/+] on Oct 27, 2021
  10. changed the title [-]Completions: Use native shell autocomplettion[/-] [+]Completions: Use native shell autocompletion[/+] on Nov 7, 2021
  11. ned-si commented on Nov 8, 2021

    @ned-si

    I definitely think that the shell needs to take precedence here over any autocompletion by the terminal. I have my shell configured exactly how I want it to be, with the autocomplete that I want it to have.

    +1 for this!

    Having default autocompletion included in the terminal is fine, but I think that users must have the ability to customize it exactly the way they want is very important.

    Being able to simply use what was already made at the shell level would be best, but another acceptable possibility, imo, would be to be able to customize it with a config file for Warp.

    As someone else mentioned already, this is the single thing that prevents me to daily test Warp.

  12. changed the title [-]Completions: Use native shell autocompletion[/-] [+]Discussion: Use native shell autocompletion[/+] on Nov 18, 2021
  13. locked and limited conversation to collaborators on Nov 18, 2021
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions