Skip to content

tab completion with combiners #2025

Closed
Closed

Description

@wprater

currently there is no tab completion support while using combiners cd foo ;and cmd <wants completion>

Activity

  1. ridiculousfish commented on Apr 12, 2015

    @ridiculousfish
    Member

    I wasn't able to reproduce this. I tried cd foo; and grep --<tab> and saw grep completions. What version of fish are you testing on, on what OS? Can you give steps to reproduce?

  2. wprater commented on Apr 12, 2015

    @wprater
    Author

    its was with git commands. should have used that example. git checkout dev-wprater ;and git checkout <tab> should list branches (lists dir contents) and git checkout dev-wprater ;and git ch<tab> should suggest checkout

    version 2.1.2 on OS X.

  3. added this to the next-major milestone on Apr 12, 2015
  4. ridiculousfish commented on Apr 12, 2015

    @ridiculousfish
    Member

    Thanks. It may be a bug in the commandline builtin.

  5. JelteF commented on May 8, 2015

    @JelteF
    Contributor

    The same is the case for the service command, so it could very well be a bug in the commandline builtin. It probably counts and and or as commands as well.

  6. zanchey commented on May 26, 2015

    @zanchey
    Member

    commandline -opc in these instances returns and git.

  7. faho commented on Aug 5, 2015

    @faho
    Member

    I can reproduce it with git in current master, but not with #2145, so a change there seems to have affected it.

  8. faho commented on Aug 17, 2015

    @faho
    Member

    Okay, the line that should cause this issue:

    if [ (count $cmd) -eq 1 -a $cmd[1] = 'git' ] 

    It re-checks that the command is really git - which is stupid since fish is already certain it's git since it looked up the git completions. This should also break wrappers (e.g. "hub").

    Just removing it (which I've done in #2145) is the correct solution and should be done for every single completion script that uses it.

  9. faho commented on Aug 17, 2015

    @faho
    Member

    Of course the proper solution would be to actually check if it has a command instead of just looking up commandline-length (i.e. not __fish_seen_subcommand_from $commands).

  10. added a commit that references this issue on Aug 17, 2015
  11. faho commented on Aug 17, 2015

    @faho
    Member

    I've pushed the simple solution in 5e555fc as I'm uncomfortable with touching completions I can't test (like brew) beyond the minimum.

    I believe this is now fixed (except for git, which is in #2145). If anyone pushes a completion that breaks it, please yell as loud as you can (get a megaphone or something).

  12. modified the milestones: , next-major on Aug 28, 2015
  13. added a commit that references this issue on Sep 8, 2015
  14. locked as resolved and limited conversation to collaborators on Apr 18, 2020
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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions