1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-05-08 00:26:18 +02:00
Commit Graph

11524 Commits

Author SHA1 Message Date
dana c23a0d84b0 48614: getopts: Calculate OPTIND according to POSIX_BUILTINS 2021-05-03 18:11:38 -05:00
Daniel Shahaf 2da0d8b52f 48767: docs: $SECONDS: Clarify what types may be set 2021-05-03 15:56:58 +00:00
Jun-ichi Takimoto ccc9cff9e2 48702: _pandoc: don't use cache, multiple extensions of format, etc. 2021-04-28 22:35:51 +09: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 e7711e37e4 unposted (cf. 48156): New test. 2021-04-21 22:01:20 +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 b68a7421bd 48638: mention TYPESET_TO_UNSET in NEWS 2021-04-20 17:11:37 -07:00
Daniel Shahaf b110d6d5af 48435 (tweaked): vcs_info docs: applied-string/unapplied-string: Correct an omission in the documentation and add an example.
The example code is a reduced version of my function from workers/47519,
with one bug fixed.  (In workers/47519, if $1 doesn't contain spaces -
which is the case under hg mq - then $H and $s will be set to the same
value.)

Tweaked: Extended the contrib.yo hunk with details about mq.
2021-04-20 23:38:04 +00:00
Daniel Shahaf c40a63ab67 48528/0002: vcs_info git docs: ahead/behind commits: Reduce the number of forks 2021-04-20 22:34:34 +00:00
Daniel Shahaf d9ac5916ba 48528/0001: vcs_info git docs: ahead/behind commits: Don't run rev-list when that would fail 2021-04-20 22:34:34 +00:00
Bart Schaefer c231a2394f 48617: fix misuse of IGNORE_BRACES when initializing debug_indent 2021-04-19 14:40:44 -07:00
Bart Schaefer 5fdd98552d 47489: rename standout as italic 2021-04-19 14:37:32 -07:00
Marlon Richert 7d92391c6e Add -L to add-(zsh|zle)-hook[-widget] completion
…and hide mutually exclusive options.
2021-04-19 23:21:08 +02:00
André Kugland 92a7b7f417 github/zsh-completions #792: added completions for opus-tools (opusenc, opusdec & opusinfo) 2021-04-19 23:16:27 +02:00
Oliver Kiddle 79258d090c 48619: complete inventory plugins in assignments to ANSIBLE_INVENTORY_ENABLED 2021-04-19 23:07:51 +02:00
Oliver Kiddle d01d0a1289 48618: update completions for FreeBSD 13 2021-04-19 23:05:49 +02:00
Bart Schaefer 71b747567e 47704: POSIX export and readonly ignore "-p" when parameter names also appear 2021-04-18 14:26:12 -07:00
Bart Schaefer 82ff9f24f1 48560: add TYPESET_TO_UNSET option to remove initialization of parameters
Changes typeset such that ${newparam-notset} yields "notset" and
"typeset -p newparam" does not show an assignment to the parameter.  This
is similar to the default behavior of bash and ksh, with minor differences
in typeset output.

Also add tests for some POSIX incompatibilities plus minor changes for test
harness robustness.
2021-04-18 13:58:09 -07:00
Jun-ichi Takimoto 56ccb4a975 unposted: remove an already fixed bug from BUGS
This was fixed by commit b6ba74c
2021-04-18 14:47:29 +09:00
Daniel Shahaf df899d38e9 48361 (+ 48368 review comments): __arguments: New completion function for _arguments.
In the penultimate paragraph of the comment, the two possibilities for the
relative path cover three cases:

- The comment is read in the source tree

- The comment is read in an installed tree with --enable-function-subdirs

- The comment is read in an installed tree with --disable-function-subdirs

Review-by: Matthew Martin
Review-by: Oliver Kiddle
2021-04-17 12:11:47 +00:00
Marlon Richert 587cced35d 48513: Let extra-verbose completion show parameter values 2021-04-16 23:36:03 +02:00
Oliver Kiddle 28cf6bd111 unposted: update on bug list 2021-04-16 23:26:22 +02:00
Oliver Kiddle 455bab1ef6 48556: new completion for ipfw 2021-04-16 23:24:15 +02:00
Daniel Shahaf dee6e67d60 unposted (cf. 48153): Add tests for max() and min(). 2021-04-16 19:08:11 +00:00
Daniel Shahaf 6a6ec30048 unposted: ChangeLog: Correct a bunch of X-Seq references from today.
For future greppers, here's the correct information:

e1f5172a4 48574/0008: vcs_info git: Use best practices in an example
2144d0110 48574/0007: vcs_info docs: vcs_info_lastmsg: Correct an ambiguous/wrong description.
517e1777a 48574/0006: vcs_info docs: Change user-context name in an example, to avoid confusion with the special-casing of the value `command' in vcs_info_lastmsg.
ebcb20a9c 48574/0005: vcs_info docs: Recommend use of prompt expandos rather than terminal escape sequences.
cc833e01f 48574/0004: docs: Document that hook functions may rely on $? (see workers/48570).
9b5f80285 48574/0003: docs: Fix rendering in the man page output
d07c945e7 48574/0002 (tweaked): docs: Fix rendering of an example in the man page output
32336eab9 48574/0001: docs: Minor markup tweak
2021-04-16 01:03:37 +00:00
Daniel Shahaf e1f5172a48 45583/0008: vcs_info git: Use best practices in an example
The alias was vulnerable to SHORT_LOOPS syntax, not invokable from
scripts, etc..
2021-04-15 16:27:53 +00:00
Daniel Shahaf 2144d01102 45583/0007: vcs_info docs: vcs_info_lastmsg: Correct an ambiguous/wrong description. 2021-04-15 16:27:53 +00:00
Daniel Shahaf 517e1777a5 45583/0006: vcs_info docs: Change user-context name in an example, to avoid confusion with the special-casing of the value `command' in vcs_info_lastmsg. 2021-04-15 16:27:53 +00:00
Daniel Shahaf ebcb20a9c0 45583/0005: vcs_info docs: Recommend use of prompt expandos rather than terminal escape sequences. 2021-04-15 16:27:53 +00:00
Daniel Shahaf cc833e01fe 45583/0004: docs: Document that hook functions may rely on $? (see workers/48570). 2021-04-15 16:27:53 +00:00
Daniel Shahaf 9b5f80285d 45583/0003: docs: Fix rendering in the man page output
In the man page output, the text was underlined from the var()
to the end of the paragraph.

The texi output in affected.  For instance, the text `name' in TeX
is now slanted Roman (\slshape\rmfamily) rather than slanted teletype
(\slshape\ttfamily).
2021-04-15 16:27:52 +00:00
Daniel Shahaf d07c945e74 45583/0002 (tweaked): docs: Fix rendering of an example in the man page output
The texi output was unaffected.  However, in the man page on my system,
everything after the example() was underlined and not indented.
2021-04-15 16:27:52 +00:00
Daniel Shahaf 32336eab92 45583/0001: docs: Minor markup tweak 2021-04-15 16:27:52 +00:00
Daniel Shahaf 9dc195120c 48522: README: Clarify _alternative change 2021-04-13 16:54:03 -05:00
Tim Lee 3b631babec 48525: vcs_info git docs: ahead/behind commits: Run fewer external programs 2021-04-13 13:55:48 +00:00
Jun-ichi Takimoto a90d5ab901 48439: remove macros that became unnecessary by df48cc8 2021-04-12 14:42:29 +09:00
Oliver Kiddle 704d10989e 48504: use SEEK_ macros in fseek() calls 2021-04-11 22:26:36 +02:00
Michael Stapelberg 6388156233 45396: readhistfile: avoid thousands of lseek(2) syscalls via ftell() 2021-04-11 21:38:27 +02:00
Marc Chantreux 82ba2261ab 48466: correct indentation and remove tabs and trailing spaces 2021-04-11 21:32:18 +02:00
Marc Chantreux 80d5210195 48445: pluralize tags in _surfraw 2021-04-11 21:05:39 +02:00
Marc Chantreux 90352a8278 users/26645: update options in gv completion 2021-04-11 20:49:30 +02:00
brian m. carlson f7a417388c 47794: exec: run final pipeline command in a subshell in sh mode
zsh typically runs the final command in a pipeline in the main shell
instead of a subshell.  However, POSIX specifies that all commands in a
pipeline run in a subshell, but permits zsh's behavior as an extension.
The default /bin/sh implementations on various Linux distros and the
BSDs always use a subshell for all components of a pipeline.

Since zsh may be used as /bin/sh in some cases (such as macOS Catalina),
it makes sense to have the common sh behavior when emulating sh, so do
that by checking for being the final item of a multi-item pipeline and
creating a subshell in that case.

From the comment above execpline(), we know the following:

 last1 is a flag that this command is the last command in a shell that
 is about to exit, so we can exec instead of forking.  It gets passed
 all the way down to execcmd() which actually makes the decision.  A 0
 is always passed if the command is not the last in the pipeline. […]
 If last1 is zero but the command is at the end of a pipeline, we pass
 2 down to execcmd().

So there are three cases to consider in this code:

• last1 is 0, which means we are not at the end of a pipeline, in which
 case we should not change behavior.
• last1 is 1, which means we are effectively running in a subshell,
 because nothing that happens due to the exec is going to affect the
 actual shell, since it will have been replaced.  So there is nothing
 to do here.
• last1 is 2, which means our command is at the end of the pipeline, so
 in sh mode we should create a subshell by forking.

input is nonzero if the input to this process is a pipe that we've
opened.  At the end of a multi-stage pipeline, it will necessarily be
nonzero.

Note that several of the tests may appear bizarre, since most developers
do not place useless variable assignments directly at the end of a
pipeline.  However, as the function tests demonstrate, there are cases
where assignments may occur when a shell function is used at the end of
a command.  The remaining assignment tests simply test additional cases,
such as the use of local, that would otherwise be untested.
2021-04-10 17:56:39 -05:00
Bart Schaefer 408a830483 47913: implement CASE_PATHS option to make NO_CASE_GLOB more sensible 2021-04-10 14:26:46 -07:00
dana 1bec15a010 unposted: README: Document incompatibility caused by workers/43928 2021-04-10 16:16:26 -05:00
dana 7269bc1ac4 48338: _git: Support case-insensitive path matching 2021-04-10 15:54:26 -05:00
Peter Stephenson 283d2f3c27 48432 and enable test: fix quotiing of zstyle -L for zstyle -e 2021-04-09 21:01:37 +01:00
Oliver Kiddle eaff11c748 48378: complete compadd options for other completion functions 2021-04-09 21:53:41 +02:00
Oliver Kiddle f3caff1536 48437: fix pid completion when cursor is in the middle of the line 2021-04-09 21:51:31 +02:00
Felipe Contreras 69ffb0bf0a 47786: prepare for autoconf 2.70 2021-04-09 21:49:14 +02:00
Felipe Contreras df48cc8404 47785: remove deprecated autoconf functions
STDC_HEADERS and TIME_WITH_SYS_TIME are deprecated.
2021-04-09 21:45:11 +02:00