-
-
Notifications
You must be signed in to change notification settings - Fork 25.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sort list of git refs in most recently used (committed) order #8767
Labels
Comments
Two things should change for that:
|
Do you think it makes sense to change the default behaviour here and make a PR for these changes? If not, what is your advice on patching these files locally that are compatible with updates? |
thomaseizinger
added a commit
to thomaseizinger/ohmyzsh
that referenced
this issue
Apr 26, 2020
7 tasks
@mcornella I submitted a PR here: #8860 |
These should be pushed upstream, i.e. on the git repository. Meanwhile, you can set up a custom plugin, see adding a new plugin. cc @felipec |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Is your feature request related to a particular plugin or theme? If so, specify it.
gitfast
Is your feature request related to a problem? Please describe.
Having to exactly remember branch names is cumbersome, I would much more prefer if the result of
gco <TAB>
would list branches I (or possible someone else if remote branches are included) recently committed to.Describe the solution you'd like
Make use of the
--sort
option ofgit-for-each-ref
command to sort by committer date. (Source: https://stackoverflow.com/a/5188364/2489334) I think, the following function would need to be changed:ohmyzsh/plugins/gitfast/git-completion.bash
Lines 637 to 745 in 2a3a940
Unfortunately, I have not idea how to write completion scripts or ZSH scripts in general so I couldn't make it work. If I try to add the
--sort
argument, it just seems to be ignored. The completion values ofgco <TAB>
seem to be sorted alphabetically.Describe alternatives you've considered
Setting the
branch.sort
git config value but it doesn't seem to have an effect.Additional context
refs are sorted alphabetically:
The text was updated successfully, but these errors were encountered: