Skip to content

Allow regular completions after git rebase .... --exec  #5236

Closed

Description

@mqudsi

@faho everything passed to git rebase after --exec is interpreted as a sequence of commands to be executed for each revision. I'm not suggesting anything too fancy here, if we could just relax the -x so that I can autocomplete --exec ./build_tools/<TAB> that would be nice.

If this requires changing everything, it might be worth just closing it as won't fix shrug.

Activity

  1. mqudsi commented on Oct 7, 2018

    @mqudsi
    ContributorAuthor

    (Similarly, I believe any git command treats any parameters after -- as a filename and nothing else, I don't know if each case where file names are supported in some arcane use cases are handled by the current completions, but if there is some way to globally revert to file-based completions after -- is encountered, I think that would be a nice win.)

  2. faho commented on Oct 8, 2018

    @faho
    Member

    if we could just relax the -x so that I can autocomplete --exec ./build_tools/ that would be nice.

    Yeah, that's probably alright. This actually takes script for $SHELL, but we can't necessarily complete that. If it's fish we could, but there'd be some weirdness with quoting....

    This is an enhancement because we don't currently have --exec as an option.

  3. faho commented on Oct 8, 2018

    @faho
    Member

    Similarly, I believe any git command treats any parameters after -- as a filename and nothing else

    As always with git, it's not quite that simple. We've added some of this - reset has:

    # reset can either undo changes to versioned modified files,
    # or remove files from the staging area.
    # Deleted files seem to need a "--" separator.
    complete -f -c git -n '__fish_git_using_command reset; and not contains -- -- (commandline -op)' -a '(__fish_git_files all-staged modified)'
    complete -f -c git -n '__fish_git_using_command reset; and contains -- -- (commandline -op)' -a '(__fish_git_files all-staged deleted modified)'
    complete -f -c git -n '__fish_git_using_command reset; and not contains -- -- (commandline -op)' -a '(__fish_git_reflog)' -d 'Reflog'

    Yes, deleted files are only valid after --.

  4. added this to the fish-3.0 milestone on Oct 8, 2018
  5. added a commit that references this issue on Nov 24, 2018
    c5cecd3
  6. locked as resolved and limited conversation to collaborators on Apr 17, 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

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions