1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-11-14 21:11:13 +00:00
Commit Graph

39 Commits

Author SHA1 Message Date
Indrajit Raychaudhuri
f1e24d3fd8 completion: Unset local variable outside condition block
Unset `curl_prefix` outside condition block so that it is always
cleared. Also, avoid `brew --prefix <foo>` since it is triggering ruby
in fallback flow when `<foo>` is not present.

Also, apply minor formatting tweaks.
2021-06-01 14:48:30 -05:00
Indrajit Raychaudhuri
9037fda36d completion: Avoid double-quoting LS_COLORS for completion
Double-quoting `LS_COLORS` prevents it from loading in environment,
which isn't what we want.
2021-05-25 18:12:45 -05:00
Indrajit Raychaudhuri
7052e2a002 completion: Skip completion lookup for key-only brewed curl
Skip lookup for `_curl` completion function to avoid fallback
completion having higher priority.
2021-05-23 19:40:32 -05:00
Indrajit Raychaudhuri
c6b59f8bb1 completion: Set standard style used by 'list-colors'
Set `LS_COLORS` if not already available so that it is available as
standard style `list-colors`.

This needs to be explicitly set in completion module to ensure that the
variable is available even if 'utility' module is not loaded earlier.
2021-05-21 13:37:40 -05:00
Indrajit Raychaudhuri
e87a9b0a93 completion: Add completion for keg-only brewed curl when available
As curl bundled with macOS does not include `_curl` definitions, one
way to make `_curl` available is to install curl from Homebrew.

However, since curl from Hombrew is _keg-only_, its function path needs
to be explicitly included.
2021-05-05 11:49:57 -05:00
Indrajit Raychaudhuri
f651140f2c completion: Add note about keep zcompdump younger than cache time 2021-04-30 17:52:43 -05:00
mattmc3
6a70bdfff2 Ensure compinit updates its modified date
`compinit -i` doesn't always change zcompdump, which means that the
`compinit -C` condition fails to run until the completions change.
When we `compinit -i`, we should touch the file too to solve this.
2021-04-30 17:52:43 -05:00
Texas Toland
ff91c8d410
Make .zcomp* location configurable (#1842) 2020-06-04 13:53:44 -07:00
Indrajit Raychaudhuri
6f603df7a6 general: Miscellaneous documentation updates
- Add missing documentation for options and environment variables
- Rearrange definition and documentation of 'Options', 'Variables'
  and 'Aliases' in a consistent order
2018-10-12 12:04:49 -05:00
Indrajit Raychaudhuri
cd70822994 completion: Compact path to global ssh known hosts file 2018-06-26 13:43:27 -05:00
Alexander Neumann
b11b9ce788 Fix path to global ssh known hosts file
The path to the global known hosts file is /etc/ssh/ssh_known_hosts, not
/etc/ssh_hosts.
2018-06-14 11:31:29 -07:00
Indrajit Raychaudhuri
a60499f933 [general] Miscellaneous cleanup and formatting 2017-08-04 13:45:56 -05:00
Indrajit Raychaudhuri
591d087ccc [completion] Allow ignores for '/etc/hosts' entries to be dynamic
By keeping the variable `_etc_host_ignores` around, it can be resolved
lazily which is turn should allow selective ignores on a per invocation
basis.

Also, `'\#'` doesn't need to be added to `_etc_host_ignores` anymore.
It is enforced inline.
2017-07-27 12:43:22 -05:00
Indrajit Raychaudhuri
9b6bf4a7cd [completion] Support ignoring '/etc/hosts' entries in host completion
Entries from static '/etc/hosts' can now be ignored via 'zstyle' based
configuration. Both IP address and corresponding hostname will be ignored
during host completion. However, some of the entries ignored from '/etc/hosts'
still might appear during completion because of their presence in 'ssh'
configuration ('~/.ssh/config') or history ('~/.ssh/ssh_hosts',
'~/.ssh/known_hosts' etc.).
2017-07-26 23:42:34 -05:00
Indrajit Raychaudhuri
6e1f4ddd19 [completion] Minor cleanup of zstyle completion 'tag-order'
De-duplicate common zstyle 'tag-order' for ssh, scp and rsync.
2017-07-10 10:47:54 -07:00
Indrajit Raychaudhuri
3f99519021 Prefer evaluation over test for arithmetic expression
Usage of `(( ... ))` over `[[ ... ]]` is preferred for arithmetic expression
since the former is less error prone.

Also, unset local variable whenever possible.
2017-07-08 00:32:31 -07:00
Kaleb Elwert
871b15663c Cache the completion for a quicker startup
The original idea was by @samjonester in #1210. This version aims to avoid
relying on the stat or date programs because they have different flags depending
on the OS and if it uses BSD or GNU coreutils.
2017-05-02 17:50:24 -07:00
Anton Löfgren
5c0e68f75f completion: Cap max-errors at 7 to avoid hanging (#953)
7 is pretty arbitrarily chosen, but seems like a reasonable tradeoff, at
least the completion no longer shows symptoms of exponential
time-growth when trying to complete something completely wrong.

This fixes #946.
2017-04-13 02:47:51 -07:00
Scott Stevenson
6a812ed36b Correct typos in completion module 2015-05-19 17:50:40 -04:00
Sorin Ionescu
88aee30ae8 [Fix #762] Use $LOGNAME instead of $USER
$USER is deprecated.
2015-02-13 00:00:27 -05:00
Sorin Ionescu
a84ac5b002 Only one newline at end of file 2014-10-09 23:38:15 -04:00
Jongwook Choi
62198b0326 Display full command line on suggestion for the kill command
For the zsh suggestion for the 'kill' command, show full command line
(command: usually with arguments) instead of only the executable name (comm).
2014-10-06 17:03:53 -04:00
Sorin Ionescu
b42479a7c7 Set WORDCHARS in the editor module 2013-04-25 19:05:07 -04:00
Sorin Ionescu
5d4282c43d [Fix #347] Move 'users' from tag-order to group-order 2012-12-23 11:27:39 -05:00
Shahar Mintz
decf3cd875 Fix auto completion for SSH hosts when saved with a non-standard port 2012-12-20 18:55:52 -05:00
Sorin Ionescu
8cdf06e386 [#255] Use $ZDOTDIR or $HOME 2012-09-03 16:51:32 -04:00
Sorin Ionescu
fb9a20591f [Fix #197] Rebrand as Prezto
Conflicts:
	README.md
	runcoms/zshenv
2012-09-03 16:51:27 -04:00
Sorin Ionescu
1ea238e276 [Fix #256] Rename .zcache to .zcompcache 2012-09-01 17:58:15 -04:00
Sorin Ionescu
3b87a4db48 Update external completions 2012-08-27 18:49:45 -04:00
Sorin Ionescu
9a52ecb21b Increase heading readability 2012-08-04 14:48:32 -04:00
Sorin Ionescu
060d9064f8 [Fix #202] Load modules all or nothing 2012-08-04 14:32:59 -04:00
Sorin Ionescu
be2c8decdb Use $HOME instead of ~ 2012-05-20 20:15:34 -04:00
Sorin Ionescu
c0f2007646 [Fix #135] Set completion default list-colors 2012-05-20 20:15:34 -04:00
Sorin Ionescu
c24273e4d2 Rename the completion module zstyle 2012-05-20 20:15:12 -04:00
Indrajit Raychaudhuri
e79fc7a1aa Add IPv6 patterns to ignore list of host completion 2012-05-07 11:56:07 -04:00
Sorin Ionescu
5edd663510 [Fix #160] Exclude all words but the current one 2012-05-05 21:59:03 -04:00
Sorin Ionescu
e5ec94af42 Check for non-empty files, not just existance 2012-05-05 18:08:25 -04:00
Sorin Ionescu
6233ec6aad [#23] Add a module loading function 2012-04-08 15:07:11 -04:00
Sorin Ionescu
92816f6db7 [#23] Convert completion into a module 2012-04-05 13:39:42 -04:00