1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-07 23:51:14 +02:00
Commit graph

1427 commits

Author SHA1 Message Date
Daniel Hahler
ed3e5f521d Completion/Unix/Command/_git: remove -2 with __git_recent_commits
Remove "-2" for _describe in __git_recent_commits.

This fixes the duplicate entries issue, because __git_recent_commits
gets called twice for _git-checkout (for __git_revisions and
__git_tree_ishs):

1. __git_commit_objects_prefer_recent _alternative __git_commits
   __git_revisions _alternative _git-checkout
2. __git_commit_objects_prefer_recent _alternative __git_commits
   __git_tree_ishs _alternative _git-checkout
2015-05-19 07:49:48 +02:00
Daniel Hahler
d0057538d3 35204: fix broken __git_recent_commits from previous commit
This fixes 1e7bb4a: newlines need to be kept (from the "%d" part).
2015-05-19 06:38:43 +02:00
Daniel Hahler
1e7bb4a8f8 35164: fix __git_commit_objects/__git_recent_commits
$pipestatus for `: foo` is 0 always.

Without this, "git checkout" in a non-git directory would complete " ",
but not result in a note/error about not being in a git dir.
2015-05-19 05:42:21 +02:00
Daniel Shahaf
6bfe6fd84b users/20222: completion: git: Add matchspec for heads
Allows 'git checkout o/m<TAB>' to complete 'origin/master'.

Moreover, '/x<TAB>' would complete 'foo/bar/xyzzy/baz', since the matchspec
uses not '*' but '**'.
2015-05-19 01:55:15 +00:00
Peter Stephenson
2caa5ddd79 35187: unbalanced parentheses in _vim 2015-05-18 12:46:33 +01:00
Peter Stephenson
52aeb9aaeb 35168: Improve parsing of case patterns.
"|" is now found properly by looking for words that come
from the lexical analyser, rather than hacking a pattern
returned in one dollop.

Update some completion functions that need extra quoting
as a result.

Add test for new parsing.

Update version number to 5.0.8-dev-3 because of wordcode
incompatibility.
2015-05-18 09:56:00 +01:00
Daniel Shahaf
34a1489f43 35105: completion: git: add distance_from_head to __git_recent_commits
This adds the "HEAD~15" gitrevisions(7) identifier of the commit to the
description, which also uniquifies, isn't redundant, and may be easier
to type.

Ref: zsh-workers/34820 (http://www.zsh.org/mla/workers/2015/msg00744.html)
2015-05-18 02:48:03 +02:00
Daniel Hahler
733db1b411 35106: completion: git: unique name for __git_recent_commits
This helps to distinguish it from __git_commit_objects.
2015-05-18 02:48:03 +02:00
Daniel Hahler
a0b221e7c5 35103: completion: git: add %cr to commit objects (all and recent) 2015-05-18 02:48:03 +02:00
Daniel Hahler
94c6b32fe7 35104: completion: git: __git_commit_objects: query 1000 commits
Also, `--all` and `--reflog` is used to get all commits.

It adds the _guard in front, so only non-empty values will come here.
Also, __git_commit_objects_prefer_recent will only call it, if there are
no matching recent commits.
2015-05-18 02:48:03 +02:00
Daniel Hahler
454f079852 35101: completion: git: add __git_commit_objects_prefer_recent
This is used with __git_commits then, and is meant to only call
__git_recent_commits, if there are matches.
2015-05-18 02:48:03 +02:00
Daniel Hahler
1d5b225498 35100: __git_recent_commits: massage ' ->*' from heads
Handle " -> master, origin/master" in decorated git-log output, and add
it as separate entries.
2015-05-18 02:48:03 +02:00
Daniel Hahler
895408bb81 completion: git: add missing return to __git_recent_commits 2015-05-17 19:54:15 +02:00
Daniel Shahaf
7990cf983e 35161: completion: git: Fix typo in 35061 2015-05-16 22:57:22 +00:00
Oliver Kiddle
32a448dc25 users/20219: fix completion for git options 2015-05-15 18:04:40 +02:00
Daniel Hahler
968c5ceaa7 35062: __git_setup_revision_options includes __git_setup_diff_options 2015-05-14 19:03:21 +02:00
Daniel Hahler
a1c1f6828c 35061: add __git_setup_diff_stage_options and use it with _git-diff-files and _git-diff explicitly 2015-05-14 19:00:32 +02:00
Daniel Hahler
fec4e7243b 35016: introduce new pretty formats %g[sdD] for reflog information 2015-05-14 18:56:23 +02:00
Christian Hesse
29fdde5fb7 35107: new ip options to complete 2015-05-13 19:34:21 +01:00
Daniel Hahler
b884853756 35060 + 35072: completion: git: split __git_heads into local and remote
It is useful to have this distinction visually.

This also uses `--format=%(refname:short)` directly with `git
for-each-ref`.
2015-05-12 00:59:07 +00:00
Oliver Kiddle
5b7e50dcd0 35049: allow jail completion to include jid 0 for the host and to
complete jails by any parameter
2015-05-11 12:11:32 +02:00
Daniel Shahaf
949d186d6c 35066: Minor completion fix for pasted arguments 2015-05-09 15:13:43 +00:00
Oliver Kiddle
ab7ec8d985 35011: update completions for some common Unix commands,
in particular improving FreeBSD support
2015-05-03 16:53:57 +02:00
Peter Stephenson
8b4c46fb3f 34980: in completion match new Makefile assignment forms 2015-04-28 09:27:37 +01:00
Barton E. Schaefer
fd574101a9 34961: avoid _message because it aborts completer list too early 2015-04-25 11:07:14 -07:00
Daniel Hahler
156327023c 34899: completion: _vim: add nvim to #compdef
nvim is used by NeoVim and is fairly compatible.
2015-04-17 13:36:30 +00:00
Daniel Shahaf
122bb9a125 34886: completion: git: Complete rebase --exec argument 2015-04-13 21:01:45 +00:00
Daniel Shahaf
7793ebcb71 34885: completion: git: Sort "commit object" completions most recent first 2015-04-13 20:59:19 +00:00
Daniel Shahaf
7929dd8cba 34885: completion: git: Fix another instance of the 34671 bug fixed in 34814 2015-04-13 20:59:02 +00:00
Clint Adams
b3d32115f8 34874: completion for cabal 2015-04-10 19:31:33 -04:00
Daniel Hahler
ca8edaba92 34748: completion: git: update list of builtintools 2015-04-10 16:24:42 +00:00
Daniel Shahaf
727533088a 34814: completion: git: Fix bug introduced by 236da69
Based on a patch by Daniel Hahler <git@thequod.de>.
2015-04-01 09:44:26 +00:00
Peter Stephenson
3ef734ca72 users/20058: improve device completion in ip completion.
We were too eager to regard strings already on the command line
as possible devices.
2015-03-31 20:10:08 +01:00
Daniel Hahler
0b79922edb 34762: completion: git: add short option for '--dir-diff' (_git-difftool) 2015-03-29 05:52:44 +00:00
Daniel Shahaf
e176eff554 34739: git completion: Fix regression in ce80a92
This restores the message when completing a commit object name that
isn't one of the most recent 20 commits.  e.g., 'git checkout deadbeef<TAB>'.
2015-03-19 06:51:32 +00:00
Daniel Shahaf
236da69842 34671 plus tweaks: Add -1 -2 -J -V -x to _describe, use them to sort 'git --fixup' hash completions 2015-03-16 09:27:06 +00:00
Daniel Shahaf
097dedf9ab 34671: git completion: only offer recent commits' tags/heads for --fixup 2015-03-16 09:25:39 +00:00
Daniel Shahaf
69ada95acd 34693: sudo completion: Don't false positive 'sudo -e' detection 2015-03-09 20:01:09 +00:00
Daniel Hahler
ce80a925d6 34638 with tweaks: git completion: complete commit hashes and --fixup 2015-03-07 03:56:48 +00:00
Daniel Shahaf
49776e807f 34588: Complete 'usermod -a' 2015-02-27 17:21:11 +00:00
Daniel Hahler
7d15b9a9cb 34468: completion: git: stash: handle 'save' being the default
"git stash" should complete arguments for "git stash save", but without
the message part.
2015-02-08 20:27:26 +01:00
Daniel Hahler
8f403ab25c 34467: completion: git: minor doc fixes
I am not sure about the deprecation of user-commands, but from other
places in the doc and commit history this deprecation was meant to be
reverted?!
2015-02-08 20:27:25 +01:00
Daniel Hahler
28d520bc21 34470: completion: adb: add "sideload" command
btw: there is another compdef available for `adb` from
zsh-users/zsh-completion; see
https://github.com/zsh-users/zsh-completions/issues/291.
2015-02-08 20:27:25 +01:00
Daniel Hahler
ffaf99288f 34469: git completion: add "stash" from refs/stash to __git_heads 2015-02-08 20:27:25 +01:00
Daniel Shahaf
860ef4e125 34464: Update mtr completion to mtr 0.82 2015-02-07 22:28:03 +00:00
Daniel Shahaf
a5333cc344 34444: git completion: minor improvements
- 'git rebase': complete arguments in the same word as the option

- 'git commit': provide message for --fixup/--squash
2015-02-02 15:32:59 +00:00
Daniel Shahaf
061dc888d3 34411: _hg completion: Complete bookmark names for -r
While there, simplify `hg tags` parsing.
2015-02-01 11:36:02 +00:00
Peter Stephenson
1c942291f8 34435: Update emulate completion.
Add new feature to run command in emulation.

Factor out handling of quoted command string to new function.
2015-01-30 16:24:20 +00:00
Jun-ichi Takimoto
1faf2888e9 34415: cache list of all python modules 2015-01-28 23:58:23 +09:00
Jun-ichi Takimoto
f591458321 34423: fix a typo in _ruby 2015-01-28 23:19:48 +09:00