1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-01 05:16:05 +01:00
Commit graph

821 commits

Author SHA1 Message Date
Bart Schaefer
67f932e7c5 49897: Eliminate reliance on $jobstates parameter, fix -P exit status check. 2022-03-28 19:47:14 -07:00
Mikael Magnusson
28410bd5bc promptinit: only exclude current theme from preview if no arguments are given 2022-03-08 19:37:21 +01:00
Daniel Shahaf
421f5d7f67 49728: vcs_info hg mq: Don't include applied patches in the unapplied patches
For instance, with 4 applied patches, 5 unapplied patches, and no guards
involved, the patch-format style would indicate 9 (= 4+5) unapplied patches
and 4 applied patches.
2022-02-20 10:16:54 +00:00
Daniel Shahaf
80389df480 49727 (+ comment): vcs_info quilt: Pass the patches dir path to the gen-applied-string, gen-unapplied-string, and set-patch-format hooks
I use that in my gen-applied-string hook.
2022-02-20 10:16:33 +00:00
Daniel Shahaf
b8b7d9b46a unposted: vcs_info hg mg (with get-unapplied set): Stop leaking a variable to global scope 2022-02-20 10:12:56 +00:00
Marc Cornellà
2b66ed35b0 security/82: VCS_Info: Fix typo in hook_com[base-name_orig] assignment
Tweaked per discussion in security/90, security/91

(cherry picked from commit b34d33e3b3)
2022-02-12 10:29:55 -06:00
Daniel Shahaf
75c3664a62 unposted: vcs_info git: Teach the rebase-apply test case generator to also generate rebase-merge test cases 2022-01-29 16:01:39 +00:00
Daniel Shahaf
10ee9e5bd7 unposted: vcs_info git: Add a missing guard against redefining a function. 2022-01-29 16:01:39 +00:00
Daniel Shahaf
42f1e99f81 unposted: vcs_info git: Deconfuse $EDITOR
Work around <https://github.com/chrisbra/vim-zsh/issues/39>.
2022-01-29 16:01:39 +00:00
Daniel Shahaf
c055c6464d unposted: vcs_info: Add Vim modelines
... for consistency with all other vcs_info function files.
2022-01-29 16:01:39 +00:00
Daniel Shahaf
ee5e3d0c9d 49723: vcs_info quilt: Use quilt-patch-dir and ${QUILT_PATCHES} even when get-unapplied hasn't been set
This affects the post-quilt hook.  Before this patch, if no patches have
been applied and get-unapplied hasn't been set, the second argument to
that hook would undergo null elision.

The generation of patch subjects for the gen-applied-string,
gen-unapplied-string, and set-patch-format hooks was unaffected since
it was guarded by [[ -n $patches ]].
2022-01-29 11:04:44 +00:00
Daniel Shahaf
e52062170a 49722: vcs_info quilt: Refactor for readability. No functional change. 2022-01-29 11:04:43 +00:00
Daniel Shahaf
b99599b4f4 unposted: vcs_info quilt: Remove a no-op variable assignment 2022-01-27 17:34:57 +00:00
Daniel Shahaf
8460d75869 49709: vcs_info hg: Keep $HGPLAIN set for hooks if it had been set outside vcs_info
If someone does 'HGPLAIN=1 vcs_info', any vcs_info hooks should be called with
HGPLAIN set.  Declaring it 'local' broke that.
2022-01-25 10:11:58 +00:00
Matt Alexander
2876c25a28 49667: Include US spelling of "grey" ("gray")
Co-authored-by: Daniel Shahaf <d.s@daniel.shahaf.name>
2022-01-01 14:47:53 -08:00
Dimitris Apostolou
356dcb20ce github #82: Fix typos 2021-11-12 23:54:34 +01:00
Stephane Chazelas
bb61da36aa 45180: clarify doc for POSIX EREs, fix an issue with PCRE when the replacement was empty or generated more than one element 2021-09-06 14:43:01 -07:00
Marlon Richert
1508dc7486 49218: run-help filters cmd_args before calling run-help-<command> 2021-09-06 13:47:10 -07:00
Akinori MUSHA
bd328a2a9c 48942: Let EDITOR invoked by edit-command-line know it's a zsh script 2021-06-03 00:28:06 +02:00
Daniel Shahaf
a23f19bfbd 48601/0005: zmathfuncdef: Fix the workers/48147 return status / 'set -e' bug.
Not tested.
2021-05-18 02:01:13 +00:00
Marlon Richert
7383baf4cf 48853: improved handling of theme resets when changing prompt themes, especially for theme preview 2021-05-16 21:18:06 -07:00
Bart Schaefer
acd20254b5 48710: histed + other zed updates 2021-05-15 13:37:35 -07:00
Bart Schaefer
231c049c02 48707: fix keymap handling when zed invokes read-from-minibuffer; update doc 2021-05-15 13:23:31 -07:00
Daniel Shahaf
b0bd14035d 48606 + 48607 + unposted test: zmathfunc: Force arguments to be numbers and catch errors. 2021-04-21 22:05:00 +00:00
Daniel Shahaf
9353b12e99 users/26635 (tweaked): vcs_info hg: Compute the branch name correctly when get-revision is set and check-for-changes is not
Tweak: Simplify an always-true condition.

Review-by: Manuel Jacob
2021-04-21 00:57:59 +00:00
Bart Schaefer
5fdd98552d 47489: rename standout as italic 2021-04-19 14:37:32 -07:00
Aleksandr Mezin
fc82e8193b 47561 (the git and cvs parts) (compare 44919 + 44920): vcs_info internals: cvs, git: Set ${vcs_comm[basedir]} like all other backends do.
That doesn't affect anything, not even other vcs_info internals; it's
just for consistency across backends.
2021-03-29 17:03:40 +00:00
Daniel Shahaf
f87b73e677 48147/0002: zmathfunc: Fix bug where the exit code would be non-zero if the expression evaluted to zero. 2021-03-07 21:58:13 +00:00
Arseny Maslennikov
8b67c36d92 48094: apply cleanup commands of the current theme on any theme change
* Rename zstyle `cleanup' on the context `:prompt-theme' to `restore'
  everywhere but in prompt_cleanup(). It is only used as a restore
  mechanism now.
* Ensure prompt_cleanup() continues to store its command list in the
  `cleanup' style.
* Clean up before theme switch at the end of set_prompt().
* Prepend every use of prompt_*_setup (which might modify the shell
  state in ways that require cleanup) with a cleanup run.
* Adjust `prompt restore' to do both parts of the newly split restore
  mechanism, cleanup first.
2021-02-22 20:29:55 -08:00
Arseny Maslennikov
5c60ec46ec 47867: Fix RPROMPT typo in prompinit 2021-02-19 18:39:22 -06:00
Peter Stephenson
8f42ecd8ee 47873: Improve completion within dynamic directory names 2021-01-27 11:16:55 +00:00
Bart Schaefer
b374f7b318 users/26406: preserve caller setopts in zargs 2021-01-23 13:25:24 -08:00
Jun-ichi Takimoto
34eae73490 47731 (+unposted): add run-help assistant for btrfs
also fix format errors in contrib.yo
2020-12-11 17:27:47 +09:00
Samir Benmendil
f493b438fd 43946: call run-help for the command given to sudo 2020-12-11 17:20:45 +09:00
Mikael Magnusson
0bc559d091 47307: edit-command-line: restrict editing to region if it is active 2020-08-16 18:04:43 +02:00
Mikael Magnusson
841188439b 47306: edit-command-line: add editor style 2020-08-16 18:04:43 +02:00
Mikael Magnusson
d877073959 47305: edit-command-line: when possible, set $BUFFER directly
This avoids the send-break which is both visually unappealing and might
break some use cases where the user wishes to wrap edit-command-line in
another widget.
2020-08-16 18:04:43 +02:00
Daniel Shahaf
5448e1611d 47303: vcs_info hg: Fix changing the expansion of %g (hook_com[guards]) in the set-patch-format hook (regression from workers/40480).
To reproduce, go to a hg repository with active mq guards and configure
vcs_info as follows:

    zstyle '*' get-unapplied true
    zstyle ':vcs_info:*set-patch-format*' hooks f
    zstyle '*' patch-format '[%g : %G]'
    zstyle '*' nopatch-format '[%g : %G]'
    zstyle '*' formats '%m'
    +vi-f () {
    	hook_com[guards]+=XXX
    }

The regression was first released in 5.3.1-test-2, over three years ago.
2020-08-09 08:07:01 +00:00
Daniel Shahaf
0cffb0a6b3 46072 + 46136: Add the 'zle $widget -f nolast' syntax, to improve add-zle-hook-widget support for multiple hook functions.
See workers/46004 for the use-case.
2020-06-27 03:09:31 +00:00
Manuel Jacob
ae0129b49f 46091: Add code to Mercurial VCS backend to show topic if there is any.
"Topics" is an experimental concept in Mercurial that augments the
current branching concept (called "named branches").

For more information, see the not always up-to-date Mercurial Wiki page
https://www.mercurial-scm.org/wiki/TopicPlan.
2020-06-22 08:18:38 +00:00
Daniel Shahaf
2f2aa360bc 45644: vcs_info git: Fix current patch's name in several cases. 2020-03-28 22:12:33 +00:00
Daniel Shahaf
d13d6afb2e 45627: vcs_info git: Under git-am(1) conflicts, pass to the gen-applied-string hook information on already-applied patches.
The hook already receives information about the current (topmost
applied) patch and, if the get-unapplied style is set, about future
(unapplied) patches.

Tested in the Functions/VCS_Info/test-repo-git-rebase-apply scenario,
after manually converting the rebase to a «git am».  (Specifically,
I ran:
    mkdir d
    git rebase --abort
    git format-patch rebase_from_this..HEAD -o d
    git checkout rebase_onto_this
    git am d/*
.)
2020-03-27 01:14:42 +00:00
Daniel Shahaf
f207fb90d8 45625: vcs_info svn: Detect the "working copy format is too new" error. 2020-03-27 01:14:42 +00:00
Daniel Shahaf
cb87816b0f 45626: vcs_info: Deduplicate calling the set-branch-format hook. 2020-03-27 01:14:42 +00:00
Daniel Shahaf
b0d020408a 45624: vcs_info: Set $rrn in all backends. 2020-03-27 01:14:42 +00:00
Daniel Shahaf
e5765bfdc8 45541: internal: vcs_info git: Add a test case repository for rebase-apply situations 2020-03-15 00:18:31 +00:00
Daniel Shahaf
4ce4483daf 45539: vcs_info git: In non-interactive rebases, obtain applied patches' names. 2020-03-15 00:18:30 +00:00
Daniel Shahaf
e1946bacf8 45540: vcs_info git: In non-interactive rebases, compute patch names for unapplied patches. 2020-03-15 00:18:28 +00:00
Daniel Shahaf
5a1f5cf8ab 45543: vcs_info quilt: Allow quiltcommand to be a function.
Before this commit, it could only be an external command.
2020-03-15 00:18:27 +00:00
Daniel Shahaf
8e128afb2c 45547: vcs_info git: In interactive rebases, process gen-unapplied-string arguments like gen-applied-string arguments are processed.
I consider this a bugfix, since it's unexpected for -applied and
-unapplied to differ about this.
2020-03-15 00:18:25 +00:00