Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit a338cba
Author: Indrajit Raychaudhuri <[email protected]>
Date:   Mon Dec 17 14:10:51 2018 -0600

    python: Use brace expansion for pip compctl match

    Just use brace expansion only (and not a mix of brace expansion and
    path expansion) to expand `sed` match for more variants of 'pip*' (pip,
    pip2, pip3, pip2.7, pip3.7 etc.) in `compctl` assignment

commit 0e6429d
Author: Diego Rabatone Oliveira <[email protected]>
Date:   Mon Dec 17 16:22:33 2018 -0200

    Remove duplicated information from git module README (sorin-ionescu#1657)

commit 9d3e2f0
Author: Indrajit Raychaudhuri <[email protected]>
Date:   Fri Dec 14 21:32:10 2018 -0600

    python: Expand compctl matches for pip variants

    Expand `sed` match for more variants of 'pip*' (pip, pip2, pip3, pip2.7,
    pip3.7 etc.) for `compctl` assignment

commit dc8e168
Author: Indrajit Raychaudhuri <[email protected]>
Date:   Fri Dec 14 20:57:10 2018 -0600

    command-not-found: Minor reformatting

commit 3093f1b
Author: Indrajit Raychaudhuri <[email protected]>
Date:   Fri Dec 14 15:40:59 2018 -0600

    homebrew: Load 'HOMEBREW_' prefixed variables only

    Load 'HOMEBREW_' prefixed variables only. Avoid loading 'PATH'
    related variables as they are already handled in standard zsh
    configuration.

commit 1118408
Author: Indrajit Raychaudhuri <[email protected]>
Date:   Fri Dec 14 15:34:42 2018 -0600

    homebrew: Simplify array assignment

    No need for nesting array assignment only to flatten it later.

commit 54dff31
Author: Indrajit Raychaudhuri <[email protected]>
Date:   Thu Dec 13 01:14:59 2018 -0600

    archive: Enhance 'archive' helper to support multi file archive

    We now allow multiple paths (files/directories) to be archived in
    one shot. Validation of the target path(s) is now delegated to the
    actual archive helper.

commit eee3c9c
Author: Kaleb Elwert <[email protected]>
Date:   Thu Dec 13 10:51:56 2018 -0800

    git: add documentation for new aliases

commit 39e1a63
Author: Bruno Oliveira da Silva <[email protected]>
Date:   Thu Dec 13 16:43:23 2018 -0200

    Aliases to digital sign/verify commits and tags (sorin-ionescu#651)

commit d275f31
Author: Indrajit Raychaudhuri <[email protected]>
Date:   Wed Dec 12 23:02:59 2018 -0600

    syntax-highlighting: Further clarify relative module ordering

commit 6a2cc2e
Author: Indrajit Raychaudhuri <[email protected]>
Date:   Wed Dec 12 22:42:02 2018 -0600

    rsync: Update link to Bombich rsync page again

commit d45d87b
Author: Indrajit Raychaudhuri <[email protected]>
Date:   Wed Dec 12 22:17:16 2018 -0600

    node: Make nvm lookup mechanism more efficient in homebrewed environment

    In homebrewed environment, avoid using `brew --prefix nvm` which is
    ruby based and is super slow. Instead, rely on homebrew standard
    behavior wherein all installed packages are available in canonical
    path $(brew --prefix)/opt/<package> (for nvm it would obviously be
    `$(brew --prefix)/opt/nvm`).

    NB: `$(brew --prefix)` (without additional argument) is a simple shell
    shortcut and doesn't have the same performance impact.

commit a987c8b
Author: Indrajit Raychaudhuri <[email protected]>
Date:   Wed Dec 12 16:18:58 2018 -0600

    python: Fix pip compctl file match pattern

    Make `sed` match more reliable while replacing the whole of 'pip*' with
    'pip pip2 pip3' for `compctl` assignment

commit f745645
Author: Indrajit Raychaudhuri <[email protected]>
Date:   Tue Dec 11 11:02:37 2018 -0600

    command-not-found: Support custom Homebrew tap on MacOS

    Added support for homebrew-command-not-found from a non-default tap

commit a2398fc
Author: Indrajit Raychaudhuri <[email protected]>
Date:   Fri Dec 7 17:08:12 2018 -0600

    node: Cache completion for additional helpers

    Add support for npm and additional well-known helper commands

commit e7fea33
Author: Indrajit Raychaudhuri <[email protected]>
Date:   Sun Dec 9 17:16:21 2018 -0600

    python: Use more apropriate filename for pip completion

commit 53286eb
Author: Indrajit Raychaudhuri <[email protected]>
Date:   Fri Dec 7 15:45:06 2018 -0600

    python: Make cached completion file mangling more reliable

    While mangling cached completion file, we cannot just assume that
    `$pip_command` would resolve to `pip` -- it might be `pip2` or `pip3`
    depending on the relative position in zsh `$commands` array. Thus
    replace the whole of 'pip*' with 'pip pip2 pip3' for compctl assignment.

commit 2286662
Author: Indrajit Raychaudhuri <[email protected]>
Date:   Tue Jul 31 20:29:01 2018 -0500

    command-not-found: Restore idiomatic homebrewed handler loading on MacOS

    As is the convention in prezto, we cache the command-not-found handler to
    avoid incurring the performance penalty of loading ruby interpreter on
    every call. This restores the 'Homebrew way' of loading command-not-found
    handler.

    Further, the formally recommended command lookup mechanism in Homebrew
    (viz., `brew command command-not-found-init`) is ruby based and is super
    slow. To avoid performance penalty, we `find` it ourselves from
    `TAP_DIRECTORY` defined internally in Homebrew.

    This also reinstates support for custom taps or non-standard Homebrew location.

commit 3de1e24
Author: Diego Rabatone Oliveira <[email protected]>
Date:   Wed Dec 5 09:38:07 2018 -0200

    Update submodules versions

commit 8bfed01
Author: John P. Neumann <[email protected]>
Date:   Thu Nov 29 17:13:23 2018 -0600

    Resolves sorin-ionescu#1641 - Roll the pure prompt back from 1.8.0 to 1.7.0

commit e6eea17
Author: Diego Rabatone Oliveira <[email protected]>
Date:   Thu Nov 8 13:02:10 2018 -0200

    Update submodules

    Updating to the latest released tags for modules:
    completetion
    syntax-highlighting

    And for agnoster prompt

commit 1ed5331
Author: Tercio Gaudencio Filho <[email protected]>
Date:   Mon Oct 15 09:56:41 2018 -0300

    Fix issue sorin-ionescu#1635. Option to disable GNU ls to group directories first.

commit bfe1815
Author: Indrajit Raychaudhuri <[email protected]>
Date:   Sat Oct 13 23:16:20 2018 -0500

    prompt/sorin: Minor cleanup and reordering

commit a430931
Author: Indrajit Raychaudhuri <[email protected]>
Date:   Sat Oct 13 23:13:16 2018 -0500

    prompt/minimal: Add support for preview

commit a3753d8
Author: Indrajit Raychaudhuri <[email protected]>
Date:   Sat Oct 13 23:09:14 2018 -0500

    prompt/steeef: Add basic support for editor_info and preview

commit 58809b2
Author: Indrajit Raychaudhuri <[email protected]>
Date:   Fri Oct 12 16:53:46 2018 -0500

    Update submodule 'history-substring-search'

    history-substring-search doesn't tag releases anymore and just maintains
    the master branch -- switching to tracking master instead.

commit 992b9de
Author: Indrajit Raychaudhuri <[email protected]>
Date:   Fri Oct 12 10:52:24 2018 -0500

    doc: More copyediting and formatting for consistency

commit 6f603df
Author: Indrajit Raychaudhuri <[email protected]>
Date:   Fri Oct 12 03:55:55 2018 -0500

    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

commit ff5bd93
Author: Indrajit Raychaudhuri <[email protected]>
Date:   Thu Oct 11 17:26:38 2018 -0500

    submodule: Updating submodules

    'modules/prompt/external/async' updated to 'v1.7.1'
    'modules/syntax-highlighting/external' updated to latest 'master'

commit df4c618
Author: Indrajit Raychaudhuri <[email protected]>
Date:   Thu Oct 11 17:10:35 2018 -0500

    doc: Bit of copyediting and formatting for consistency and clarification

commit 6c46804
Author: Kaleb Elwert <[email protected]>
Date:   Fri Sep 28 14:51:59 2018 -0700

    environment: only enable bracketed paste on non-dumb terminals

    Fixes sorin-ionescu#1552

commit e9387a1
Author: Kaleb Elwert <[email protected]>
Date:   Fri Sep 28 14:24:25 2018 -0700

    python: respect PYENV_ROOT if already set

    Fixes sorin-ionescu#1578

commit ee885d4
Author: Kaleb Elwert <[email protected]>
Date:   Fri Sep 28 14:04:20 2018 -0700

    python: use pure's magic value for VIRTUAL_ENV_DISABLE_PROMPT

    Fixes sorin-ionescu#1627

commit fbcae35
Author: Diego Rabatone Oliveira <[email protected]>
Date:   Mon Sep 17 17:28:15 2018 -0300

    Updating submodules

    For the submodules that have some kind of release (tags), they were
    updated up to the most recent release. Otherwise, the submodule was
    updated to the latest commit.

commit f366e49
Author: Indrajit Raychaudhuri <[email protected]>
Date:   Sat Sep 15 01:55:46 2018 -0500

    homebrew: Cleanup homebrew aliases

    - 'brew upgrade' does 'brew update' by default, no need for explicit call
    - replace 'brew remove' with 'brew uninstall' for consistency

commit ad861d3
Author: Indrajit Raychaudhuri <[email protected]>
Date:   Sat Sep 15 01:45:57 2018 -0500

    homebrew: Replace deprecated casks with their brew counterpart

    Homebrew has deprecated `brew cask cleanup` and `brew cask search` in favor
    of `brew cleanup` and `brew search` respectively. They will stop working on
    2018-09-30. Further, `--outdated` has been removed.

    We should eventually remove the related aliases, but for a while we keep
    supporting them gracefully with deprecation warning.

    The documentation has been removed from README.md, however.

commit 2bbf5d0
Author: Indrajit Raychaudhuri <[email protected]>
Date:   Fri Sep 14 23:40:08 2018 -0500

    homebrew: Load standard Homebrew environment variables into shell session.

    However, guard for legacy Homebrew as `brew shellenv` is relatively new.

commit dd7a26e
Author: Yutian Li <[email protected]>
Date:   Sat Sep 15 12:35:48 2018 -0400

    [git] Also check "commondir" when looking for a stash (sorin-ionescu#1620)

commit 7bb7a7c
Author: Bruce Clounie <[email protected]>
Date:   Sat Jul 21 01:06:31 2018 -0600

    Add explanation for extra git theme symbols in README.md

    Helps with sorin-ionescu#1589

commit 66487c9
Author: newtonne <[email protected]>
Date:   Mon Aug 13 02:56:21 2018 +0100

    Correct alphabetical order in zprestorc

commit f2042a2
Author: Diego Rabatone Oliveira <[email protected]>
Date:   Thu Aug 9 15:25:30 2018 -0300

    Update submodules (sorin-ionescu#1615)

    This updates the submodules for autosuggestions, completion,
    syntax-highlighting and the prompts async, powerlevel9k and pure.

    All submodules that have TAGs/Releases were updated to their latest
    TAG/release, except for syntax-highlighting because it's latest
    release/TAG is from more than one year ago, and the project seems to be
    well maintained but without releases.

commit dacef14
Author: Steven Loria <[email protected]>
Date:   Sat Jul 14 09:40:39 2018 -0400

    Improve startup time by skipping pyenv rehash

    After profiling startup time, I found that "pyenv rehash" is
    by far the slowest piece. This change skips rehashing on init.

    See pyenv/pyenv#784 (comment)

    Also pass the shell explicitly, as suggested in
    pyenv/pyenv#784 (comment),
    which provides a modest improvement.

    In total, this improves startup time from 1s to 0.3s on my machine.
    Using the following command:
    python -m timeit "__import__('subprocess').Popen(['zsh', '-i', '-c', 'echo']).communicate()"

    Result before this change:
    10 loops, best of 3: 1 sec per loop

    Result after this change:
    10 loops, best of 3: 334 msec per loop

commit e064d5c
Author: Michael Kohl <[email protected]>
Date:   Wed Jul 18 15:08:21 2018 +0700

    Make node-info work without nvm/nodenv

commit 152b4a1
Author: Tharre <[email protected]>
Date:   Sat Jul 28 18:33:24 2018 +0200

    Fix broken gitref link in README.md

    gitref.org points to services.github.com, and has been for some time[0].

    [0] git/git-reference#112

commit e149367
Author: Colin Hebert <[email protected]>
Date:   Wed Jun 27 09:28:04 2018 +1000

    coreutils: update list of included coreutils (sorin-ionescu#1592)

commit cd70822
Author: Indrajit Raychaudhuri <[email protected]>
Date:   Tue Jun 26 13:43:27 2018 -0500

    completion: Compact path to global ssh known hosts file

commit 0d6e7de
Author: Kaleb Elwert <[email protected]>
Date:   Mon Jun 18 14:16:36 2018 -0700

    syntax-highlighting: Update README to clarify module load order

    Fixes sorin-ionescu#1584

commit b11b9ce
Author: Alexander Neumann <[email protected]>
Date:   Thu Jun 14 15:42:45 2018 +0200

    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.

commit d4332e2
Author: Andrew Janke <[email protected]>
Date:   Fri Jun 1 03:36:21 2018 -0400

    Fix spelling error in CONTRIBUTING.md (sorin-ionescu#1590)

commit 92e668e
Author: Christopher Bowns <[email protected]>
Date:   Tue May 22 18:44:57 2018 -0700

    Remove zlogout's Apu quote (sorin-ionescu#1583)

    * Remove zlogout's Apu quote

    For questions about why, see https://en.wikipedia.org/wiki/The_Problem_with_Apu

    * Add a couple of random sayings per feedback in sorin-ionescu#1583

commit 3d911cd
Author: Jeff Widman <[email protected]>
Date:   Sun May 20 13:48:14 2018 -0700

    Document `gpf` vs `gpF`

    Document the difference between `gpf` and `gpF`. These were changed in sorin-ionescu#1040 / sorin-ionescu@ddfc870, but never documented.

commit ae23bed
Author: Jeff Widman <[email protected]>
Date:   Sun May 20 14:06:54 2018 -0700

    Document macOS support for `command-not-found`

    Document macOS support for `command-not-found`

commit 2995b7d
Author: Casey McGinty <[email protected]>
Date:   Sun May 6 13:19:35 2018 -0700

    Update cache files when .zpreztorc file is modified

    Fixes sorin-ionescu#1581

commit 6e179f2
Author: Casey McGinty <[email protected]>
Date:   Mon Apr 30 22:22:10 2018 -0700

    Export VIRTUAL_ENV_DISABLE_PROMPT when enabling virutalenv

    Adding `export` ensures the define is available in the shell so pyenv
    or virtualenvwrapper do not duplicate the virtualenv name on the
    prompt.

commit f8f93d4
Author: Kaleb Elwert <[email protected]>
Date:   Sun Apr 29 17:39:25 2018 -0700

    command-not-found: Directly source homebrew command-not-found handler

    Fixes sorin-ionescu#1577, Fixes sorin-ionescu#1451

commit b6b43eb
Author: Ashish Gandhi <[email protected]>
Date:   Mon Apr 16 15:51:57 2018 -0700

    Rename "Mac OS X" to "macOS" in comments

    This only changes references in text for human consumption. It leaves
    out renaming paths because that can cause breaking changes.

    Related issue sorin-ionescu#1449.

commit 3001028
Author: Kaleb Elwert <[email protected]>
Date:   Fri Apr 6 11:35:39 2018 -0700

    Add proper prompt_opts to smiley prompt

commit 054eb35
Author: Kaleb Elwert <[email protected]>
Date:   Fri Apr 6 11:33:02 2018 -0700

    Revert "Only call reset-prompt when the appropriate zstyle is set"

    This reverts commit 6d00fdf.

    As unfortunate as it is, this workaround was a hack and doesn't take
    into account prompts like spaceship which don't use $editor_info but
    rely on $KEYMAP directly. We'll need to find a more consistent solution
    to fix this.

commit 1b441e7
Author: François VANTOMME <[email protected]>
Date:   Thu Apr 5 00:20:21 2018 +0200

    Feat (git): add an alias displaying the commits yet to be applied to upstream (sorin-ionescu#1565)

commit 4430212
Author: Kaleb Elwert <[email protected]>
Date:   Fri Mar 30 17:47:05 2018 -0700

    Allow users to easily define LS_COLORS and LSCOLORS (sorin-ionescu#1546)

commit a0977cb
Author: Roman Peshkov <[email protected]>
Date:   Sat Mar 31 02:37:05 2018 +0200

    Ignore tmux autostart in vscode terminal

commit b3c27bb
Author: Diego Rabatone Oliveira <[email protected]>
Date:   Mon Mar 5 05:56:25 2018 -0300

    Replace git with 'command git' (sorin-ionescu#1551)

    to improve performance if git is aliased to hub or other wrappers.

commit e00562e
Author: bryndin <[email protected]>
Date:   Fri Feb 23 13:39:45 2018 -0800

    python: autoload add-zsh-hook when needed (sorin-ionescu#1549)

    Fixes sorin-ionescu#1550

commit 742260b
Author: Kaleb Elwert <[email protected]>
Date:   Wed Feb 21 14:10:11 2018 -0800

    Remove support for pydf to make options more consistent

    Closes sorin-ionescu#1388

commit 580ddc4
Author: Philipp A <[email protected]>
Date:   Fri Sep 25 12:38:12 2015 +0200

    Add another shadow to the git aliases

    Originally submitted in sorin-ionescu#979

commit 4325f74
Author: Rick Jones <[email protected]>
Date:   Tue Mar 8 16:00:29 2016 +0000

    git: add tag aliases

    Originally submitted in sorin-ionescu#1094

commit 6d00fdf
Author: John P. Neumann <[email protected]>
Date:   Tue Feb 20 22:36:29 2018 -0600

    Only call reset-prompt when the appropriate zstyle is set

    Resolves issue sorin-ionescu#1524 (sorin-ionescu#1548)

commit e263876
Author: Alexey Zapparov <[email protected]>
Date:   Mon Feb 12 04:28:51 2018 +0100

    Don't double-source chruby

    If chruby was installed using default way, most likely chruby and
    auto-switching will be already sourced (at least on most Linuxes).

commit d762262
Author: Kaleb Elwert <[email protected]>
Date:   Sat Feb 17 08:06:34 2018 -0800

    autosuggestions: add basic history troubleshooting information

commit 282b478
Author: Kaleb Elwert <[email protected]>
Date:   Fri Jan 26 18:14:10 2018 -0800

    Add vi-pound-insert as # in vicmd mode

    Fixes sorin-ionescu#1534

commit 904eef5
Author: Kaleb Elwert <[email protected]>
Date:   Fri Jan 26 14:52:11 2018 -0800

    Add `pound-toggle` zle widget to work around the buggy built-in `pound-insert`

    Refs sorin-ionescu#1533, sorin-ionescu#1534

commit 906ac99
Author: Kaleb Elwert <[email protected]>
Date:   Thu Jan 25 12:41:58 2018 -0800

    Move INTERACTIVE_COMMENTS from editor to environment

commit 0b62639
Author: Maxim Baz <[email protected]>
Date:   Thu Jan 25 20:59:21 2018 +0100

    Set INTERACTIVE_COMMENTS by default

    This allows using # to comment lines in the interactive shell

commit 54d2a76
Author: Kaleb Elwert <[email protected]>
Date:   Wed Jan 24 14:01:14 2018 -0800

    pacman: fix mistake where aurutils should be used, not aurtools

commit e32a96b
Author: Kaleb Elwert <[email protected]>
Date:   Wed Jan 24 13:47:20 2018 -0800

    pacman: Simplify support for AUR helpers

    There are a number of things happening here.

    - Extra support for yaourt has been removed
    - Docs have been updated to explicitly call out that AUR helpers are not
      officially supported
    - aurutils has been suggested to make common operations easier
    - A utility function called aurget (similar to aurfetch from aurutils)
      has been added to make cloning AUR repos easier.

    Fixes sorin-ionescu#1531

commit 73e94b8
Author: Salmanul Farzy <[email protected]>
Date:   Sun Jan 14 14:15:28 2018 +0530

    Don't set auto_name_dirs because it messes up prompts

    This was ported from Oh-My-Zsh and since have been disabled in it.

    Explained in more detail
    rvm/rvm/issues/3091#issuecomment-60083194

    Related: sorin-ionescu#998, sorin-ionescu#1081
  • Loading branch information
mezuzza committed Dec 31, 2018
1 parent 7cd7266 commit 23162bf
Show file tree
Hide file tree
Showing 67 changed files with 505 additions and 285 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ there are a number of additional things to keep in mind.
- Prefer `zstyle` over environment variables for configuration.
- Prefer (( ... )) over [[ ... ]] for arithmetic expression.
- Use the function keyword to define functions.
- The 80 character hard limit can be waved for readability.
- The 80 character hard limit can be waived for readability.

#### Using an Alternative zprezto Directory

Expand Down
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ version is 4.3.11.
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
Note: If you already have any of the given configuration files, `ln` will
cause error. In simple cases you can load prezto by adding the line
`source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"` to the bottom of your
`.zshrc` and keep the rest of your Zsh configuration 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:
Expand Down Expand Up @@ -89,6 +90,10 @@ accompanying README files to learn of what is available.
window or tab.

![sorin theme][2]
Note that the 'git' module may be required for special symbols to appear,
such as those on the right of the above image. Add `'git'` to the `pmodule`
list (under `zstyle ':prezto:load' pmodule \` in your *~/.zpreztorc*) to
enable this module.

### External Modules

Expand All @@ -99,7 +104,7 @@ accompanying README files to learn of what is available.
Note that module names need to be unique or they will cause an error when
loading.

```console
```sh
zstyle ':prezto:load' pmodule-dirs $HOME/.zprezto-contrib
```

Expand All @@ -126,6 +131,6 @@ This project is licensed under the MIT License.
[3]: http://git-scm.com
[4]: https://github.com
[5]: http://gitimmersion.com
[6]: http://gitref.org
[6]: https://git.github.io/git-reference/
[7]: http://www.bash2zsh.com/zsh_refcard/refcard.pdf
[8]: http://grml.org/zsh/zsh-lovers.html
6 changes: 3 additions & 3 deletions modules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Integrates zsh-autosuggestions into Prezto.
Command-Not-Found
-----------------

Loads the command-not-found tool on Debian-based distributions.
Loads the command-not-found tool on macOS or Debian-based distributions.

Completion
----------
Expand Down Expand Up @@ -122,7 +122,7 @@ Initializes OCaml package management.
OSX
---

Defines Mac OS X aliases and functions.
Defines macOS aliases and functions.

Pacman
------
Expand All @@ -132,7 +132,7 @@ Provides aliases and functions for the Pacman package manager and frontends.
Perl
----

Enables local Perl module installation on Mac OS X and defines alises.
Enables local Perl module installation on macOS and defines alises.

Prompt
------
Expand Down
6 changes: 3 additions & 3 deletions modules/archive/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ installed:
- *.7z* requires `7za`.
- *.deb* requires `ar`, `tar`.

Additionally, if `pigz` and/or `pbzip2` are installed, `archive` will use them over
their traditional counterparts, `gzip` and `bzip2` respectively, to take full advantage
of all available CPU cores for compression.
Additionally, if `pigz` and/or `pbzip2` are installed, `archive` will use them
over their traditional counterparts, `gzip` and `bzip2` respectively, to take
full advantage of all available CPU cores for compression.

Alternatives
------------
Expand Down
32 changes: 13 additions & 19 deletions modules/archive/functions/archive
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

# function archive {

local archive_name dir_to_archive _gzip_bin _bzip2_bin
local archive_name path_to_archive _gzip_bin _bzip2_bin

if (( $# != 2 )); then
if (( $# < 2 )); then
cat >&2 <<EOF
usage: $0 [archive_name.zip] [/path/to/include/into/archive]
usage: $0 [archive_name.zip] [/path/to/include/into/archive ...]
Where 'archive.zip' uses any of the following extensions:
Expand All @@ -28,14 +28,8 @@ fi

# strip the path, just in case one is provided for some reason
archive_name="${1:t}"
# use absolute paths, and follow symlinks
dir_to_archive="${2}"

# if the directory doesn't exist, quit. Nothing to archive
if [[ ! -e "${dir_to_archive}" ]]; then
print "$0: file or directory not valid: ${dir_to_archive}" >&2
return 1
fi
# let paths be handled by actual archive helper
path_to_archive="${@:2}"

# here, we check for dropin/multi-threaded replacements
# this should eventually be moved to modules/archive/init.zsh
Expand All @@ -53,14 +47,14 @@ else
fi

case "${archive_name}" in
(*.tar.gz|*.tgz) tar -cvf "${archive_name}" --use-compress-program="${_gzip_bin}" "${dir_to_archive}" ;;
(*.tar.bz2|*.tbz|*.tbz2) tar -cvf "${archive_name}" --use-compress-program="${_bzip2_bin}" "${dir_to_archive}" ;;
(*.tar.xz|*.txz) tar -cvJf "${archive_name}" "${dir_to_archive}" ;;
(*.tar.lzma|*.tlz) tar -cvf "${archive_name}" --lzma "${dir_to_archive}" ;;
(*.tar) tar -cvf "${archive_name}" "${dir_to_archive}" ;;
(*.zip|*.jar) zip -r "${archive_name}" "${dir_to_archive}" ;;
(*.rar) rar a "${archive_name}" "${dir_to_archive}" ;;
(*.7z) 7za a "${archive_name}" "${dir_to_archive}" ;;
(*.tar.gz|*.tgz) tar -cvf "${archive_name}" --use-compress-program="${_gzip_bin}" "${=path_to_archive}" ;;
(*.tar.bz2|*.tbz|*.tbz2) tar -cvf "${archive_name}" --use-compress-program="${_bzip2_bin}" "${=path_to_archive}" ;;
(*.tar.xz|*.txz) tar -cvJf "${archive_name}" "${=path_to_archive}" ;;
(*.tar.lzma|*.tlz) tar -cvf "${archive_name}" --lzma "${=path_to_archive}" ;;
(*.tar) tar -cvf "${archive_name}" "${=path_to_archive}" ;;
(*.zip|*.jar) zip -r "${archive_name}" "${=path_to_archive}" ;;
(*.rar) rar a "${archive_name}" "${=path_to_archive}" ;;
(*.7z) 7za a "${archive_name}" "${=path_to_archive}" ;;
(*.gz) print "\n.gz is only useful for single files, and does not capture permissions. Use .tar.gz" ;;
(*.bz2) print "\n.bzip2 is only useful for single files, and does not capture permissions. Use .tar.bz2" ;;
(*.xz) print "\n.xz is only useful for single files, and does not capture permissions. Use .tar.xz" ;;
Expand Down
13 changes: 8 additions & 5 deletions modules/autosuggestions/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
Autosuggestions
---------------

Integrates zsh-autosuggestions into Prezto.

Autosuggestions
===============

Expand Down Expand Up @@ -46,6 +41,14 @@ To set the query found color, add the following line to *zpreztorc*:
zstyle ':prezto:module:autosuggestions:color' found ''
```

Troubleshooting
---------------

### Autosuggestions from previous sessions don't show up

For autosuggestions from previous shell sessions to work, please make sure you
also have the `history` module enabled.

Authors
-------

Expand Down
7 changes: 4 additions & 3 deletions modules/command-not-found/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ Command-Not-Found

When you try to use a command that is not available locally, searches
the package manager for a package offering that command and suggests
the proper install command.
the proper install command.

Debian-based and Arch Linux-based distributions use the [`command-not-found`][1] tool.
Debian and Arch Linux based distributions use the [`command-not-found`][1] tool.

macOS uses Homebrew's [`command-not-found` clone][2]. Note that you also need to [follow the instructions to tap the `command-not-found` homebrew repository][3].
macOS uses Homebrew's [`command-not-found` clone][2]. Note that you also need to
[follow the instructions][3] to tap the `command-not-found` homebrew repository.


Authors
Expand Down
27 changes: 24 additions & 3 deletions modules/command-not-found/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,30 @@ if [[ -s '/etc/zsh_command_not_found' ]]; then
# Load command-not-found on Arch Linux-based distributions.
elif [[ -s '/usr/share/doc/pkgfile/command-not-found.zsh' ]]; then
source '/usr/share/doc/pkgfile/command-not-found.zsh'
# Load command-not-found on Mac OS X when homebrew tap is configured.
elif (( $+commands[brew] )) && brew command command-not-found-init > /dev/null 2>&1; then
eval "$(brew command-not-found-init)"
# Load command-not-found on macOS when Homebrew tap is configured.
# To avoid performance penalty, we do not use Homebrew's ruby based command
# lookup mechanism (viz., `brew command command-not-found-init`) and instead
# `find` it ourselves from `TAP_DIRECTORY` defined internally in Homebrew.
elif (( $+commands[brew] )); then
cnf_command=(
"$(brew --repository 2> /dev/null)"/Library/Taps/*/*/cmd/brew-command-not-found-init(|.rb)(.N)
)
if (( $#cnf_command )); then
cache_file="${TMPDIR:-/tmp}/prezto-brew-command-not-found-cache.$UID.zsh"

if [[ "${${(@o)cnf_command}[1]}" -nt "$cache_file" \
|| "${ZDOTDIR:-$HOME}/.zpreztorc" -nt "$cache_file" \
|| ! -s "$cache_file" ]]; then
# brew command-not-found-init is slow; cache its output.
brew command-not-found-init >! "$cache_file" 2> /dev/null
fi

source "$cache_file"

unset cache_file
fi

unset cnf_command
# Return if requirements are not found.
else
return 1
Expand Down
13 changes: 13 additions & 0 deletions modules/completion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ the [zsh-completions][1] project.

This module must be loaded **after** the *utility* module.

Options
-------

- `COMPLETE_IN_WORD` complete from both ends of a word.
- `ALWAYS_TO_END` move cursor to the end of a completed word.
- `PATH_DIRS` perform path search even on command names with slashes.
- `AUTO_MENU` show completion menu on a successive tab press.
- `AUTO_LIST` automatically list choices on ambiguous completion.
- `AUTO_PARAM_SLASH` if completed parameter is a directory, add a trailing slash.
- `EXTENDED_GLOB` needed for file modification glob modifiers with compinit.
- `MENU_COMPLETE` do not autoselect the first completion entry.
- `FLOW_CONTROL` disable start/stop characters in shell editor.

Settings
--------

Expand Down
4 changes: 2 additions & 2 deletions modules/completion/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ zstyle ':completion:*:history-words' remove-all-dups yes
zstyle ':completion:*:history-words' list false
zstyle ':completion:*:history-words' menu yes

# Environmental Variables
# Environment Variables
zstyle ':completion::*:(-command-|export):*' fake-parameters ${${${_comps[(I)-value-*]#*,}%%,*}:#-*-}

# Populate hostname completion. But allow ignoring custom entries from static
# */etc/hosts* which might be uninteresting.
zstyle -a ':prezto:module:completion:*:hosts' etc-host-ignores '_etc_host_ignores'

zstyle -e ':completion:*:hosts' hosts 'reply=(
${=${=${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) 2> /dev/null)"}%%[#| ]*}//\]:[0-9]*/ }//,/ }//\[/ }
${=${=${=${${(f)"$(cat {/etc/ssh/ssh_,~/.ssh/}known_hosts(|2)(N) 2> /dev/null)"}%%[#| ]*}//\]:[0-9]*/ }//,/ }//\[/ }
${=${(f)"$(cat /etc/hosts(|)(N) <<(ypcat hosts 2> /dev/null))"}%%(\#${_etc_host_ignores:+|${(j:|:)~_etc_host_ignores}})*}
${=${${${${(@M)${(f)"$(cat ~/.ssh/config 2> /dev/null)"}:#Host *}#Host }:#*\**}:#*\?*}}
)'
Expand Down
1 change: 0 additions & 1 deletion modules/directory/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ setopt PUSHD_IGNORE_DUPS # Do not store duplicates in the stack.
setopt PUSHD_SILENT # Do not print the directory stack after pushd or popd.
setopt PUSHD_TO_HOME # Push to home directory when no argument is given.
setopt CDABLE_VARS # Change directory to a path stored in a variable.
setopt AUTO_NAME_DIRS # Auto add variable-stored paths to ~ list.
setopt MULTIOS # Write to multiple descriptors.
setopt EXTENDED_GLOB # Use extended globbing syntax.
unsetopt CLOBBER # Do not overwrite existing files with > and >>.
Expand Down
12 changes: 11 additions & 1 deletion modules/editor/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
Editor
======

Sets key bindings.
Sets editor specific key bindings options and variables.

Options
-------

- `BEEP` beep on error in line editor.

Variables
---------

- `WORDCHARS` treat a given set of characters as part of a word.

Settings
--------
Expand Down
33 changes: 31 additions & 2 deletions modules/editor/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ fi
# Options
#

# Beep on error in line editor.
setopt BEEP
setopt BEEP # Beep on error in line editor.

#
# Variables
Expand Down Expand Up @@ -242,6 +241,27 @@ function glob-alias {
}
zle -N glob-alias

# Toggle the comment character at the start of the line. This is meant to work
# around a buggy implementation of pound-insert in zsh.
#
# This is currently only used for the emacs keys because vi-pound-insert has
# been reported to work properly.
function pound-toggle {
if [[ "$BUFFER" = '#'* ]]; then
# Because of an oddity in how zsh handles the cursor when the buffer size
# changes, we need to make this check before we modify the buffer and let
# zsh handle moving the cursor back if it's past the end of the line.
if [[ $CURSOR != $#BUFFER ]]; then
(( CURSOR -= 1 ))
fi
BUFFER="${BUFFER:1}"
else
BUFFER="#$BUFFER"
(( CURSOR += 1 ))
fi
}
zle -N pound-toggle

# Reset to default key bindings.
bindkey -d

Expand Down Expand Up @@ -277,6 +297,12 @@ if (( $+widgets[history-incremental-pattern-search-backward] )); then
history-incremental-pattern-search-forward
fi

# Toggle comment at the start of the line. Note that we use pound-toggle which
# is similar to pount insert, but meant to work around some issues that were
# being seen in iTerm.
bindkey -M emacs "$key_info[Escape];" pound-toggle


#
# Vi Key Bindings
#
Expand All @@ -296,6 +322,9 @@ else
bindkey -M vicmd "/" history-incremental-search-forward
fi

# Toggle comment at the start of the line.
bindkey -M vicmd "#" vi-pound-insert

#
# Emacs and Vi Key Bindings
#
Expand Down
36 changes: 33 additions & 3 deletions modules/environment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,46 @@ Sets general shell options and defines environment variables.

This module must be loaded first.

Environment Variables
---------------------

Contributors
------------

This module **MUST NOT** rely on any command not built in Zsh.

Non-interactive environment variables should be defined in [`zshenv`][1].

Options
-------

### General

- `COMBINING_CHARS` combine zero-length punctuation characters (accents) with
the base character.
- `INTERACTIVE_COMMENTS` enable comments in interactive shell.
- `RC_QUOTES` allow 'Henry''s Garage' instead of 'Henry'\''s Garage'.
- `MAIL_WARNING` don't print a warning message if a mail file has been accessed.

### Jobs

- `LONG_LIST_JOBS` list jobs in the long format by default.
- `AUTO_RESUME` attempt to resume existing job before creating a new process.
- `NOTIFY` report status of background jobs immediately.
- `BG_NICE` don't run all background jobs at a lower priority.
- `HUP` don't kill jobs on shell exit.
- `CHECK_JOBS` don't report on jobs when shell exit.

Variables
---------

### Termcap

- `LESS_TERMCAP_mb` begins blinking.
- `LESS_TERMCAP_md` begins bold.
- `LESS_TERMCAP_me` ends mode.
- `LESS_TERMCAP_se` ends standout-mode.
- `LESS_TERMCAP_so` begins standout-mode.
- `LESS_TERMCAP_ue` ends underline.
- `LESS_TERMCAP_us` begins underline.

Authors
-------

Expand Down
Loading

0 comments on commit 23162bf

Please sign in to comment.