1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-05-09 00:56:17 +02:00
Commit Graph

847 Commits

Author SHA1 Message Date
midchildan 36a2d5cfa4 52641: incarg: add a backward variant and make it repeatable 2024-03-05 00:05:21 +01:00
Mikael Magnusson 74722b8d4e 52546: incarg: avoid unneeded subshell 2024-02-16 13:17:26 +01:00
midchildan fb9a7cc5dd 52520: add new features and improvements to the "incarg" ZLE widget
- Decrement integers without defining a new widget
- Preserve the number of leading zeros
- Increment binaries, octals, and hexadecimals
- Move the cursor to the end of the incremented integer
- Create a sequence of integers across terminal panes
- Add a Vim variant
- Also add tests
2024-02-15 15:40:37 +01:00
Bart Schaefer 2744208ab3 unposted: elaboration on Roman's "slurp" implementation from zsh-users 2024-02-03 20:10:52 -08:00
Bart Schaefer d6e4ddd4d4 52465: use NULL_GLOB when expanding zmv input pattern to avoid NOMATCH exit 2024-01-05 20:38:58 -08:00
Sebastian Gniazdowski 02a99863b0 52145: Prompt theme with current time and abbreviated VCS_info. 2023-11-29 15:28:56 -08:00
Sebastian Gniazdowski d86cc841f7 52240: use work-var $s not $suffix when setting flags 2023-10-26 13:41:03 -07:00
Oliver Kiddle a920e368b8 unposted (cf. 52166): remove obsolete helper for svk 2023-10-11 00:38:46 +02:00
Jörg Sommer 60479a7a18 51812: run-help for docker, perf, podman, ssh, svnadmin 2023-10-11 00:38:32 +02:00
Jörg Sommer 9eb2b04703 51747: ip accepts the reduction of link to l. 2023-09-21 00:09:36 +02:00
Jörg Sommer f093b41f09 51776: run-help-openssl: Reduce code and use new manpages
Openssl switches the naming of manpages to the common style
openssl-$SUBCOMMAND, e.g. openssl-enc. For backward compatibility try to
show the manpage with the old name if the new one doesn't exist.
2023-09-21 00:03:59 +02:00
Christoffer Lundell f72757ccf3 52082: Enable linewise edit-command when in visual-line mode. 2023-09-16 20:06:12 -07:00
Bart Schaefer 2a854aae48 52028: improvements to _shadow / _unshadow, plus helper and doc 2023-08-27 15:22:14 -07:00
Stephane Chazelas 4f6a1b3717 51813: differentiate empty $2 from omitted $2 in version comparisons 2023-06-22 12:52:12 -07:00
Bart Schaefer b242121983 51593: improve search for command name after skipping prefix assignments
This is aimed mostly at use of run-help as a standalone function rather
than as a widget.  When run-help is invoked outside widget context,
there's no source line to search for the original command name, so this
attempts searching the arguments.
2023-05-10 21:17:51 -07:00
Bart Schaefer dd13048b3b 51572: fix "shift" error when running standalone 2023-03-13 19:46:39 -07:00
Daniel Shahaf 510df60dd1 51144, 51146: vcs_info git: stg: Extract patch descriptions
Joint work with Peter Grayson.
2022-12-09 01:39:32 +00:00
Daniel Shahaf 7cdada166c 51142: vcs_info git: Check the get-unapplied style as documented
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-08 22:09:59 +00:00
Peter Grayson ca7c42e1ee 51138: Updated StGit patch detection in vcs_info
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-08 21:27:35 +00:00
Atte Peltomäki f9bb03cd72 51088: fix standards reference in comment 2022-12-06 20:40:21 -08:00
Peter Stephenson b82e8e1035 50786: Make match etc. local when used in styles.
Avoids side effects of add-zle-hook-widget.
2022-10-17 16:21:01 +01:00
Julian Prein 6e827d8f9a 50648: Use $ZCALC_HISTORY where appropriate 2022-09-25 18:05:49 +01:00
Bart Schaefer 52761c9418 50335: simplify "wait" usage, fix signal handling
- 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-08 20:41:24 -07:00
Bart Schaefer a99f96797f 50323: create helper for shadowing builtins or existing functions and use it when redefining compadd et al. 2022-06-04 14:19:42 -07:00
Peter Stephenson 92da264eea 50286: avoid zed error if nounset is in effect 2022-05-26 09:32:33 +01:00
Bart Schaefer 84dde7c7b6 Jan Brieg: 50212 (and discussion): Add "bright" color variants 2022-05-14 20:34:28 -07:00
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