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.
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.).
Changes:
* Simplify zstyle name `skip-virtualenvwrapper-init` to `initialize`
avoiding double negation in name
* Always perform `eval (pyenv virtualenv-init -)` at initialization
* Prefer `virtualenvwrapper_lazy` over `virtualenvwrapper` when available
* Honor `VIRTUALENVWRAPPER_VIRTUALENV` if it is defined.
* Document about `VIRTUALENVWRAPPER_PYTHON` and `VIRTUALENVWRAPPER_VIRTUALENV`
(this would be particularly important in macOS after recent homebrew update)
* Add additional documentation for `initialize` in _README.md_ and _zpreztorc_
* Add aliases `py2`, `py3` as shortcut for `python2`, `python3` respectively
This includes some improvements by @indrajitr in addition to the main migration.
The first step was to avoid PROMPT and RPROMPT modification when possible (which may help resolve some other issues as well relating to zsh crashes with the sorin prompt) then update the displayed git information in a separate variable rather than a command.
We use zsh-async for creating and running background tasks. The sorin prompt uses it to update git info without blocking the prompt from displaying (because of how long it can take). In the future it may be worth moving more tasks and more prompts to using this.
The move to zsh-async does make the git prompt slower in some circumstances (most noticeable in large repos), but this is a worthwhile tradeoff to avoid the cache file which had a number of potential security holes.
We have also switched to adding zsh-async as an external submodule (rather than the version bundled with pure) which may cause some migration headaches, but it will be worth it in the long run.
Previously I made a change to try and bind these unbound keys to the main
keymap in thoughts that in vicmd or viins mode it would fallback if it wasn't
bound in vicmd/viins mode. This turned out not to be the case.
Explicitly bind the keys in both viins and vicmd mode as works properly.
Changes:
- Rename `rsync_scp_wrap` to `noremoteglob` and make it more generally usable
- Enable completion support for commands wrapped with `noremoteglob`
- Tighten up internal variable usages
- Update documentation for 'noremoteglob' function
Changes:
* In prezto, function names are hyphenated ('-') by convention,
rename `promptpwd` to `prompt-pwd` accordingly.
* Unset local variable `current_pwd` proactively.
* Tweak additional documentation for `prompt-pwd`.
We cannot always assume availability of `pip`, it can be `pip2` or `pip3`
instead. We detect the first available one and use it for generating the
completion cache.
If you are in a tmux session, and auto-start is enabled
Then you `sudo su` and then `su <username>` it will re-attach, in a loop.
This resolves that problem, by forcing a detach before a (re)attach.
With editors that support it it will setup preferences so that it
will use 2 spaces as the indent, except in .gitignore and .gitmodules
which in our files use tabs.
For more info see http://EditorConfig.org
Currently rm/cp/ln/mv are aliased to rm/cp/ln/mv -i so that it will
prompt before removing files.
Some people would not like this functionality and wish for an easy way to
disable it. This adds a new option:
zstyle ':prezto:module:utility' safe-ops yes/no
It is enabled by default even if zstyle is not set, but can be set to no
to disable these aliases.
This should resolve issue #205
Somewhere around zsh 5.1, there was a change which turned typeset (and
most likely local) into a keyword. In older versions of zsh, using
`local x=()` will cause the () to be treated as a glob qualifier.
Fixes#1373
Usage of `(( ... ))` over `[[ ... ]]` is preferred for arithmetic expression
since the former is less error prone.
Also, unset local variable whenever possible.
Bind the remaining unbound keys in the main mode so that they
don't result in undefined functionality when pressed. (Often this
will change the casing of one/most/all of the characters you've
typed or even stranger things). In emacs mode this usually just
inserts a tilde, but this will fix that as well so nothing happens
when unbound keys are pressed.
Since there isn't any binding which does "nothing", create a noop
ZLE widget and bind them to that.
The user or other modules are still able to override these bindings
either by overriding the main keymap or setting a keymap in one
of the other modes which will take precedence over the main fallback.
Changes:
- Use git.io over 'https'
- Add extra check to conform to *.github.com URLs
- Use built-in _urls function for completion
- Update readme with GitHub blog URL
* [editor] Add bindkey-all function to show all bound keys
Function which allows you to see all the bound keys for all of
the different keymaps. It does accept arguments and passes them
through to bindkey -m "$keymap" so you could set a shortcut to
all keymaps as well if you wished.
Makes it much easier to see and grep what keys are bound to each of
the different keymaps.
When no arguments are given it will print keymap headers to stderr,
if given arguments it will not print anything extra to the screen.
* [editor] Update README to include information about bindkey-all funct.
Escape all $ except the first $. Escape all backtick `'s. This prevents
variable names or shell expansions placed as branch names from
remotely exploiting code.
Fixes issue #1267 for sorin prompt.