Oliver Kiddle
86a0891952
53335: Remove unused dupstring_glen() function
...
Also make use of the dupstring_wlen() variant in more places to avoid a strlen()
2025-01-30 12:42:09 +01:00
Oliver Kiddle
57248b8883
52750: remove ansi2knr support for old pre-ansi K&R compilers
2024-03-18 20:02:34 +01:00
Bart Schaefer
98a6892cb1
52244: Fix a batch of minor defects reported by Coverity.
...
Coverity defects 1547831, 1547826 (remove unused function), 1521551,
1500752, 1500747, 1401549, 1372423, 1270645, 1255799, 1255792, 1255789,
1255787, 1255782, 1255750
2023-10-26 08:27:18 -07:00
Bart Schaefer
a9ba166216
51483: Enable assignment and expansion of parameters with ksh-like namespace prefixes.
2023-03-05 14:03:42 -08: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
Mikael Magnusson
1039b09c0c
50042: Another fix for 49915
...
If the last element in the list is a duplicate, we would walk off the end
2022-04-11 23:31:11 +02:00
Mikael Magnusson
9eda397354
49957: Brown paper bag for 49915
...
The code would crash when n == 0. There's not really any point doing any
of this when n is 0 so just skip everything. It also tried to NULL
terminate a list a little to eagerly.
2022-04-03 11:28:14 +02:00
Mikael Magnusson
774c634d2e
49926: remove unused variable from 49915
2022-03-30 20:34:37 +02:00
Mikael Magnusson
6a9b3bb290
49915: Efficient dedup for unsorted completions
2022-03-30 08:07:39 +02:00
Mikael Magnusson
48be30e530
49893: Fix comments for UNIQCON/ALL
2022-03-30 08:07:39 +02:00
Jun-ichi Takimoto
b067ab08d6
49535: fix completion for ${<TAB> and ${(a)<TAB>
2021-11-01 23:33:57 +09:00
Oliver Kiddle
632fee7cdf
49528: allow multiple -D options to compadd
2021-10-30 23:35:04 +02:00
Oliver Kiddle
0a8d5cdbc8
49450: don't display explanation with compadd -x if any of -D, -A or -O are also used
2021-09-28 23:40:38 +02:00
Bart Schaefer
d0e071c5f0
48790: COMPLETE_IN_WORD inside brace-param
2021-05-15 13:40:37 -07:00
Bart Schaefer
2cf6032a30
47997: Disable XTRACE around user-defined completion widgets.
2021-02-11 19:13:47 -08:00
Daniel Shahaf
4d2bcf2fe7
45729: internal: Add a second parameter to zlinklist2array(), analogously to hlinklist2array().
...
Will be used in the next commit.
2020-05-03 01:27:36 +00:00
Jens Schleusener
11dbe4c286
45269: Fix misspellings in completions and elsewhere.
2020-01-09 13:42:02 +00:00
Oliver Kiddle
cd6fd2b0a3
44274: allow finer control of completion match soring with compadd's -o option
2019-05-07 23:24:49 +02:00
Daniel Shahaf
d756c4d5cb
43531: Completion: Fix some false positives in the logic for "are these two candidates completions equivalent".
2018-09-30 22:18:46 +00:00
Jun-ichi Takimoto
baedd62f0d
43219 (except term{cap,info}.c): fix several memory leaks
2018-07-31 22:15:58 +09:00
Jun-ichi Takimoto
1a97dcbed1
42870: another improvement of 'compset -q'
...
zlemetall need not count the 'x' added at the cursor in set_comp_sep()
2018-05-31 21:07:53 +09:00
Jun-ichi Takimoto
e5f356a95e
42809: slightly improve 'compset -q'
2018-05-25 21:11:20 +09:00
dana
eeeba19c96
42185: safety when removing separators in completion
2018-05-11 09:33:05 +01:00
Barton E. Schaefer
efae75f648
41242: zstrbcmp(...) removed in favor of zstrcmp(..., SORTIT_IGNORING_BACKSLASHES)
...
This should make sorting consistent in completion listings vs. elsewhere.
2017-06-17 10:25:43 -07:00
Oliver Kiddle
7d2f805008
39945: allow further tab presses to move on to menu completion even when compstate[insert] is emptied
2016-11-16 09:42:49 +01:00
Oliver Kiddle
58ce2f119a
39829: when compstate[insert] is emptied by the completion function and AUTO_MENU is set, start menu completion on the second tab press rather than the third
2016-11-05 00:36:29 +01:00
Daniel Shahaf
4ad1ad9777
39805: internal: Document some compadd internals.
2016-11-03 16:44:14 +00:00
Daniel Shahaf
36b290814f
39802: internal: Document and simplify multiquote().
...
The code simplifications take advantage of the fact that all callers
pass either 0 or 1 for 'ign'.
The tildequote() text is from workers/39271.
2016-11-03 16:44:14 +00:00
Daniel Shahaf
2c612c5ba1
39383: compadd: Restrict previous patch to the case where $PREFIX includes characters both from the -P prefix and from the (unprefixed) candidate completion word.
2016-09-20 17:59:20 +00:00
Daniel Shahaf
bd94e13f34
39372: compadd: Match -P prefix all-or-nothing rather than greedily.
2016-09-20 17:59:19 +00:00
Daniel Shahaf
f368720b8b
39252: internal: quotestring: Drop the 'e' parameter, which no caller uses.
2016-09-11 09:22:18 +00:00
Oliver Kiddle
8c29b34032
38043: allow any completion widget to cycle matches for menu completion to fix reverse menu completion
2016-03-07 13:15:40 +01:00
Oliver Kiddle
68a5a5f453
35704: compadd -E 0 should imply -J and -2
2015-07-06 22:40:47 +02:00
Oliver Kiddle
44c56f3af5
35627: make reverse-menu-complete start with the last match in
...
menu selection
2015-06-29 01:54:44 +02:00
Daniel Shahaf
9fcc105ff6
35127#1: Fix _describe/compdescribe problem with unsorted groups
2015-05-23 10:05:06 +00:00
Peter Stephenson
cfd91eac07
Rearrange context saving.
...
Variables are now associated with the module that declares them, being
initialised and saved/restored there. However, as many variables are
used for communication between modules, many of them are set in multiple
places, so the assignment is ambiguous.
2015-01-09 21:33:39 +00:00
Mikael Magnusson
221ecf5010
34115: compcore: Fix size argument to zfree
...
Found by Coverity (Issue 1255852), has no impact unless using
--enable-zsh-mem, and even then it is minimal.
2015-01-06 23:46:18 +01: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
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
Peter Stephenson
584ea88811
32303: simplistic completion after $x:
2014-01-28 19:14:30 +00:00
Peter Stephenson
7a5b85292a
31882: Insulate completion widget against environment.
...
Prevents change in pipestatus leaking back out.
2013-10-24 17:49:37 +01:00
Bart Schaefer
3489c15799
30193: remnulargs() after poking into string in case length changes
2012-02-09 20:12:33 +00:00
Peter Stephenson
4a3ce8ab89
29644: work around _describe bug, plus cosmetic tweaks
2011-08-03 20:57:32 +00:00
Peter Stephenson
962624e8c3
29491: remove some variables set but not used
2011-06-19 16:26:10 +00:00
Peter Stephenson
d7582f006f
29459: Further fixes for parameter flag completion,
...
plus drive-by fix for double-quoted parameter completion with flags
2011-06-04 21:32:06 +00:00
Peter Stephenson
d292edc4dc
29452: allow completion of parameter flags
2011-06-03 22:06:59 +00:00
Peter Stephenson
f61ae85acf
29268: extra dupstring() for value to be used in completion match group
2011-05-14 00:36:06 +00:00
Peter Stephenson
506615ff94
29267: add -enable-zsh-debug and use for debugging completion matcher groups
2011-05-14 00:07:41 +00:00
Peter Stephenson
212ca9edf9
28772: Update regions in region highlight dynamically
2011-02-18 22:08:45 +00:00
Peter Stephenson
ebcead7543
lexsave/lexrestore lexflags
...
add new LEXFLAGS_ZLE
2010-12-14 10:35:38 +00:00