1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-06-01 04:46:08 +02:00
Commit Graph

11938 Commits

Author SHA1 Message Date
Oliver Kiddle 35a2f155c3 51214: handle read -d and a delimiter that can't be decoded into a character
Terminate input at the raw byte value of the delimiter.
Also document and test the use of an empty string as a way to specify
NUL as the delimiter.
2022-12-17 00:37:19 +01:00
Jun-ichi Takimoto 2701ab161d 51207: fix for read -d when the delimiter is a byte >= 0x80 2022-12-17 00:35:36 +01:00
Oliver Kiddle a73c705b0c 51212: remove STOUC() macro
This served as a workaround for ancient compilers where casts to
unsigned char were broken.
2022-12-16 23:28:10 +01:00
Oliver Kiddle 7fb6c133bf 51215: consume whole CSI sequences from the input
This affects CSI sequences that aren't explicitly bound but arrive
within the usual KEYTIMEOUT time limits. A single undefined-key widget
is run instead of unintended bindings for Escape and other characters in
the sequence.
2022-12-16 23:23:53 +01:00
Peter Stephenson 1de8baded2 unpasted: add missing ChangeLog entry 2022-12-16 14:58:20 +00:00
Daniel Shahaf 56e7b147ad unposted: Follow-up to the last commit: Fix a typo in a comment. 2022-12-15 21:35:45 +00:00
Daniel Shahaf 5c9713603d unposted: zsh.h: lextok: Add an explanatory comment with a cross-reference. 2022-12-15 20:38:10 +00:00
Bart Schaefer 6d49734d46 51210: Clear errflag before calling EXIT trap
If this is not done, special cases such as failures in special builtins
or errors in math expressions skip the trap execution.
2022-12-13 21:11:33 -08:00
Philippe Altherr 727079f7e5 51198: Clarify and expand ERR_EXIT and ERR_RETURN documentation 2022-12-13 21:05:13 -08:00
Philippe Altherr 8a45f16d83 51193: Discuss ERR_EXIT changes 2022-12-13 21:01:47 -08:00
Peter Stephenson 67d4bf5bb9 51134: ! return doesn't change the return status 2022-12-12 10:30:13 +00:00
Peter Stephenson 14559421e2 51134: document interactive behaviour with ERR_EXIT and ERR_RETURN 2022-12-12 10:27:29 +00:00
Bart Schaefer 2028539cb1 51161: correct errno after closing xtrace FD 2022-12-09 19:30:35 -08:00
Shohei YOSHIDA 72540a758a 51111: update completion for global to version 6.6.8 2022-12-09 19:27:31 -08:00
Bart Schaefer 48f36784a8 51047: fix quoting of completion matches when _canonical_paths -N option is used 2022-12-09 19:21:45 -08: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
Shohei YOSHIDA 2473d83521 51108: single letter forms of Shift-JIS / EUC-JP options were reversed 2022-12-06 20:47:10 -08:00
Atte Peltomäki f9bb03cd72 51088: fix standards reference in comment 2022-12-06 20:40:21 -08:00
Philippe Altherr 8086f10615 51094: consistent use of bit-manipulation for noerrexit value changes 2022-12-03 21:46:42 -08:00
Philippe Altherr ab9c579ef9 51098: remove unreachable NOERREXIT_UNTIL_EXEC code and effects 2022-12-03 21:35:51 -08:00
Philippe Altherr f253ea6b9d 51076: fix ERR_EXIT when used with "eval" or "source"; documentary comments 2022-12-03 21:14:26 -08:00
Philippe Altherr 259f1e944b 51071: fix ERR_RETURN for functions in conditional statements 2022-12-03 21:03:36 -08:00
Bart Schaefer 28ac3e9fe5 51001: ChangeLog entry for preceding four patch commits. 2022-12-03 20:46:13 -08:00
Philippe Altherr dd3ba3d599 51001: fix for ERR_EXIT following shell function; update tests 2022-12-03 20:44:10 -08:00
Philippe Altherr d47b8480f0 51001: fix for ERR_EXIT with pipeline negation ("!"); update tests 2022-12-03 20:42:13 -08:00
Philippe Altherr fda6fd9513 51001: fix for ERR_EXIT with "always" blocks; update tests 2022-12-03 20:35:58 -08:00
Philippe Altherr 23dc19f005 51001: Reverts 8839e969b, most of 1ba8714a, and d873ed60.
Also correct ChangeLog
2022-12-03 20:31:42 -08:00
Jun-ichi Takimoto 41b402d36d 51080: allow multibyte chars in glob qualifier (u:uname:) 2022-12-02 19:34:55 +09:00
Jun-ichi Takimoto 1be52186b4 51079: metafy sep in array subscript flag (s:sep:)
this enable sep to contain \0 etc.
2022-12-02 19:32:11 +09:00
Daniel Shahaf 291940bae6 unposted (cf. 51016): Add a test case for underscore-followed-by-digits in math context. 2022-11-23 14:22:02 +00:00
Oliver Kiddle e4aeb3b911 unposted (c.f. Norikatsu Shigemura: github #96): add missing local declaration 2022-11-17 21:10:28 +01:00
Matt Koscica dbefe08f3e github #87 (tweaked): update options tmux 3.4
Import completion updates from tmux.git, the revision used was
c67abcf8182b, and the updates were generated by Util/check-tmux-state.

check-tmux-state: changes to output parsing + variable declaration

parsing of `tmux show-options` is slightly more idiomatic (thanks to
@phy1729 for the syntax), and it now also ignores user-specified options
(which are prefixed with an @ symbol).

the lines defining and declaring supported_server_options were also
swapped to the correct order - `typeset` was being called after
supported_server_options was populated, contrary to all the other
supported_*/available_* arrays used in the same area of the file.
2022-11-17 20:47:15 +01:00
Wu Zhenyu ca87b7e43f github #95: Add completions for neomutt 2022-11-17 20:18:09 +01:00
Oliver Kiddle f0aa42e7e5 unposted (c.f. Denis Bitouzé: users/28405): handle also lualatex 2022-11-17 20:10:52 +01:00
Oliver Kiddle c4d557bb0a 50934: use OSC 52 escape sequence when copying to "* or "+ vi buffers 2022-11-17 20:05:12 +01:00
Bart Schaefer b1533066ca unposted (see 50930): note bug with suspending conditional expressions 2022-11-12 08:28:28 -08:00
Bart Schaefer 8839e969bf 50929: fix handling of ERR_RETURN bent by 50928. 2022-11-09 21:48:46 -08:00
Bart Schaefer 1ba8714a7a 50928: fix tests for 50897, mention behavior change in NEWS 2022-11-09 21:37:56 -08:00
Bart Schaefer 61610ea4bd 50922: fix additional cases of signals for current shell jobs on the right of a pipeline.
Backs out part of 188c5cd5 (workers/50874).  With this change, after a
new subshell is forked upon suspend of the right side of a pipeline, the
previous foreground subjob is resumed first and the new subshell remains
stopped until that job finishes.
2022-11-09 20:24:57 -08:00
Bart Schaefer d873ed6026 50897: nonzero status of complex commands should trigger ERR_EXIT 2022-11-08 20:36:49 -08:00
Peter Stephenson 298919f43a users/28338: command substitution with alias edge case.
See added regression test.
2022-11-08 14:12:01 +00:00
Bart Schaefer 188c5cd518 50874: fix handling of tty signals for jobs in the current shell when waiting for the right side of a pipeline.
Reverts 15bf8ace (workers/50134).  Thanks to Jun T. for debugging assistance.

Issues came down to two things:
1. update_job() may be called on a process group leader even when a
   signal was NOT sent to any process in that process group.  This
   caused jobs to be resumed or backgrounded incorrectly or in the
   wrong order.
2. When there is a current-shell complex command (in braces) on the
   right side of a pipeline, external processes within it have their
   own process groups, but a tty signal sent to such a process should
   be treated as if received by the whole complex command.

This fixes:
* Suspend/resume of a foreground pipeline within a shell function
* Interrupt or suspend/resume of processes in a pipeline ending in { ... }
* Interrupt of such a pipeline after exit of the last process in { ... }

These affected interactive shells only (MONITOR set plus tty signals).
2022-11-06 11:25:47 -08:00
Jun-ichi Takimoto f8d93888a8 50851: restore typtab when necessary
inittyptab() must be called when returning from a function with
"setopt localoptions MULTIBYTE|BANGHIST|SHSTDIN", and also in
function dosetopt() when setting these options (via $options, for
example). We intentionally did not take account of the options
EMACS/VI because these options are obsolete and their use is
not recommended.
2022-11-02 16:27:27 +09:00
Bart Schaefer 7a2e3b9039 unposted: incorrect email address 2022-10-31 16:51:07 -07:00
Bart Schaefer 159c892b9b 50855: Clarify how commands are hashed, and searched-for by "whence". 2022-10-31 16:50:16 -07:00
Peter Grayson 0a66d6f3ec 50844: Remove _stgit completion script
The StGit project ships its own zsh completion script which is more
complete and up-to-date than those shipped with zsh.

https://github.com/stacked-git/stgit/blob/master/completion/stgit.zsh

Also, the _stgit completions that ship with zsh, which dynamically parse
StGit's help output, will be broken by the upcoming StGit 2.0 release
due to changes in the help output.

Signed-off-by: Peter Grayson <pete@jpgrayson.net>
2022-10-31 08:56:47 +00:00
Axel Beckert b76dcecfe3 50840: Doc/Zsh/grammar.yo: Correct NO_MATCH to NOMATCH 2022-10-25 12:49:48 +02:00
Bart Schaefer 5b1c204c54 Unposted: Fix typo in comment 2022-10-23 16:28:14 -07:00