Skip to content

Commit

Permalink
Merge branch 'master' of github.com:nosyjoe/prezto
Browse files Browse the repository at this point in the history
* 'master' of github.com:nosyjoe/prezto: (55 commits)
  uses nosyjoe theme instead of philipp after renaming
  disables fvm in favor of rbenv
  updates some modules
  fixes doubled username/host prompt on ssh sessions
  Move python-info call in paradox from preexec to precmd
  Add missing alias to utility README
  Rework diff function
  Remove additional newlines in issue and pull request templates
  Add initial issue and pull request templates
  Add note to CONTRIBUTING.md about zstyle
  Add code style to CONTRIBUTING.md
  Update is-callable to also check builtins
  Fix indentation in README
  Feat (docker): add docker aliases (sorin-ionescu#1147)
  Doc (ruby): add doc on bundle clean alias
  Add bundle clean alias
  Don't use a deprecated argument as a python example
  Add note about working around preexisting runcoms
  completion: Cap max-errors at 7 to avoid hanging (sorin-ionescu#953)
  Allow syntax highlighting pattern styles (sorin-ionescu#1192)
  ...
  • Loading branch information
nosyjoe committed Apr 19, 2017
2 parents a05eb8a + d204f84 commit 8d8d830
Show file tree
Hide file tree
Showing 51 changed files with 1,009 additions and 299 deletions.
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Please check if a similar issue already exists or has been closed before before opening your issue.

### Description

[Description of the bug or feature]

### Expected behavior

[What you expected to happen]

### Actual behavior

[What actually happened]

### Steps to Reproduce

1. [First Step]
2. [Second Step]
3. [and so on...]

### Versions

- Prezto commit:
- ZSH version:
- OS information:
9 changes: 9 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Please be sure to check out our [contributing guidelines](https://github.com/sorin-ionescu/prezto/blob/master/CONTRIBUTING.md) before submitting your pull request.

Fixes #

## Proposed Changes

-
-
-
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "modules/autosuggestions/external"]
path = modules/autosuggestions/external
url = https://github.com/zsh-users/zsh-autosuggestions
[submodule "modules/history-substring-search/external"]
path = modules/history-substring-search/external
url = https://github.com/zsh-users/zsh-history-substring-search.git
Expand All @@ -16,6 +19,3 @@
[submodule "modules/prompt/functions/pure"]
path = modules/prompt/external/pure
url = https://github.com/sindresorhus/pure.git
[submodule "modules/autosuggestions/external"]
path = modules/autosuggestions/external
url = https://github.com/tarruda/zsh-autosuggestions
12 changes: 12 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@ improve its performance, do not hesitate to fork and send pull requests.
- Open a [pull request][4] that relates to but one subject with a clear
title and description in grammatically correct, complete sentences.

#### Code Style

- Indent using 2 spaces. No tabs.
- Put `; do` and `; then` on the same line as the `while`, `for` or `if`.
- Local variables should be used whenever possible.
- Use `snake_case` for variable and function naming.
- Local variables should be lower cased.
- Global variables should be upper cased.
- Use `$(command)` instead of backticks.
- Avoid `eval` if possible.
- Prefer `zstyle` over environment variables for configuration.

#### Modules

- A *README.md* must be present.
Expand Down
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright (c) 2009-2011 Robby Russell and contributors
Copyright (c) 2011-2017 Sorin Ionescu and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
38 changes: 12 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,31 @@ version is 4.3.17.

1. Launch Zsh:

zsh
`zsh`

2. Clone the repository:

git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
`git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"`

3. Create a new Zsh configuration by copying the Zsh configuration files
provided:

```
setopt EXTENDED_GLOB
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
done
```

Note: If you already have any of the given config files, ln will error. In
simple cases you can add `source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"` to
the bottom of your `.zshrc` to load prezto but keep your config intact. For
more complicated setups, it is recommended that you back up your original
configs and replace them with the provided prezto runcoms.

4. Set Zsh as your default shell:

chsh -s /bin/zsh
`chsh -s /bin/zsh`

5. Open a new Zsh terminal window or tab.

Expand Down Expand Up @@ -83,29 +91,7 @@ The [Zsh Reference Card][7] and the [zsh-lovers][8] man page are indispensable.
License
-------

(The MIT License)

Copyright (c) 2009-2011 Robby Russell and contributors.

Copyright (c) 2011-2015 Sorin Ionescu and contributors.

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
This project is licensed under the MIT License.

[1]: http://www.zsh.org
[2]: http://i.imgur.com/nrGV6pg.png "sorin theme"
Expand Down
22 changes: 14 additions & 8 deletions init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ unset min_zsh_version
function pmodload {
local -a pmodules
local pmodule
local pfunction_glob='^([_.]*|prompt_*_setup|README*)(-.N:t)'
local pfunction_glob='^([_.]*|prompt_*_setup|README*|*~)(-.N:t)'

# $argv is overridden in the anonymous function.
pmodules=("$argv[@]")

# Add functions to $fpath.
fpath=(${pmodules:+${ZDOTDIR:-$HOME}/.zprezto/modules/${^pmodules}/functions(/FN)} $fpath)
fpath=(${pmodules:+$ZPREZTODIR/modules/${^pmodules}/functions(/FN)} $fpath)

function {
local pfunction
Expand All @@ -40,7 +40,7 @@ function pmodload {
setopt LOCAL_OPTIONS EXTENDED_GLOB

# Load Prezto functions.
for pfunction in ${ZDOTDIR:-$HOME}/.zprezto/modules/${^pmodules}/functions/$~pfunction_glob; do
for pfunction in $ZPREZTODIR/modules/${^pmodules}/functions/$~pfunction_glob; do
autoload -Uz "$pfunction"
done
}
Expand All @@ -49,19 +49,19 @@ function pmodload {
for pmodule in "$pmodules[@]"; do
if zstyle -t ":prezto:module:$pmodule" loaded 'yes' 'no'; then
continue
elif [[ ! -d "${ZDOTDIR:-$HOME}/.zprezto/modules/$pmodule" ]]; then
elif [[ ! -d "$ZPREZTODIR/modules/$pmodule" ]]; then
print "$0: no such module: $pmodule" >&2
continue
else
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/modules/$pmodule/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/modules/$pmodule/init.zsh"
if [[ -s "$ZPREZTODIR/modules/$pmodule/init.zsh" ]]; then
source "$ZPREZTODIR/modules/$pmodule/init.zsh"
fi

if (( $? == 0 )); then
zstyle ":prezto:module:$pmodule" loaded 'yes'
else
# Remove the $fpath entry.
fpath[(r)${ZDOTDIR:-$HOME}/.zprezto/modules/${pmodule}/functions]=()
fpath[(r)${ZPREZTODIR}/modules/${pmodule}/functions]=()

function {
local pfunction
Expand All @@ -71,7 +71,7 @@ function pmodload {
setopt LOCAL_OPTIONS EXTENDED_GLOB

# Unload Prezto functions.
for pfunction in ${ZDOTDIR:-$HOME}/.zprezto/modules/$pmodule/functions/$~pfunction_glob; do
for pfunction in $ZPREZTODIR/modules/$pmodule/functions/$~pfunction_glob; do
unfunction "$pfunction"
done
}
Expand All @@ -86,6 +86,12 @@ function pmodload {
# Prezto Initialization
#

# This finds the directory prezto is installed to so plugin managers don't need
# to rely on dirty hacks to force prezto into a directory. Additionally, it
# needs to be done here because inside the pmodload function ${0:h} evaluates to
# the current directory of the shell rather than the prezto dir.
ZPREZTODIR=${0:h}

# Source the Prezto configuration file.
if [[ -s "${ZDOTDIR:-$HOME}/.zpreztorc" ]]; then
source "${ZDOTDIR:-$HOME}/.zpreztorc"
Expand Down
2 changes: 1 addition & 1 deletion modules/autosuggestions/external
Submodule external updated 68 files
+6 −0 .gitmodules
+36 −0 CHANGELOG.md
+17 −11 Makefile
+22 −4 README.md
+1 −1 VERSION
+0 −325 script/test.zsh
+54 −0 script/test_runner.zsh
+19 −7 src/bind.zsh
+20 −0 src/config.zsh
+4 −0 src/highlight.zsh
+11 −0 src/strategies/default.zsh
+52 −0 src/strategies/match_prev_cmd.zsh
+8 −10 src/suggestion.zsh
+63 −11 src/widgets.zsh
+45 −0 test/bind_test.zsh
+73 −0 test/highlight_test.zsh
+0 −62 test/shunit2-2.1.6/bin/gen_test_results.sh
+0 −36 test/shunit2-2.1.6/bin/which
+0 −214 test/shunit2-2.1.6/doc/CHANGES-2.1.txt
+0 −504 test/shunit2-2.1.6/doc/LGPL-2.1
+0 −540 test/shunit2-2.1.6/doc/README.html
+0 −214 test/shunit2-2.1.6/doc/README.txt
+0 −104 test/shunit2-2.1.6/doc/RELEASE_NOTES-2.1.0.txt
+0 −88 test/shunit2-2.1.6/doc/RELEASE_NOTES-2.1.1.txt
+0 −83 test/shunit2-2.1.6/doc/RELEASE_NOTES-2.1.2.txt
+0 −84 test/shunit2-2.1.6/doc/RELEASE_NOTES-2.1.3.txt
+0 −100 test/shunit2-2.1.6/doc/RELEASE_NOTES-2.1.4.txt
+0 −128 test/shunit2-2.1.6/doc/RELEASE_NOTES-2.1.5.txt
+0 −112 test/shunit2-2.1.6/doc/RELEASE_NOTES-2.1.6.txt
+0 −13 test/shunit2-2.1.6/doc/TODO.txt
+0 −74 test/shunit2-2.1.6/doc/coding_standards.txt
+0 −14 test/shunit2-2.1.6/doc/contributors.txt
+0 −34 test/shunit2-2.1.6/doc/design_doc.txt
+0 −292 test/shunit2-2.1.6/doc/rst2html.css
+0 −880 test/shunit2-2.1.6/doc/shunit2.html
+0 −562 test/shunit2-2.1.6/doc/shunit2.txt
+0 −10 test/shunit2-2.1.6/examples/equality_test.sh
+0 −16 test/shunit2-2.1.6/examples/lineno_test.sh
+0 −17 test/shunit2-2.1.6/examples/math.inc
+0 −27 test/shunit2-2.1.6/examples/math_test.sh
+0 −89 test/shunit2-2.1.6/examples/mkdir_test.sh
+0 −17 test/shunit2-2.1.6/examples/party_test.sh
+0 −1,011 test/shunit2-2.1.6/lib/shflags
+0 −39 test/shunit2-2.1.6/lib/shlib
+0 −227 test/shunit2-2.1.6/lib/versions
+0 −1,048 test/shunit2-2.1.6/src/shunit2
+0 −124 test/shunit2-2.1.6/src/shunit2_test.sh
+0 −209 test/shunit2-2.1.6/src/shunit2_test_asserts.sh
+0 −89 test/shunit2-2.1.6/src/shunit2_test_failures.sh
+0 −177 test/shunit2-2.1.6/src/shunit2_test_helpers
+0 −249 test/shunit2-2.1.6/src/shunit2_test_macros.sh
+0 −165 test/shunit2-2.1.6/src/shunit2_test_misc.sh
+0 −41 test/shunit2-2.1.6/src/shunit2_test_standalone.sh
+56 −0 test/strategies/default_test.zsh
+74 −0 test/strategies/match_prev_cmd_test.zsh
+102 −0 test/strategies_test.zsh
+0 −419 test/stub-1.0.2.sh
+46 −0 test/suggestion_test.zsh
+60 −0 test/test_helper.zsh
+161 −0 test/widgets/accept_test.zsh
+77 −0 test/widgets/clear_test.zsh
+26 −0 test/widgets/execute_test.zsh
+88 −0 test/widgets/modify_test.zsh
+84 −0 test/widgets/partial_accept_test.zsh
+1 −0 vendor/shunit2
+1 −0 vendor/stub.sh
+0 −1 zsh-autosuggestions.plugin.zsh
+1 −0 zsh-autosuggestions.plugin.zsh
+178 −29 zsh-autosuggestions.zsh
2 changes: 1 addition & 1 deletion modules/completion/external
Submodule external updated 74 files
+32 −38 README.md
+72 −0 src/_afew
+414 −144 src/_ansible
+81 −9 src/_ansible-galaxy
+23 −9 src/_ansible-playbook
+85 −0 src/_archlinux-java
+12 −2 src/_artisan
+21 −0 src/_atach
+0 −139 src/_celery
+958 −0 src/_cf
+77 −0 src/_chattr
+187 −34 src/_cmake
+60 −0 src/_column
+1 −1 src/_console
+0 −105 src/_cpanm
+68 −0 src/_dad
+38 −12 src/_dget
+0 −53 src/_ditz
+0 −294 src/_docker-machine
+25 −0 src/_drush
+0 −44 src/_dzen2
+49 −0 src/_envdir
+26 −0 src/_fab
+21 −0 src/_gas
+0 −499 src/_gem
+225 −0 src/_git-journal
+0 −272 src/_github
+4 −4 src/_go
+25 −0 src/_google
+0 −209 src/_heroku
+0 −177 src/_hledger
+8 −4 src/_httpie
+0 −70 src/_id3
+0 −116 src/_id3v2
+0 −247 src/_iw
+0 −145 src/_jekyll
+65 −0 src/_jrnl
+0 −62 src/_lein
+0 −61 src/_logger
+54 −0 src/_lsattr
+97 −0 src/_lsblk
+0 −314 src/_lunar
+25 −0 src/_lunchy
+0 −276 src/_manage.py
+163 −0 src/_multirust
+0 −26 src/_pactree
+58 −0 src/_paste
+95 −0 src/_patool
+0 −89 src/_pear
+25 −0 src/_pgsql_utils
+100 −0 src/_pixz
+28 −0 src/_port
+0 −43 src/_primus
+19 −0 src/_rails
+36 −5 src/_ralio
+0 −94 src/_rebar
+130 −0 src/_rg
+287 −0 src/_rkt
+88 −0 src/_rsvm
+106 −0 src/_scl
+66 −0 src/_scrub
+0 −233 src/_socat
+21 −0 src/_srm
+0 −456 src/_symfony
+0 −35 src/_tarsnap
+22 −0 src/_tmuxinator
+59 −0 src/_trash-empty
+59 −0 src/_trash-list
+64 −0 src/_trash-put
+58 −0 src/_trash-restore
+163 −0 src/_udisksctl
+143 −0 src/_ufw
+0 −164 src/_veewee
+42 −8 src/_yaourt
5 changes: 3 additions & 2 deletions modules/completion/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ zstyle ':completion:*' completer _complete _match _approximate
zstyle ':completion:*:match:*' original only
zstyle ':completion:*:approximate:*' max-errors 1 numeric

# Increase the number of errors based on the length of the typed word.
zstyle -e ':completion:*:approximate:*' max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3))numeric)'
# Increase the number of errors based on the length of the typed word. But make
# sure to cap (at 7) the max-errors to avoid hanging.
zstyle -e ':completion:*:approximate:*' max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3>7?7:($#PREFIX+$#SUFFIX)/3))numeric)'

# Don't complete unavailable commands.
zstyle ':completion:*:functions' ignored-patterns '(_*|pre(cmd|exec))'
Expand Down
Loading

0 comments on commit 8d8d830

Please sign in to comment.