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

1902 Commits

Author SHA1 Message Date
Indrajit Raychaudhuri
b3c7d21d31 Adjust GitHub templates with commented lines 2017-07-28 00:43:39 -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
19435b16ea [python] Improve and document virtualenvwrapper initialization flow
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
2017-07-26 01:42:31 -05:00
Kaleb Elwert
7e7124e84a Update agnoster prompt to include security fix
Fixes #1267
2017-07-25 14:15:07 -07:00
Jeff Widman
09fe5191e7 Merge pull request #1404 from sorin-ionescu/jeffwidman-fix-typos
Fix typos
2017-07-25 03:08:45 -06:00
Jeff Widman
0fc49ac4f0 Fix typos 2017-07-25 03:07:59 -06:00
Stephen Larew
e364eac8f5 ssh: update README to reflect macOS changes 2017-07-24 11:56:48 -07:00
Kaleb Elwert
9bdc1b35d5 Migrate sorin prompt to zsh-async (#1385)
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.
2017-07-24 11:55:02 -07:00
Samantha McVey
9f1a41de90 Fix unbound keys in vicmd/viins mode
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.
2017-07-24 10:26:19 -07:00
Indrajit Raychaudhuri
d6276e8025 [osx] Support custom keyword used by mand to open man pages in Dash.app
`zstyle` based customization is now avaialble in *zpreztorc*.
2017-07-23 13:19:04 -05:00
Indrajit Raychaudhuri
8846db9d4d [node] Always quote files when source-ing 2017-07-23 00:35:56 -05:00
Indrajit Raychaudhuri
eddbdd9416 Update submodules URLs to use git URLs explicitly
Even though GitHub redirects git calls based on user-agent, using git URLs
consistently is preferable.
2017-07-22 14:12:17 -05:00
Indrajit Raychaudhuri
24b710f545 [general] Fix incorrect fenced code indentation 2017-07-22 13:57:43 -05:00
Indrajit Raychaudhuri
a60fe47359 [utility] Refactor rsync_scp wrapper function and add completion support
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
2017-07-22 13:13:52 -05:00
Indrajit Raychaudhuri
17a59bada7 [prompt] Rename helper function promptpwd to prompt-pwd for consistency
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`.
2017-07-22 13:13:00 -05:00
Indrajit Raychaudhuri
ac628c9059 [general] Switch code block formatting to use fence formatting
Changes:
* Indented code block doesn't support syntax highlighting, use fenced
formatting (```) instead for better syntax highlighting
* Wrap commands/functions in backticks
* Typo fixes
2017-07-22 13:11:29 -05:00
Indrajit Raychaudhuri
bcbaea27af [python] Detect actual pip command available for generating completion cache
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.
2017-07-22 13:08:33 -05:00
Indrajit Raychaudhuri
608f291ad3 [utility] Reuse interactive aliases when 'safe-ops' is set
When `safe-ops` is set, we can reuse the aliases that are already available.
2017-07-21 09:35:14 -07:00
Kaleb Elwert
2db7f62c2b [homebrew] Add documentation for brewo and casko 2017-07-19 10:41:39 -07:00
Karim Benbouali
46e34d30b8 module(homebrew): add outdated options for cask and brew commands 2017-07-19 08:26:18 -05:00
Indrajit Raychaudhuri
cb4be65d29 [utility] Update documentation for 'safe-ops'
Update formatting and wordings to be more consistent with rest of prezto
documentation.
2017-07-17 19:57:32 -05:00
Indrajit Raychaudhuri
f236344fc8 [utility] Remove premature call to compdef
This is a temporary fix to work-around a minor regression in 90071d3.
2017-07-15 00:54:15 -05:00
Kaleb Elwert
90071d3ad0 utility: fix completion for rsync and scp 2017-07-14 13:28:29 -07:00
Indrajit Raychaudhuri
c1a8fc0469 Cleanup spurious whitespace 2017-07-13 16:41:33 -05:00
Indrajit Raychaudhuri
b0c85eddf6 [command-not-found] Load brew 'command-not-found' if homebrew tap is available
Homebrew has _official_ tap that supports `command-not-found`.
Enable it when possible.
2017-07-12 20:51:44 -07:00
Kaleb Elwert
04bfb5131b fasd: fall back to submodule only if command is missing 2017-07-11 12:42:55 -07:00
Demjan Kaluzki
19990c8025 Add fasd as an external module 2017-07-11 12:40:37 -07:00
Zhiming Wang
d25b251ef7 git: Add revert to special action contexts
revert is very similar to cherry-pick and has a sequence variant.
2017-07-11 12:18:19 -07:00
alan blount
0f3a5f745e Detach from tmux if attached, before attach (#1088)
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.
2017-07-11 12:15:24 -07:00
Khai Do
ebae698f70 change alias to gfcr 2017-07-11 12:10:18 -07:00
Khai Do
d69070268a add alias for cloning a repo including all submodules 2017-07-11 12:10:18 -07:00
Kaleb Elwert
86de7a8d2e Small editorconfig file cleanup 2017-07-11 12:07:09 -07:00
Samantha McVey
1221e4030d Add a .editorconfig file to setup tabstyle preferences
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
2017-07-11 12:05:16 -07:00
Kaleb Elwert
17bc7530ba Update documentation on safeops 2017-07-11 11:58:56 -07:00
Kaleb Elwert
aad91beb3c [utility] Move the safeops aliases into their own section and add XXi variants 2017-07-11 11:52:47 -07:00
Samantha McVey
2a75fba6a8 [utility] Add safe-ops zstyle option to disable safe rm/cp/ln/mv
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
2017-07-11 11:48:05 -07: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
Kaleb Elwert
7d109fb3fa [editor] Ensure unbound_keys is defined as an array
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
2017-07-10 10:30:23 -07:00
Kaleb Elwert
899c176942 python: add ubuntu locations for virtualenvwrapper.sh 2017-07-10 00:03:36 -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
Samantha McVey
e3520b737f [editor] Fix undefined results with unbound keys in viins/vicmd
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.
2017-07-07 14:10:54 -07:00
Benjamin Chrétien
db48a22c74 gpg: fix enable-ssh-support detection
That line may be commented in the config file.
2017-07-07 13:54:19 -07:00
Indrajit Raychaudhuri
e6136a517b [git] Fix 'git-hub-shorten-url' helper
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
2017-07-07 13:52:17 -07:00
Kaleb Elwert
7d5beeab51 Add comments into each of the function files to make them easier to find 2017-07-06 16:13:36 -07:00
Kaleb Elwert
a70bce3ea6 Ensure we use the same function definition syntax everywhere 2017-07-06 16:13:36 -07:00
Samantha McVey
75a60bc7bf [editor] Add bindkey-all function to show all bound keys (#1358)
* [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.
2017-07-05 23:05:31 -07:00
Samantha McVey
5cd3380d9d [prompt/sorin] Fix branch code exploit vulnerability
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.
2017-07-05 13:06:36 -07:00
Brian K. Christensen
c6124d4d37 Updater: fix bug regarding source init in new updater logic 2017-07-05 11:44:26 -07:00
Luiz Gonzaga dos Santos Filho
09b333eb41 Fix README example on tmux's default session name 2017-07-03 17:44:14 -07:00