1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-02 10:01:11 +02:00
Commit graph

212 commits

Author SHA1 Message Date
Takeshi Banse
ab917d4a0e 32502: fix typo in argument list for git completio 2014-03-21 19:42:02 +00:00
Oliver Kiddle
079540cc78 users/18485: add .. as an auto-removable suffix in git revision ranges 2014-02-25 08:59:20 +01:00
m0viefreak
b97808fba2 32398: _git: completion updates up to latest git v1.9.0
- cherry-pick: allow commit ranges to be specified
- push: option is called --set-upstream and not --set-upstream-to
- status: offer -b,--branch when --porcelain or -z are given
  --porcelain and -z don't show the branch info by default, so it
  is needed to offer --branch for those options, too.
- checkout: add '--detach' option
- checkout: offer '-l' option when '--orphan' was given
- show-ref: update wording of --head and --heads according to man-page
- config: update default value for color.ui
  color-bool was changed to accept a default value as $parts[5]
- add support for 'cygstart' as a valid builtin browser on cygwin
- rebase: add suuport for --autostash and config.autostash
- update builtin browser list
- grep: add --{no,}textconv
- check-ignore: add --no-index
- update-ref: add --stdin -z
- add -C
- pull: add support for --rebase=preserve
- config: add support for http.*. options
- blame: -L can be given multiple times
- config: add support for http.savecookies
- push: add support for --force-with-lease
- diff: --diff-filter: allow lower-case variants (all-but ... specs)
- config: add support for 'fetch.prune' and 'remote.*.prune'
- check-ignore: -z: update message, check-attr: add -z
- config: add diff.orderfile
- revision options: add --exclude
- revision options: add --ignore-missing
- revision options: add --bisect
- rev-parse: add --stuck-long
- merge-base: add --fork-point
- config: implement submodule.*.update completion
- send-email: add --smtp-ssl-cert-path and config options
2014-02-18 12:22:21 +01:00
m0viefreak
f8e874ef9d 32397: _git: fix __git_submodules to only use the actual name of the submodule
The output of 'submodule status' is

Xsha1 name (describe)

X being one of -,+,U,[space]

We are only interested in the name part and not the whole line.

Fix the parameter expansions accordingly.
2014-02-18 12:22:21 +01:00
m0viefreak
139ee0e351 32395: _git: diff: refactor and fix wrong completions
Before this, there were several cases where the completion
would offer the wrong things:

$ git diff branch -- <tab>

would try to complete "changed in workdir files", but needs to
complete all "tree files in HEAD".

$ git diff --cached -- file1 file2 <tab>
would try to complete "changed in workdir files" but needs to
complete "changed in index files".

...

After this change all possible combinations are taken into
account and completion should work properly.
2014-02-18 12:22:16 +01:00
m0viefreak
946a99a0b3 32396: _git: fix __git_committish_range_{first,last} and __git_is_committish_range
- Ranges with 3 dots would always fail, because the non-greedy
  expansion  %..(.|)* in __git_committish_range_first would only
  remove '..' and never three dots. 'a...b' would end up in 'a.'.
  Use ${${1%..*}%.} instead.
- Use a similar approach for __git_committish_range_last.
- Wrap them in another expansion to replace empty results with 'HEAD'.
  Git man-page states omitted range ending are being replaced with
  HEAD. This rule has to be followed to make completions like
  'git log foo.. -- <tab>' work properly.
- Add an additional check to make sure none of the extracted first/last
  parts contain additional '..' in invalied ranges such as 'a..b..c'.
  This gets rid of the 'TODO:' and ideally saves a few unneded
  calls to git rev-parse.
2014-02-18 12:19:23 +01:00
Barton E. Schaefer
a2098b0b26 users/18368: compromise to restore partial path completion inadvertently removed by 31159 2014-01-27 21:54:13 -08:00
Hong Xu
567b494033 32069: completion for "git submodule update --remote" 2013-11-30 12:46:19 -08:00
Peter Stephenson
4163ebf4c7 unposted, see 32054: Rationalise character encoding.
Shell functions are strictly ASCII for maximum portability.

Other files within the distribution may contain UTF-8 characters.

Exception for test files: where they need single character input
with the top bit set, ISO-8859-X is used (X doesn't matter as
we don't need the Euro).
2013-11-27 15:56:44 +00:00
Øystein Walle
95a5ca90d9 31865: _git: Make --batch(-check) accept an argument
Also reword the explanation slightly to make it more compact since more
explanation is needed.
2013-10-21 17:40:13 +02:00
Øystein Walle
3d77fa789d 31864: _git: Add two sub-comamnds introduced in v1.8.4
Add _git-check-ignore() and _git-check-mailmap()
2013-10-21 17:40:12 +02:00
Øystein Walle
32ffba1214 31866: _git: Reword --heads to match new meaning 2013-10-21 17:40:09 +02:00
Øystein Walle
baee0a2295 31862: _git: Add status.short and status.branch 2013-10-21 17:40:07 +02:00
Øystein Walle
805b665901 31863: _git: Add new arguments introduced in Git v1.8.4 2013-10-21 17:40:03 +02:00
Øystein Walle
e91d90125b 31861: _git: Add git-clean -i/--interactive support
- Add -i and --interactive to _git-clean()
 - Add column.clean configuration variable
2013-10-21 17:40:01 +02:00
m0viefreak
7a37568b8c 31855: _git: revert: add '-e,--edit' 2013-10-21 17:39:59 +02:00
m0viefreak
2c1affc6c1 31856: _git: fix a few "undocumented" options
commit: '--null' is documented
relink: '-h,--help' are never documented for subcommands but always exist
verify-tag: '-v,--verbose' are documented with updated description
diff: '--cumulative' is deprecated -> remove
2013-10-21 17:39:57 +02:00
Øystein Walle
07ca60acf4 31858: _git: fix wrong default value 2013-10-21 17:39:56 +02:00
m0viefreak
80cb8e947f 31857: _git: Remove unsupported -q option from diff options 2013-10-21 17:39:53 +02:00
Øystein Walle
5585b95f3c 31859: _git: re-order the last two git-blame arguments
The proper syntax is git blame [<commit>] <file> where <commit> is optional.
2013-10-21 17:39:50 +02:00
Øystein Walle
7872a5becd 31854: _git: Make git-show accept diff arguments 2013-10-21 17:39:48 +02:00
Øystein Walle
34ba14e1ec 31853: _git: Add missing column.* config variables 2013-10-21 17:39:46 +02:00
m0viefreak
8a70a98577 31754: _git: git rm: make git rm --cached work as intended
While limiting the completion to __git_changed-in-index_files
makes perfect sense for "git diff", it is wrong to use for
"git rm", because it prevents it from completing files present in
HEAD. Giving --cached to git rm is supposed to
"just remove it from the index, keep the working tree copy"
and is in no way related to the file needing to be
modified in the index in the first place.
2013-09-22 14:01:16 +02:00
Øystein Walle
2025b05bcf 31752: _git: change completion text for consistency 2013-09-22 14:01:15 +02:00
m0viefreak
128de883bd 31753: _git: correct some "undocumented" options
diff options:
  --cumulative is deprecated --> remove
  -G / -S: reword -S to emphase the difference to -G

revision options:
  --abbrev: reword, to emphase the --abbrev-commit requirement
2013-09-22 14:01:15 +02:00
Øystein Walle
cf0eae5d96 31751: _git: remove TODOs of actually documented options
No functional changes.
2013-09-22 14:01:14 +02:00
Øystein Walle
ab05a3d6d4 31749: _git: fix some typos in description texts 2013-09-22 14:01:13 +02:00
m0viefreak
735e7becb9 31748: _git: support completing remote branches without <remote>/ prefix
this is used in git 1.8's
git checkout <branch>
as a shorthand for
git checkout -b <branch> --track <remote>/<branch>
in case <branch> exists on exactly one remote and is not a local branch
2013-09-22 14:01:12 +02:00
m0viefreak
e45f685d4a 31746: _git: reword _git-config TODO
Support for merge drivers, filter drivers, and diff drivers is
missing.
2013-09-22 14:01:12 +02:00
Øystein Walle
5ec6a1510a 31750: _git: add new configuration options to match latest git v1.8.3 2013-09-22 14:01:11 +02:00
Øystein Walle
6c4c11929c 31747: _git: completion updates to match latest git v1.8.3 part 2 2013-09-22 14:01:10 +02:00
m0viefreak
f20ba1a51e 31755: _git: completion updates to match latest git v1.8.3 2013-09-22 14:01:09 +02:00
m0viefreak
06d58592ab 31745: _git: correctly use __git_guard_number in some cases
The space is relevant to make the help text work as intended.
2013-09-22 14:01:08 +02:00
m0viefreak
ef4157fac4 31744: _git: make git submodule <cmd> completion work
The -A parameter in the main completion stopped completion
in the subcommands from working. Remove it.
2013-09-22 14:01:08 +02:00
m0viefreak
2813d8aa98 31743: _git: fix usage of ->int: for some entries in _git-config 2013-09-22 14:01:07 +02:00
m0viefreak
5f427b8245 31741: _git: fix a wrong variable in __git_config_values
This probably was a copy/paste mistake.
2013-09-22 14:01:06 +02:00
Luka Perkov
075ad840d6 31726: _git: add few more arguments for cherry-pick and revert
Signed-off-by: Luka Perkov <luka@openwrt.org>
2013-09-14 11:21:34 +02:00
Luka Perkov
c721356646 31708: _git: add --fixup and --squash options to commit
Signed-off-by: Luka Perkov <luka@openwrt.org>
2013-09-07 10:09:11 +02:00
Luka Perkov
a4245da999 31702: check for git rebase -i for autosquash 2013-09-06 21:48:00 +01:00
Ramkumar Ramachandra
2ea9cd4775 31288: _git: fix shortlog completer
Currently, __git-shortlog () says that 'git shortlog' can only accept
commits as arguments (probably because the official documentation says
this).  This is entirely untrue: shortlog can accept
commit-range-or-file, just like log can.  Fix the completer by copying
out segments from the __git-log () function.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
2013-04-25 14:36:08 +02:00
Ramkumar Ramachandra
cbdedcfbfe 31289: _git: branch.*.pushremote, remote.pushdefault
The configuration variables branch.*.pushremote and remote.pushdefault
are relatively new, and are currently not completed by ZSH.  Fix this.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
2013-04-21 12:12:44 +02:00
Ramkumar Ramachandra
d1a3075293 31286: _git: add a couple of browsers
Add google-chrome/chromium to the list of builtinbrowsers in
__git_browsers ().

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
2013-04-21 12:12:43 +02:00
Torstein Hegge
cc7437bf2f 31159: git: Pass prefix filter to ls-files even if it matches no files
When a branch or tag name is completed with zsh in a large git repo, the
completion is slow if the given prefix doesn't match a file or directory in
the current working directory. Testing with linux.git, which contains release
tags like v3.9 and a directory virt/:

  git log v<tab>

takes about 0.5 seconds, while

  git log v3<tab>

takes about 25 seconds.

(Timed using zsh 4.3.17, on a fairly slow cpu. zsh from git appears to be
quite a bit faster, but the difference between completing v and v3 is still
large.)

The difference between the two is that v<tab> passes the result of v* to git
ls-files while v3<tab> determines that v3* matches no files, and passes an
empty prefix to git ls-files. So git ls-files lists all files in the repo
and passes that on to _multi_parts.

Making git do the expansion of the * after the prefix lets git ls-files v3*
return an empty list, making _multi_parts job easier.

This does not affect the behavior of git log <tab>, but improves the
performance of partial tag and branch tab-completion in the common case where
file names and tag/branch names don't overlap.
2013-04-20 22:29:02 +02:00
Frank Terbeck
abb32da0e7 31221: Handle zero defined aliases better 2013-04-05 20:19:33 +02:00
Oliver Kiddle
ce658b3c3c Benjamin R. Haskell: 30737: make custom completions for git aliases easier 2012-11-07 21:23:06 +00:00
Oliver Kiddle
a8ffff2cb7 users/17382: complete URLs for vim and make _remote_files more
consistent with _files
2012-11-07 20:59:09 +00:00
Mikael Magnusson
43ddb73297 unposted: fix a typo in _git from previous commit (reolved) 2012-03-06 16:38:25 +00:00
Clint Adams
45090b19df 30317: complete git merge --ff-only 2012-03-06 02:36:12 +00:00
Oliver Kiddle
c5fce37bce 30199: add (-.) to many completion _files globs 2012-02-10 17:09:05 +00:00
Mikael Magnusson
02dc5c681e 29998: _git: fix a typo (--rerbose). 2011-12-13 19:28:19 +00:00