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

360 commits

Author SHA1 Message Date
Barton E. Schaefer
18200dc030 users/21955: add missing final colon in zstyle context lookup; allow a single unique match to appear in "expansions" tag 2016-09-21 21:27:21 -07:00
Oliver Kiddle
b870ff85a0 39333: include name of command used to gain priviliges in context for command and gain-priviliges styles 2016-09-16 00:05:10 +02:00
Oliver Kiddle
c5a3b170d4 39299: better Freebsd support in _external_pwds using procstat 2016-09-13 17:43:38 +02:00
Oliver Kiddle
8011fe8a58 39261 (tweaked cf. Daniel: 39275): don't unconditionally elevate privileges with sudo in completion functions
A new gain-privileges style enables it and a _comp_priv_prefix array
added for tracking how to match privileges for the current command
2016-09-11 13:49:22 +02:00
m0viefreak
2d5dd74732 38153: change the way long options are examined for "=" signs to more accurately identify options that take arguments
Note in workers/39135:
The pattern in 266/268 appears to match the '=' sign even though it's in the
second colon-separated field, where it doesn't denote a mandatory argument.
I'm guessing the pattern match on lines 266/268 should be fixed ...

This commit alters those patterns in what is hoped to be the desired way.
2016-09-06 22:35:26 -07:00
Daniel Shahaf
7154052ebe 39046 + 39061: New :P history modifier. 2016-08-22 03:34:30 +00:00
Oliver Kiddle
82119d8d17 38904: fix return status in _normal and functions erroneously using it for default completion 2016-07-21 17:49:13 +02:00
Oliver Kiddle
d2a140e75d 38641: allow for values which resemble compadd options 2016-06-09 22:54:07 +02:00
Barton E. Schaefer
8142fc3fdb For help listing, capture the fallback to compctl in case there is one defined 2016-04-09 08:54:54 -07:00
Barton E. Schaefer
485cbbb6cc 37972: Redirect stderr to /dev/null in cases where ${~param} might generate errors 2016-02-14 13:10:06 -08:00
Daniel Shahaf
2ab41d508d 37215: _regex_words: Don't add mismatched parentheses
I ran into this in the wild¹, it manifested as the following error message:

    zregexparse:4: not enough regex arguments

¹ https://bug.tasktools.org/browse/TW-1729
2015-11-27 07:26:38 +00:00
Barton E. Schaefer
ce929eb37e 36841: factor out and update the patterns that filter "uninteresting" functions out of the $funcstack display 2015-10-11 21:23:38 -07:00
Jun-ichi Takimoto
756526eef3 36697: handle options of _arguments correctly 2015-09-30 23:56:14 +09:00
Barton E. Schaefer
c5a13d2d01 unposted (cf. 36200): back out _expand backslash handling change from 34961. 2015-08-17 13:12:30 -07:00
Peter Stephenson
b7aecf6c8e Don't require MULTI_FUNCDEF in _main_complete.
Although it gets set there, _main_complete is parsed to the end first.
2015-06-27 17:50:57 +01:00
Barton E. Schaefer
a253ada08b 35163: move "show-ambiguity" style to _setup so that more precise context can be applied 2015-06-06 12:35:52 -07:00
Daniel Shahaf
ce9d3fd7b7 35270: _describe: Document a known issue described in 35229
(which is the same thread as 35127 and 34768)
2015-06-02 10:13:50 +00:00
Oliver Kiddle
4c2a62fe86 35310 (plus undo 35268 (git 899613f)): fix quoting of cached arrays
Also add file name reference to ChangeLog entry from rev 899613f.
2015-05-30 11:14:48 -07:00
Peter Stephenson
899613f535 c.f. 35268: revert completion cache optimisation for now 2015-05-26 10:00:46 +01:00
Barton E. Schaefer
54fe61ab32 34961: unquote history words when command line has a quote 2015-04-25 11:05:52 -07:00
Barton E. Schaefer
33ff5d06f2 34961: add backslash to alias expansion matching (related to workers/32186) 2015-04-25 10:47:31 -07:00
Barton E. Schaefer
8254c9c071 users/20034: adjust PREFIX and SUFFIX for unambiguous_cursor on second completion attempt with GLOB_COMPLETE 2015-03-21 09:29:52 -07:00
Daniel Shahaf
236da69842 34671 plus tweaks: Add -1 -2 -J -V -x to _describe, use them to sort 'git --fixup' hash completions 2015-03-16 09:27:06 +00:00
Barton E. Schaefer
ae7dcab5ed 34476: change _store_cache assignment format
Avoids potentially expensive lexical analysis of the array values.
2015-02-12 09:31:09 -08:00
Jun-ichi Takimoto
2810317ae2 34456: lopts should be initialized as an array
otherwise an empty element remains in lopts, which causes
a trouble when _arguments -- '*:' is called.
2015-02-06 23:06:07 +09:00
Barton E. Schaefer
5caf317c3a unposted (cf. 34218): : remove -m from zmodload calls 2015-01-10 18:06:43 -08:00
Barton E. Schaefer
199581f780 34202: safe tempfile creation part 3 -- use zf_ln instead of mv 2015-01-10 10:32:31 -08:00
Barton E. Schaefer
33b3958064 34068: create tempfiles without forking, and safe temp directory creation 2014-12-28 00:49:08 -08:00
Barton E. Schaefer
200accac63 34067: safe tempfile creation, part 1 2014-12-27 23:59:29 -08:00
Peter Stephenson
d067ebcacd 33876: etc.: Separate errors and keyboards interrupts
Combination of 12 commits from interrupt_abort branch.

Basic strategy is to introduce bits to errflag and to set and
reset them separately.

Remove interrupt status on return to main keymap.

Turn off ERRFLAG_INT for always block.

Restore bit thereafter: we probably need a new variable in order
to allow user interrupts to be reset in the always block.

Add TRY_BLOCK_INTERRUPT

This works the same as TRY_BLOCK_ERROR, but for a SIGINT, too.

Ensure propagation of SIGINT from exited job.

If received by foreground job, shell uses ERRFLAG_INT, not
ERRFLAG_ERROR, to set the new state.

Reset errflag before precmd()

Add always block in _main_completion to fix ZLS_COLORS

Ensures we get the right state of $ZLS_COLORS at the end of _main_complete
even if there's an interrupt.  However, the "right state" is a bit messy
as it depends on styles.
2014-12-11 09:41:17 +00:00
Barton E. Schaefer
5e9206061d 33901: fix warning message reference to funcstack (updates 33859) 2014-12-07 11:20:01 -08:00
Peter Stephenson
b4a198cdda 33859: Fix traps in completion
We need to use a function-style trap in order for the effect of the
interrupt to propagate back correctly.
2014-12-05 17:06:28 +00:00
Oliver Kiddle
ee38545c62 users/19365: completer for current directory of other shell processes 2014-11-25 20:03:53 +01:00
Barton E. Schaefer
691547cda6 33563: Completion/Base/Core/_main_complete, Src/Zle/complist.c: fix thinko in status message for INT/QUIT signals; check errflag in output loops
Two semi-related patches for keyboard interrupt handling in completion,
most importantly so that unexpectedly long completion listings can be
interrupted.
2014-10-29 08:45:57 -07:00
Oliver Kiddle
03241e50b0 33438: use the new way of splitting strings with a dynamic separator
from 33423 and quote separators where needed
2014-10-13 11:13:55 +02:00
Barton E. Schaefer
22c4ea424c 33403: be conservative about redirecting _call_program stderr, the caller may have already done so 2014-10-09 17:54:47 -07:00
Barton E. Schaefer
57252dc1e0 33320 (cf. PWS 33311): revert 33069, fix lexing of bangchar during completion
add typtab_flags bits (replaces specialcomma boolean) to record any unusual handling of typtab entries; signal safety; make bangchar non-special during completion lexing of the command line.
2014-10-02 08:39:43 -07:00
Barton E. Schaefer
5a2668a6ac 33223: discard stderr except when _complete_debug is in progress. 2014-09-23 20:31:31 -07:00
Barton E. Schaefer
e1ba30afae 33205: keep array of completions and array of display strings in sync when filtering for matches 2014-09-19 19:42:45 -07:00
Barton E. Schaefer
6d9635b0bd 33088: indentation in $PS4 2014-09-03 00:24:29 -07:00
Barton E. Schaefer
e01739d2b7 33069: remove internal quoting before lookup when expanding aliases in an unquoted word 2014-08-30 14:09:23 -07:00
Peter Stephenson
cc6e9db29d 33047: use git to simplify massively source distribution file selection 2014-08-23 21:01:58 +01:00
Oliver Kiddle
469ee6daef 32997: new utility function for separated lists 2014-08-14 19:00:04 +02:00
Peter Stephenson
f8ae47f29b unposted: updates for 5.0.5-dev-1 and subsequent 5.0.6 release 2014-08-10 17:49:55 +01:00
Oliver Kiddle
7d301a527e 32441: add completer for file extensions 2014-03-03 16:50:14 +01:00
Oliver Kiddle
1f290a3e82 32439: add new show-ambiguity style 2014-03-03 12:08:45 +01:00
Jun T
7d7242405a 32435: improved quoting for ignore-line completion style 2014-02-26 20:39:11 +00:00
Oliver Kiddle
7c31413278 users/18498: observe add-space style in _expand_alias so suffix can be disabled 2014-02-25 09:02:19 +01:00
Barton E. Schaefer
779ad93490 32322: display a message when completion is interrupted from the keyboard 2014-01-30 08:25:06 -08:00
Barton E. Schaefer
9e4468d38d 32186: fix bad backreference; handle glob patterns with backslashed quotes 2013-12-28 00:30:17 -08:00