summaryrefslogtreecommitdiff
path: root/Functions
AgeCommit message (Collapse)AuthorFilesLines
2022-12-0951144, 51146: vcs_info git: stg: Extract patch descriptionsDaniel Shahaf1-2/+2
Joint work with Peter Grayson.
2022-12-0851142: vcs_info git: Check the get-unapplied style as documentedDaniel Shahaf1-2/+6
The style was treated as "always true" rather than as "settable, false by default" in the rebase-merge and cherry-pick cases. This affects the gen-unapplied-string hook, and may also affect gen-applied-string and set-patch-format hooks if they accessed VCS_INFO_get_data_git's internal parameters directly. If this affects you, just set the style in your zshrc: . zstyle ':vcs_info:git*:*:*' get-unapplied true
2022-12-0851138: Updated StGit patch detection in vcs_infoPeter Grayson1-9/+27
The vcs_info patch detection code attempted to interrogate StGit patch stack state by inspecting .git/patches/applied and .git/patches/unapplied. As of StGit 0.15 (2009), patch stack metadata is captured in the repo's object database. And as of StGit 1.0 (2021), no stack or patch state is maintained in any files in the .git/ directory. Zsh's approach for interrogating StGit patch state is thus obsoleted. This patch updates vcs_info to determine whether StGit is initialized on a branch by looking at the appropriate git refs and uses StGit's prescribed interface for interrogating applied and unapplied patch state via the `stg series` command. This approach will work with all versions of StGit >=0.15. Signed-off-by: Peter Grayson <pete@jpgrayson.net>
2022-12-0651088: fix standards reference in commentAtte Peltomäki1-1/+1
2022-10-1750786: Make match etc. local when used in styles.Peter Stephenson1-2/+2
Avoids side effects of add-zle-hook-widget.
2022-09-2550648: Use $ZCALC_HISTORY where appropriateJulian Prein1-1/+3
2022-06-0850335: simplify "wait" usage, fix signal handlingBart Schaefer1-10/+30
- remove the preliminary "wait" for all the process - remove "nomonitor" (because it was only needed for that "wait") - explicitly adds traps to exit for tty-generated signals plus TERM - capture the signal trap context and restore it in background jobs - wrap in an "always" block to clean up local helper functions - update comments to note another buglet and drop support for zsh 4.x.
2022-06-0450323: create helper for shadowing builtins or existing functions and use it ↵Bart Schaefer1-1/+2
when redefining compadd et al.
2022-05-2650286: avoid zed error if nounset is in effectPeter Stephenson1-6/+8
2022-05-14Jan Brieg: 50212 (and discussion): Add "bright" color variantsBart Schaefer1-2/+16
2022-03-2849897: Eliminate reliance on $jobstates parameter, fix -P exit status check.Bart Schaefer1-17/+20
2022-03-08promptinit: only exclude current theme from preview if no arguments are givenMikael Magnusson1-3/+2
2022-02-2049728: vcs_info hg mq: Don't include applied patches in the unapplied patchesDaniel Shahaf1-0/+3
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-2049727 (+ comment): vcs_info quilt: Pass the patches dir path to the ↵Daniel Shahaf4-4/+15
gen-applied-string, gen-unapplied-string, and set-patch-format hooks I use that in my gen-applied-string hook.
2022-02-20unposted: vcs_info hg mg (with get-unapplied set): Stop leaking a variable ↵Daniel Shahaf1-1/+1
to global scope
2022-02-12security/82: VCS_Info: Fix typo in hook_com[base-name_orig] assignmentMarc Cornellà1-1/+1
Tweaked per discussion in security/90, security/91 (cherry picked from commit b34d33e3b3c5ae30e8315111f07634c1e7507531)
2022-01-29unposted: vcs_info git: Teach the rebase-apply test case generator to also ↵Daniel Shahaf2-1/+12
generate rebase-merge test cases
2022-01-29unposted: vcs_info git: Add a missing guard against redefining a function.Daniel Shahaf1-0/+1
2022-01-29unposted: vcs_info git: Deconfuse $EDITORDaniel Shahaf1-2/+2
Work around <https://github.com/chrisbra/vim-zsh/issues/39>.
2022-01-29unposted: vcs_info: Add Vim modelinesDaniel Shahaf3-0/+6
... for consistency with all other vcs_info function files.
2022-01-2949723: vcs_info quilt: Use quilt-patch-dir and ${QUILT_PATCHES} even when ↵Daniel Shahaf1-21/+24
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-2949722: vcs_info quilt: Refactor for readability. No functional change.Daniel Shahaf1-6/+7
2022-01-27unposted: vcs_info quilt: Remove a no-op variable assignmentDaniel Shahaf1-1/+0
2022-01-2549709: vcs_info hg: Keep $HGPLAIN set for hooks if it had been set outside ↵Daniel Shahaf1-1/+0
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-0149667: Include US spelling of "grey" ("gray")Matt Alexander1-3/+5
Co-authored-by: Daniel Shahaf <d.s@daniel.shahaf.name>
2021-11-12github #82: Fix typosDimitris Apostolou3-3/+3
2021-09-0645180: clarify doc for POSIX EREs, fix an issue with PCRE when the ↵Stephane Chazelas2-31/+86
replacement was empty or generated more than one element
2021-09-0649218: run-help filters cmd_args before calling run-help-<command>Marlon Richert7-26/+13
2021-06-0348942: Let EDITOR invoked by edit-command-line know it's a zsh scriptAkinori MUSHA1-0/+1
2021-05-1848601/0005: zmathfuncdef: Fix the workers/48147 return status / 'set -e' bug.Daniel Shahaf1-1/+1
Not tested.
2021-05-1648853: improved handling of theme resets when changing prompt themes, ↵Marlon Richert1-94/+71
especially for theme preview
2021-05-1548710: histed + other zed updatesBart Schaefer1-13/+49
2021-05-1548707: fix keymap handling when zed invokes read-from-minibuffer; update docBart Schaefer1-5/+22
2021-04-2148606 + 48607 + unposted test: zmathfunc: Force arguments to be numbers and ↵Daniel Shahaf1-3/+13
catch errors.
2021-04-21users/26635 (tweaked): vcs_info hg: Compute the branch name correctly when ↵Daniel Shahaf1-3/+3
get-revision is set and check-for-changes is not Tweak: Simplify an always-true condition. Review-by: Manuel Jacob
2021-04-1947489: rename standout as italicBart Schaefer1-1/+2
2021-03-2947561 (the git and cvs parts) (compare 44919 + 44920): vcs_info internals: ↵Aleksandr Mezin4-13/+18
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-0748147/0002: zmathfunc: Fix bug where the exit code would be non-zero if the ↵Daniel Shahaf1-2/+8
expression evaluted to zero.
2021-02-2248094: apply cleanup commands of the current theme on any theme changeArseny Maslennikov2-19/+36
* 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-1947867: Fix RPROMPT typo in prompinitArseny Maslennikov1-2/+2
2021-01-2747873: Improve completion within dynamic directory namesPeter Stephenson1-1/+3
2021-01-23users/26406: preserve caller setopts in zargsBart Schaefer1-2/+15
2020-12-1147731 (+unposted): add run-help assistant for btrfsJun-ichi Takimoto1-0/+22
also fix format errors in contrib.yo
2020-12-1143946: call run-help for the command given to sudoSamir Benmendil1-1/+1
2020-08-1647307: edit-command-line: restrict editing to region if it is activeMikael Magnusson1-7/+29
2020-08-1647306: edit-command-line: add editor styleMikael Magnusson1-2/+6
2020-08-1647305: edit-command-line: when possible, set $BUFFER directlyMikael Magnusson1-4/+23
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-0947303: vcs_info hg: Fix changing the expansion of %g (hook_com[guards]) in ↵Daniel Shahaf2-4/+10
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-06-2746072 + 46136: Add the 'zle $widget -f nolast' syntax, to improve ↵Daniel Shahaf1-2/+2
add-zle-hook-widget support for multiple hook functions. See workers/46004 for the use-case.
2020-06-2246091: Add code to Mercurial VCS backend to show topic if there is any.Manuel Jacob1-1/+10
"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.