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

410 commits

Author SHA1 Message Date
Wu, Zhenyu
a61b105795 github #126: Fix some typos 2025-01-27 23:39:05 +01:00
Eric Cook
393cb298aa 53174: add Completion/Base/Utility/_as_if 2024-11-11 10:46:08 -05:00
Oliver Kiddle
0394b7cf17 52373: fix _numbers for suffixes containing % and update affected functions 2023-12-05 18:51:33 +01:00
Bart Schaefer
d95197a2ec unposted: extra quoting of words in "eval" for safety 2023-09-09 22:11:50 -07:00
Bart Schaefer
5f984319b5 Marlon Richert: 51861: fix _approximate when compadd has been overridden
Before this patch, if compadd had been overridden by a function of the
same name, _approximate would not do corrections.
2023-08-27 15:27:45 -07:00
Bart Schaefer
2a854aae48 52028: improvements to _shadow / _unshadow, plus helper and doc 2023-08-27 15:22:14 -07:00
Marlon Richert
6c993144bd 51860: simplify suffix handling in _prefix to remove less accurate hack
This solves the following problems in the _prefix completer:
- The old code had logic for dealing with compstate[unambiguous] that
  was unnecessary. It works fine without it.
- Because of this logic, if a widget set compstate[insert]=1 after
  calling _main_complete, an `x` was left after the completion on the
  command line.
- If the same widget also set `compstate[to_end]=`, then instead, the
  last character of the inserted completion would be treated as an
  autoremovable suffix, with the actual suffix being inserted to the
  line as a normal character.
- After inserting a completion, the cursor would move to the end of the
  entire current word on the command, not the end of word that was
  inserted. This is not what you want with _prefix, since you are trying
  to complete a word _before_ the one on the command line, after which
  you usually want to insert a separator, such as a space or slash,
  before the next word.
2023-06-22 13:13:09 -07:00
Marlon Richert
caa1c38c6f 51348: Fix subscript completion bugs inside ~[...]
When completing inside ~[...] (_with_ the trailing `]` present), the
following bugs occured:
- Subscript completion was skipped entirely when there were one or more
  slashes ('/') in the subscript, which is incorrect, since slashes are
  allowed there.
- Instead of going through _complete, $_comps[-subscript-] was called
  immediately, causing _setup to be skipped.
- If succesful, _main_complete was exited right after, causing
  menu-style, comppostfuncs and other essential completion features to
  be skipped.
2023-05-21 03:24:17 +02:00
Bart Schaefer
0a69a2f6cb 50399: Completion/Base/Widget/_complete_debug
Properly local scope PS4 change
2022-09-28 17:11:08 -04:00
Bart Schaefer
a99f96797f 50323: create helper for shadowing builtins or existing functions and use it when redefining compadd et al. 2022-06-04 14:19:42 -07:00
Bart Schaefer
67d9a47d79 50184: fix inclusion of -S separator in -r options passed to compadd through _describe 2022-05-07 16:54:31 -07:00
Oliver Kiddle
16d5d6a9da 49597: add a helper for completing numbers with unit suffixes and separate out defaults, ranges and units in completion descriptions 2021-11-24 23:09:38 +01:00
Marlon Richert
c7f4634549 49572: Let _expand preserve array form w/out zstyle glob 2021-11-12 22:13:10 +01:00
Oliver Kiddle
dfb7ac94bb 49561: add zformat -F option, similar to -f but ternary expressions check for existence instead of doing math evaluation 2021-11-12 20:33:52 +01:00
Oliver Kiddle
4e9d0075f4 49519: quote completed options as needed and remove the now superfluous quotes from option specifications 2021-10-26 18:35:36 +02:00
Jun-ichi Takimoto
c7a391fa05 49493: fix '_arguments --' to correctly recognize optional argument 2021-10-24 21:32:58 +09:00
Marlon Richert
1a78e46564 49272: Set $COLUMNS in _call_program to ensure cached command output is sufficiently wide 2021-08-27 09:47:32 +02:00
Oliver Kiddle
e6fdd35a83 49150: consistently use singular form for headings on completion match groups 2021-07-09 00:23:52 +02:00
Bart Schaefer
3fe6bd56ed 48709: suppress error messages from comptry 2021-05-15 13:26:56 -07:00
Bart Schaefer
c231a2394f 48617: fix misuse of IGNORE_BRACES when initializing debug_indent 2021-04-19 14:40:44 -07:00
Marlon Richert
07a30613f0 48214: add file types to _expand completions, so they can be colored through complist 2021-03-31 01:20:36 +02:00
Marlon Richert
f4a248f9d3 48180: Start menu selection with select=long-list in menu style 2021-03-17 12:50:57 -05:00
oxiedi
df7fd1322c github #63: fix regression caused by 44274, with sort style -o could break _values 2021-02-07 00:51:41 +01:00
Peter Stephenson
8f42ecd8ee 47873: Improve completion within dynamic directory names 2021-01-27 11:16:55 +00:00
Jacob Menke
794edac638 47395: _store_cache: Don't leak the variable ${_cache_dir}. 2020-09-22 07:10:51 +00:00
oxiedi
c4540e154f 45895: ignore deduplication patterns in _sequence 2020-06-26 00:34:33 +02:00
Daniel Shahaf
deca7c9285 45730: _arguments: Add the -0 flag, which makes $opt_args be populated sanely.
Also, write/extend docstrings for sepjoin() and zjoin().
2020-05-03 01:27:36 +00:00
dana
02a33dd071 45130: _multi_parts: Always pass -f to compadd if given by caller 2019-12-26 20:26:58 -06:00
Wayne Davison
95882efbf7 44912: more quoting fixes in _expand
Don't set done_quote=1 if the glob result is empty.
2019-11-26 16:27:51 -08:00
Oliver Kiddle
64661103f0 unposted: fix missing local declarations in _sequence 2019-11-06 21:15:20 +01:00
dana
c6a14bd341 44767: _description: Ignore -J 2019-10-12 02:02:23 -05: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
Matthew Martin
39b0f5540c unposted: _pick_variant: Use ${(P) ::= rather than eval 2019-04-22 22:04:24 -05:00
Matthew Martin
6f35d6c0d0 44202 (tweaked): _normal: Add -P to reset precommands 2019-04-04 18:45:19 -05:00
Matthew Martin
7d84cde313 44201: _command_name: Check for external forcing precommand 2019-04-04 18:45:19 -05:00
Matthew Martin
5facfd3280 44200 (tweaked): Completion: Append to precommands in _normal 2019-04-04 18:45:19 -05:00
Matthew Martin
bb790c8f81 44199: _normal: Use zparseopts 2019-04-04 18:45:19 -05:00
Matthew Martin
922cf49830 44155: _pick_variant: Update builtin check 2019-03-21 22:04:55 -05:00
dana
79fae27f7c 43930: Improve _multi_parts performance 2018-12-30 09:38:06 -06:00
dana
e75c59f7f5 43928: _alternative: Evaluate (...) action syntax as with _arguments 2018-12-23 07:36:11 -06:00
Peter Stephenson
916ba78cd7 43752: Fix _expand quoting.
Quoting was not applied properly if globbing failed or was not applied.
2018-11-03 19:36:06 +00:00
Peter Stephenson
ba7de6d0d5 users/23169: only expand ~[...] under the same circumstances as other ~forms 2018-02-26 20:03:48 +00:00
Jun-ichi Takimoto
d303dfa7f5 42175 + 42177 + 42178: avoid localized output from external commands
_call_program and '_arguments --' will call _comp_locale before
calling external command for easier analysis of the output.
This is disabled by passing an option '-l'.
2017-12-28 11:35:34 +09:00
Oliver Kiddle
9dee8e00b9 41563: fix completion description alignment with _regex_words 2017-08-18 13:02:18 +02:00
Oliver Kiddle
7fd62f4367 40597: be flexible about order of options to _values 2017-03-04 00:33:20 +01:00
Oliver Kiddle
7d80b14702 40053: exclude current directory of active zsh from _external_pwds ompletion matches 2016-12-01 21:45:04 +01:00
Eitan Adler
110ffae9fe 40035: Cosmetic fixes for comments and documentation.
Mostly fixes to doubled words.
2016-11-29 17:13:52 +00:00
Daniel Shahaf
1955cceec7 40011: Make $_comp_priv_prefix only declared when required, and use that to have chgrp offer all groups under doas, ssh, etc as well. 2016-11-28 07:16:39 +00: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
Barton E. Schaefer
8e3e727933 39710 (cf. Alex George: 39709): handle the %o format in the "all-expansions" tag
Also allow a single unique match to appear in the "expansions" tag of _expand in the same way as _user_expand (users/21955 commit 18200dc0)
2016-10-22 21:53:21 -07:00