1
0
Fork 0
mirror of synced 2024-11-12 19:18:57 -05:00
Commit graph

15 commits

Author SHA1 Message Date
Eric Nielsen
e70bee54f3 [completion] Update init.zsh and README.md
and use local string variable instead of "hardcoding" the string inside
`${}`.
2018-05-24 20:37:16 -05:00
AtomicCoding
a9828a8097 [completion] LS_COLORS independent of utility module
Completion module can now be loaded from an arbitrary location.

Closes #275
2018-05-24 20:15:27 -05:00
Eric Nielsen
56b61e211d [completion] Simplify matcher-list syntax
Refactor using `+` instead of repeating the case insensitive pattern.
2018-04-03 08:57:30 -05:00
Eric Nielsen
e1a2a38a0f [completion] Prefer left-matching before fuzzy
all still being case insensitive.

Having just fuzzy matching returns too many matches in the average case.
2018-03-23 08:36:16 -05:00
Eric Nielsen
98eef4184a [completion] Improve fuzzy completion matching
This will present the menu in case of ambiguous matches, and also expand
by any separator, not just `[._-]`.

Based on the configuration suggested at
https://superuser.com/a/815317/637926

Closes #212
2018-03-22 11:41:21 -05:00
Eric Nielsen
017ff99851 [completion] Don't beep on an ambiguous completion
Remove beep when completion is shown. We don't want that to sound like
an error.
2018-03-01 08:25:33 +01:00
Eric Nielsen
cfdf36d76b [completion] Ask when completion list is long
To achieve this, we have to make sure that the following is not set:
* `zstyle ':completion:*:default' list-prompt '...'`

otherwise long completion lists will be paginated (without prompting).

The list is considered too long when it's greater than `${LISTMAX}`,
which has a value of 100 by default.

Also remove options being set (or unset) that are already the default,
namely:
* `AUTO_MENU <D>`
* `AUTO_LIST (-9) <D>`
* `MENU_COMPLETE (-Y)`

And remove the space character from the beginning of the messages.

Fixes #136. Closes #248
2018-03-01 08:25:33 +01:00
Eric Nielsen
bc742f0023
[completion] Remove smart editor completion
as Vim can open archives, and Emacs can virtually open everything  :- )

I suggest we don't try to be smart here.

Closes #229
2017-11-29 09:06:41 -05:00
Eric Nielsen
8ba34e68e5 [completion] Don't zcompile the zcompdump file
as this is already being done in `zlogin`. Centralizing all the
compilation in one place.

Closes #218
2017-11-24 19:08:20 -05:00
Matt Hamilton
4ac66646c4 [completion] add ${zcompdump_file} option
This commit assumes that the user-provided variable for the filename
will start with '.zcomp'. This is used in the .zlogin for zcompiling the
completion file. Sourcing the .zimrc file within the .zlogin file is
something I'd rather not do, and this seems like a good compromise. If
this becomes an issue, the file can be sourced an the var can be used
instead.

Closes #42
2016-04-16 14:56:53 -07:00
Matt Hamilton
b6b3620f34 not in a function; remove local 2015-12-28 01:56:07 -05:00
Matt Hamilton
a1a56ac63f use consistent variable style 2015-12-19 09:48:29 -05:00
Matt Hamilton
01838f0083 add compdef for pacman aliases
The recommended order for the module loading has been changed. The last
module to be loaded should be 'completion'. This ensures all completions
set by other modules are dumped and included in the completion.
Because of this, any compdefs like this one (making the pacman aliases
use pacman completion) must be set in the compdefs.zsh file, and loaded
with the completion module. This means the compdefs must be wrapped with
conditional statements to ensure such aliases/functions have been set by
previous modules. I may abstract this conditional to a function in the
future to make this an easier process.
2015-12-17 03:06:12 -05:00
Matt Hamilton
2f9b8437e2 It is probably better to prepend ranther than append 2015-12-16 14:56:54 -05:00
Matt Hamilton
3a62391e0e initial commit 2015-12-15 00:12:17 -05:00