1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-02 22:11:54 +02:00
Commit graph

11476 commits

Author SHA1 Message Date
Mathias Fredriksson
aa60dd320f github #60: Fix completion for a zfs dataset containing spaces 2020-07-08 23:46:37 +02:00
Doron Behar
02f62e5d21 gitlab !15: modutils completion: Fix FHS assumption
Remove calls to programs from /sbin/ with _call_program and to avoid the
system complies to the FHS.
Support modules completion for NixOS and Guix which store their kernel
modules not at /lib/modules.
2020-07-08 18:07:39 +02:00
Oliver Kiddle
57a735f6b9 46201: add guidelines for caching and use of imperative mood in descriptions 2020-07-08 17:47:46 +02:00
Oliver Kiddle
389c853b4a 46195: use showrgb command to get colours if it is available 2020-07-08 17:40:42 +02:00
SATOH Fumiyasu
a0a27473fe github #50: Complete hosts in "Match" directive 2020-07-08 17:25:20 +02:00
James Pike
dc8061ebe4 github #53: Allow specifying directory name for _remote_files 2020-07-08 17:20:10 +02:00
Bart Schaefer
126a3158d5 46189: Ignore exit status of final zpty_flush in comptesteval 2020-07-07 09:36:11 -07:00
Nuri Jung
89618fe37d github #58: docs: Note that the zsh/regex syntax is platform-dependent. 2020-07-07 13:27:03 +00:00
Pete Moore
4ab0d047c7 46194: docs: metafaq: Remove spurious closing bracket 2020-07-06 23:41:35 +00:00
Daniel Shahaf
cf134c15a0 46175/0003: Fix the RM_STAR_SILENT bug from the parent commit. 2020-07-05 11:11:59 +00:00
Daniel Shahaf
b58141c4cf 46175/0002: Add a regression test for 46169: the RM_STAR_SILENT logic processes the current directory rather than the root directory.
The bug will be fixed in the next commit.
2020-07-05 11:11:59 +00:00
Daniel Shahaf
d1b4e60ff5 46175/0001: Add a unit test for the RM_STAR_SILENT option. 2020-07-05 11:11:59 +00:00
Daniel Shahaf
805b946b53 46174/0002: test harness: Restore indentation after the previous commit. No functional change. 2020-07-05 11:11:22 +00:00
Daniel Shahaf
63fde0b744 46174/0001: test harness: Plug a symlink attack
The test harness created tempfiles with a predictable names and sourced
them without verifying they had been created by itself.  This opened
anyone who ran the test suite to a symlink attacks from other local
users on the build machine.

Fix this by creating the file whilst NO_CLOBBER and ERR_EXIT are both in
scope, to ensure that we'll abort unless the file really was created as
expected.

Put the existing rm(1) call in a try/always block to help it be unlinked
on test failures, thus reducing the chances of the NO_CLOBBER check
triggering on tempfiles created by earlier test suite runs.

I had first tried to fix this by using the
.
    () { ... } =(:)
.
idiom, but couldn't get that to work: it broke the %prep code of X03
with ZTST_verbose unset (its default value) but not with ZTST_verbose=3.
(I tried to set the latter to debug zpty_flush.)

While there, add a needed-in-principle-but-noop-in-this-specific-case (q).

Indentation will be restored in the next commit.
2020-07-05 11:11:22 +00:00
Matthew Martin
4e471c3f89 46168: Update $PWD and call chpwd hook after normalizing path 2020-07-03 21:17:58 -05:00
Daniel Shahaf
b53f465481 unposted (cf. users/24972, users/24978): Use an ASCII hyphen/minus rather than a dash. 2020-07-03 22:17:59 +00:00
Peter Stephenson
4e0058afc5 users/24971: ${(-)var} sorts on signed integers 2020-07-03 21:05:46 +01:00
zsugabubus
19390a1ba8 46097: Fix "assignment to invalid subscript range" error in _rm.
See 46090 for details.
2020-06-28 13:08:00 +00:00
Daniel Shahaf
f636cde7b5 46132: docs: Use an itemized list in the documentation of the *(o) glob qualifier.
This should be easier to read, both as a tutorial and as a reference.
2020-06-28 13:01:20 +00:00
Daniel Shahaf
a4b4a3a7c7 46131: _git-config: Partly fix a bug whereby a 'foo.ba<TAB>' wouldn't be completed to 'foo.bar.baz'.
Now it properly gets completed, but in the case of gpg.openpgp.program,
the description would be shown as "unknown option name", that being the
description of gpg.*.program via `git help -c`, which shadows the
more description of gpg.openpgp.program in $git_options.
2020-06-28 13:01:09 +00:00
Daniel Shahaf
1776422438 46128: _git: Complete more options and diff/merge tools. 2020-06-28 13:01:09 +00:00
Daniel Shahaf
5584badbea 46129: _git-config: Fix a bug where a second trailing dot would be incorrectly offered. 2020-06-28 13:01:09 +00:00
Daniel Shahaf
c1c1fb9b2c 46130: _git-config: Complete some more options. 2020-06-28 13:01:09 +00:00
Miroslav Koškár
c74b3c8919 46140: _git: Fix insufficiently quoted pattern 2020-06-27 20:35:08 +00:00
Miroslav Koškár
d839833e4e 46139: _git: Remove hanging whitespaces 2020-06-27 20:32:39 +00:00
Daniel Shahaf
6f479b7685 unposted (after 46068): Fix a compiler warning.
The warning was:
.
    warning: passing 'const char *' to parameter of type 'void *'
    discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
2020-06-27 03:35:30 +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
Daniel Shahaf
9575f2f1bf users/24959/0002: Update aliases documentation for the addition of the ALIAS_FUNC_DEF option. 2020-06-27 00:53:02 +00:00
Daniel Shahaf
7f58463dd3 users/24959/0001: Extend documentation of global aliases. 2020-06-27 00:53:02 +00:00
Daniel Shahaf
4e3d08fea8 unposted: docs: Fix some markup and typos. 2020-06-26 18:25:51 +00:00
Peter Stephenson
7865486994 46100: Fix =subst before =(subst)
This occurs with SH file expansion ordering.

Add test.
2020-06-26 17:32:02 +01:00
Oliver Kiddle
d14a924c37 unposted c.f. 46034: workaround incompatibility with sh_file_expansion option 2020-06-26 00:46:00 +02:00
Oliver Kiddle
858ddcbd6e 46106: new usbconfig completion 2020-06-26 00:34:37 +02:00
Oliver Kiddle
9ec69989bb 46105: new xinput completion 2020-06-26 00:34:36 +02:00
drelo
eec1c48a91 46075: drelo: prefer ip on linux for finding network interfaces 2020-06-26 00:34:36 +02:00
oxiedi
c4540e154f 45895: ignore deduplication patterns in _sequence 2020-06-26 00:34:33 +02:00
Daniel Shahaf
dd6e702ee4 46068 (tweaked) (was: github #57): region_highlight: Add memo= support.
This is useful when multiple plugins add region_highlight entries and
subsequently want to remove only their own entries.  Without this
functionality, recognizing one's region_highlight entries is not trivial
because the 'start' and 'end' offsets are modified by editing of $BUFFER
and the highlight specification may not be unique or distinctive.

The tweaks are as follows:

- Change zfree() to zsfree() per workers/46070.

- Remove the mem.c hunk, as it changed the signature of only one out of
  two alternative definitions of zsfree().  (The definition that hunk
  touched is the one that's not used by default.)
2020-06-25 11:50:33 +00:00
Daniel Shahaf
304ce85a2a 46102: test harness: Make the XPass message distinct from the Fail message.
The new output is:

    ./Test/B02typeset.ztst: starting.
    Test ./Test/B02typeset.ztst was expected to fail, but passed.
    Was testing: this is the description that's after the colon on in the ztst file
    ./Test/B02typeset.ztst: test XPassed.
    **************************************
    0 successful test scripts, 1 failure, 0 skipped
    **************************************
    make[1]: *** [Makefile:190: check] Error 1
    make: *** [Makefile:263: check] Error 2

The new function is deliberately very similar to ZTST_testfailed() just
above it.
2020-06-25 10:24:11 +00:00
Peter Stephenson
af1c009c3e 46079: Ignore double quotes in math expressions.
Treat as white space.

This is required for compatibility and previously had no use in zsh
as it generated an error.
2020-06-23 12:17:32 +01: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
8bd46bf2a2 46044 (tweaked per Matthew): _units: Correct the path to the units data file on Debian with units 2.00 and newer and on FreeBSD. 2020-06-19 15:32:34 +00:00
Daniel Shahaf
6be112fe74 46067: Add a unit test for workers/46060. 2020-06-18 10:34:11 +00:00
Peter Stephenson
baf4fa3621 46060: Fix spurious actions on exit status 130 or 131.
Ensure process has taken a signal before looking for SIGINT or SIGQUIT.
2020-06-18 09:27:05 +01:00
Frederick Zhang
1939db10af 45982: _zfs: add space property 2020-06-17 09:59:58 -04:00
Daniel Shahaf
14513e6ef3 unposted: internal: ztst.vim: Recognize empty "F:" line as well, as the test harness does. 2020-06-17 09:37:50 +00:00
Miroslav Koškár
33361e81bc 46049: docs: Correct the sense of the single-letter abstract of the GLOBAL_RCS option (-d) 2020-06-17 08:13:51 +00:00
Jan Máslo
dc5dfd19a2 gitlab !12: completion for mat & mat2 2020-06-11 22:46:49 +02:00
Oliver Kiddle
1ee8ecd8ea 46036: fix colouring in prompt completion 2020-06-11 22:34:41 +02:00
Oliver Kiddle
cce88bdb0c users/24892: fix local declaration with recursive-files style and complete it for zstyle 2020-06-11 22:31:44 +02:00
Daniel Shahaf
c5f12fb732 unposted: zstyle docs: Fix typo.
This manifested as a trailing non-underlined ".RE" in the rendered man page.
(I guess that was a man page directive, but I'm not sure how the extraneous
closing parenthesis caused it to be rendered in the output.)
2020-06-10 13:07:56 +00:00