Skip to content

Commit

Permalink
Merge upstream master (#1)
Browse files Browse the repository at this point in the history
* Feat (aliases): add aliases for git flow

* Allow syntax highlighting pattern styles (#1192)

* 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.

* Add note about working around preexisting runcoms

Closes #955

* Don't use a deprecated argument as a python example

Thanks to @jeffwidman for pointing this out

Closes #1141

* Add bundle clean alias

* Doc (ruby): add doc on bundle clean alias

* Feat (docker): add docker aliases (#1147)

Thanks to @malikoth and @saoula for their input.

* Fix indentation in README

* Update is-callable to also check builtins

Fixes #1037

* Add code style to CONTRIBUTING.md

Closes #1296

* Add note to CONTRIBUTING.md about zstyle

* Add initial issue and pull request templates

* Remove additional newlines in issue and pull request templates

* Rework diff function

This removes --unified from the default options to make it possible to pass -y
without worrying about conflicting output formats.

diffu has also been added as an alias to make it easier to get output as a
unified diff.

Fixes #1231

* Add missing alias to utility README

* Move python-info call in paradox from preexec to precmd

* archive: add support for *.jar files (#1302)

* archive: add archive function

* Add perl-info function & plenv subcommand aliases (#1303)

* Add perl-info function
* Add alias for plenv subcommands
* Load perlbrew if needed
* Load plenv if needed
* Use PERLBREW_ROOT as priority to detect Perlbrew

* Add utility alias for pydf

* New `alias gfa=git fetch --all` for git module

Also includes an updated README.md !

* Update ssh module for multi session hosts

create ssh_agent_env with current user id in file name to avoid collisions with other users
create ssh_agent_sock with current user id in file name to avoid collisions with other users

* Add support for 'pip', 'pip2', 'pip3' completion

Since `pip completion --zsh` might be slow, we cache it beforehand.
The implementation is along the lines of 'npm' completion in 'node' module.

* rsync: Update reference to Bombich's rsync page

Seems like Bombich's rsync page moved with the previous link doing 404.
Adjusted to fix this.

* Add zstyle option to show pwd in long format

* Convert long-pwd to pwd-length

* Add better support for pyenv virtualenvs

* Add some new git aliases, modify a few more. (#1301)

* Add some new git aliases, modify a few more.
* Add `gbV` command to show more verbose git branch info.
* Add `gcam` to make it possible to execute `gca; gcm '<your message
  here>'` more simply.
* Add `gii` command to temporarily untrack (ignore) a file.
* Add `giI` command to uningore a file.
* Change alias of `gbl` to `gbv`. Personally, I think aliases that
  include a switch in the command should include the switch in the alias
  if possible.  This makes them easier to remember.
* Change alias of `gbL` to `gba`. I think the `-a` switch is more
  salient to what this alias does than the `-v`.  Furthermore, with this
  PR there are already `gbv` and `gbV` aliases, so those are out.
* Change implementation of `gCl` alias to use built-in capabilities of
  git, rather than sed.
* Rename gbx and gbX to gbd and gbD respectively
* Mostly revert alias changes
* Add gbr and gbR aliases to gbm and gbM commands

* Add gbr and gbR aliases to module readme

* Use the lazy-loaded version of virtualenvwrapper if available

This shouldn't cause problems for anyone and should improve startup times for
anyone using python with virtualenvwrapper because it will wait for the first
command to load rather than right away.

* broken $path and $PATH  if nodenv exists (#1315)

This change fixes a bug where no command can be found
(e.g. `ls`) due to the $path array being set to two elements,
one of them with all the previous paths separated by spaces.
This makes zsh break $PATH, instead of colons there are
spaces, and nothing works.

The idea is to have the array be set leveraging the word splitting
that we usually are told to avoid by quoting.

* 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.

* Add the ability to specify tmux session name

* Change the zstyle config name for #607

* Allow ssh module to run on OSX

* Python virtualenv auto workon cwd hook (#1300)

* Command to activate virtualenvs on changing directory

Enables automatic activation of a virtualenv when jumping into a directory
This is done by looking in the current directory for a file or directory
named `.venv`. If it's not found in the current directory its parents will
also be examined. `.venv` can be either:
    1. A file containing the name of a virtualenv found in $WORKON_HOME
    2. A directory containing bin/activate (meaning that the directory is
       assumed to be a virtualenv.)
If $WORKON_HOME is set it is assumed that virtualenvwrapper is installed
and the `workon` command will be issued.

* Update python docs to include info on virtualenv auto-switching

* replace the deprecated abs call in the pacu alias.

* zprofile: Use non-random static TMPDIR

Closes #1319

* sorin theme: Use a proper temp file for async data

* Default sorin theme to /tmp when TMPDIR is not set

Fixes #1331

* Add git aliases for signing commits (#1126)

* Change print to printf in init.zsh error (#1335)

When my zsh had issues, and I was debugging it, this line would
end up being run but no output would be made to the screen.

Changing it from print to printf caused the error to properly be
displayed.

* fixed vivisual key binding (#1148)

Fixes #1236

* Move virtualenv auto-switch cwd hook optional loader out from inside unrelated if statement (#1338)

* Fix #1337 by removing top alias to htop. (#1341)

Fixes #1337

* [completion] Bump external repository to version 0.25.0

8cdf60b Updated rkt commands and arguments
f9d7d9d Implemented autocompletion for rkt pods and images (Fixes #465)
9feab39 Added completion for yarn
a63a098 Update completion for mix, add completion for mix test, fix completion for mix help
6285e0e Add completions for bitcoin-cli
0ed2e86 Set proper description for gist -r
df5a3a1 Try to follow the style guide
d7a2972 Add gist completion for read flag
b0cb2ad Added _rclone
b7c11f4 drop ripgrep completion
907cba3 Update repository infos
ccb53f4 Support newer versions of OpenSSL
f02dc8f add licence information
ceaff68 Add completion for ffind

* [autosuggestions] Bump external repository to version v0.4.0

14179d8 Bump version
281ed9b v0.4.0 changelog updates
83129dd Make asynchronous suggestions disabled by default
a2f0ffb Enabling suggestions should not fetch a suggestion if buffer is empty
7d4a1d9 Add enable/disable/toggle widgets to disable suggestion functionality
e1959d0 Put in a general fix for #219 - Handling input from `zle -U`
c52c428 Fix issues with widgets wrapped by other plugins
ea505b0 Add a spec for unlisted widgets fetching a new suggestion
502fb4a Make tmux_socket_name public so you can access easily from binding.pry
ce36224 Use pry-byebug instead of pry for more functionality
39762ec Set up circle ci
468b740 Test should be passing block to RSpec wait_for
c9a51e0 Handle dashes at the beginning of commands
48a21bf [cleanup] Remove an extra newline
4afbbba We only need to run the feature detection if starting async
e3fa4e4 Don't do anything but re-bind widgets on each precmd
2cd99e6 Add a test for modifying widget list vars after sourcing plugin
c70d685 Clean up widget list spec
255359d Use `+=` to be a bit more true to the spec language
4321fc0 We need to bind on every precmd to ensure we wrap other wrappers
75e8505 Gracefully handle being sourced multiple times
a0fcd81 Destroy zpty on load if it already exists
39ca3da Use a different name for feature detection zpty
dcce973 Remove support for long-deprecated options
0c940e7 Don't bind any zle-* methods
23ef16c Do not show suggestions if the buffer is empty
9381445 Fix tests
c4bfd8e Need to prevent zpty feature detection from HUPing existing zptys
c959408 Only wait a max of 2 seconds for content to match after clearing screen
06fca77 Readme updates for v0.4.0
9feac57 Do not show any error output from async zpty server process
ed8056c Lots of async changes
38eb7cd Update license date
64e7ec5 Rename internal term session method
98f926d Clean up TerminalSession constructor a bit
51e8755 TerminalSession methods return self to support chaining
5151adf Make TerminalSession#clear block until the screen is cleared
2c465a9 Rename async pty name config var
e3eb286 Lots of little async cleanups
c342587 Wait for the terminal.clear to go through before continuing
89dd69d Add pry gem for debugging support
40bb2e7 little cleanup
16666da Handle versions of zsh where zpty does not set REPLY to fd of opened pty
f33b605 Move async initialization into `start` function to keep in one place
78ba071 Add feature detection
3f57198 Only bind widgets once, on initial sourcing
2dbd261 Allow configuring of zsh binary to run integration tests against
6c5cd42 Go back to tracking last pid because `kill %1` didn't seem to be working
54e1eee Optimize case where manually typing in a suggestion
21d9eda Wrap suggestion fetch command in parens to actually run in background
50e6832 Escape the prefix passed into the match_prev_cmd strategy
0305908 Revert `fc` usage in calculating suggestion
8e06a54 Add test for string with "\n" in it
b3208b0 Pass the chosen strategy into the suggestion server pty
ab27425 Quote the suggestion to support sh_split_word option
e5a5b0c Output only newlines in the pty
0337005 Disable word splitting while reading to preserve whitespace
b530b0c Use `zpty -r` with pattern matching to fetch suggestion
5c891af Reset zsh options inside pty (from zsh-async)
e33eb57 Send only the prefix to the suggestion server
fba20b0 Use %1 instead of tracking pid
0308ed7 Rename worker to server
e72c2d8 add a bunch of comments
ab8f295 First pass at async functionality
debbffc Add rspec test around accepting suggestions
4850119 Add separate test task for RSpec
c22ab0e Implement suggestion integration tests in RSpec + tmux
07a6768 Add TerminalSession helper for managing a tmux session
e6591d5 Add RSpec for high-level integration testing
af671fb Add ruby settings to editor config

* [syntax-highlighting] Bump external repository to get bug fixes

ad522a0 driver: Fix printing error message to file when cannot resolve highlighters directory location
73cb832 'main': Highlight mismatched 'if'/'fi'.
be083d7 driver: Improve «unhandled ZLE widget 'foo'» error message.
237f89a 'main': Don't consider «$*» a glob.
835fec7 workaround for PAT_STATIC bug in zsh
9523d6d tests: zsh 5.4-to-be compatibility: Set a new "I am shooting myself in the foot" option.
aac4a44 driver: Fix duplicated slash in error message
4f49c4a docs: Update zplug install instruction
5efd062 tests: Add a regression test for issue #392 (aliases beginning with a '+' are lost).
67be621 tests: Move some code in preparation for next commit. No functional change.
74949c2 driver: Don't undefine aliases that begin with a '+', to workaround an upstream bug.
8d5afe4 driver: Be immune to 'alias' having been redefined.
76ea9e1 'main': Highlight possible history expansions in double-quoted strings.
50fbb5f docs: Update Homebrew link.
2dce602 driver: Be immune to weird aliases in the calling scope.
347cf0e 'main': Add regression test for previous commit.
5625e30 'main': Fix bug: no start_pos=$end_pos in comment short path
fed37a9 'main': Fix a bug concerning command word with embedded colon-space sequences.
626c034 Add FreeBSD port
3d74aa4 Add Fedora package
5398949 changelog: Update for changes pulled out of 0.5.x.

* [editor] Set Delete key in vicmd mode to delete character

Delete key deletes character in vimcmd cmd mode instead of weird
default functionality. The default functionality in vicmd mode
is the Delete key will change the case of many of the characters
on the screen, which is not the default thing that vim does.

This could be confusing and frustrating to users, so set it to delete
a character instead.

* Remove redundant style rules from CONTRIBUTING.md

* [runcoms/zprofile+zshenv] Ensure TMPDIR is always set

In some cases TMPDIR may not be set, in which case it could cause issues
for zsh modules.

This change was prompted by issue #1331.

Also when creating a missing TMPDIR, use mkdir --mode=700 instead
of creating the directory and then chmoding it afterward.

* [CONTRUBITING] Add section on using a secondary devel directory

Add a section on how to use a separate directory than your normal
ZDOTDIR for development with its own zprezto.

* [zprezto-update] Add convenience function to update zprezto (#1344)

* [zprezto-update] Add convenience function to update zprezto

This function checks if there is any update to zprezto, and if so
will pull in the changes. It will not attempt a pull unless
it is fastforwardable. It also makes sure the user is on the master
branch before attempting.

* [zprezto-update] Improve resilience of the function

Better error checking of status of the git repository
and better error producing.

Fit columns into mostly 80 width and add a missing printf
argument.

Use ( ) around the function so changing directory does not affect
the outer scope.

* [README] Add instructions on using zprezto-update function

* Fixed ssh-add not using SSH_ASKPASS

* [editor] set forward/backward word for Ctrl+Right Ctrl+Left

Set forward/backward word to be mapped the same as they are in vim,
instead of having weird functionality when unset.

* [utility] scp/rsync glob local paths but don't glob remote paths

Adds a function which wraps rsync and scp so that remote paths are not globbed
but local paths are globbed. This is because the programs have their own
globbing for remote paths. The wrap function globs args starting in / and ./
and doesn't glob paths with : in it as these are interpreted as remote paths
by these programs unless the path starts with / or ./

Fixes issue #1125

* Fix README example on tmux's default session name

* Updater: fix bug regarding source init in new updater logic

* [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.

* [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.

* Ensure we use the same function definition syntax everywhere

* Add comments into each of the function files to make them easier to find

* [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

* gpg: fix enable-ssh-support detection

That line may be commented in the config file.

* [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.

* 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.

* python: add ubuntu locations for virtualenvwrapper.sh

* [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

* [completion] Minor cleanup of zstyle completion 'tag-order'

De-duplicate common zstyle 'tag-order' for ssh, scp and rsync.

* [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

* [utility] Move the safeops aliases into their own section and add XXi variants

* Update documentation on safeops

* 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

* Small editorconfig file cleanup

* add alias for cloning a repo including all submodules

* change alias to gfcr

* 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.

* git: Add revert to special action contexts

revert is very similar to cherry-pick and has a sequence variant.

* Add fasd as an external module

* fasd: fall back to submodule only if command is missing

* [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.

* Cleanup spurious whitespace

* utility: fix completion for rsync and scp

* [utility] Remove premature call to `compdef`

This is a temporary fix to work-around a minor regression in 90071d3.

* [utility] Update documentation for 'safe-ops'

Update formatting and wordings to be more consistent with rest of prezto
documentation.

* module(homebrew): add outdated options for cask and brew commands

* [homebrew] Add documentation for brewo and casko

* [utility] Reuse interactive aliases when 'safe-ops' is set

When `safe-ops` is set, we can reuse the aliases that are already available.

* [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.

* [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

* [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`.

* [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

* [general] Fix incorrect fenced code indentation

* Update submodules URLs to use git URLs explicitly

Even though GitHub redirects git calls based on user-agent, using git URLs
consistently is preferable.

* [node] Always quote files when `source`-ing

* [osx] Support custom keyword used by `mand` to open man pages in Dash.app

`zstyle` based customization is now avaialble in *zpreztorc*.

* 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.

* 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.

* ssh: update README to reflect macOS changes

* Fix typos

* Update agnoster prompt to include security fix

Fixes #1267

* [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

* [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.).

* [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.

* Adjust GitHub templates with commented lines

* Avoid setting TMPDIR and make sure all modules handle that properly

Fixes #1206

* ssh: check ssh-askpass presence under Linux

Check the presence of `ssh-askpass`, if `/usr/lib/ssh/x11-ssh-askpass`
is present I use it otherwise I require the passphrase in the standard
method

* [general] Miscellaneous cleanup and formatting

* [python] Detect availability of virtualenv plugins as well as pyenv

Just having 'pyenv' available doesn't imply availability of virtualenv pyenv
plugins. Check for availability of virtualenv plugins as well before attempting
to use pyenv wrapper for virtualenv.

* [prompt] Remove spurious duplicate section

Remove duplication 'Prompt Display Length' section.
Also, adjust wrapping for `~`.

* prompt: add sp option to prompt_setup functions

This was a change in zsh 5.4.1 where prompt_sp is now reset on calls to
prompt, unlike previous behavior where it was set by default. This
restores the previous default behavior.

Refs #1423, but is not a complete fix because we need to wait for
external prompts to update as well.

* prompt: remove prompt_sp from prompt_smiley_setup as it is not needed

* Revert "prompt: remove prompt_sp from prompt_smiley_setup as it is not needed"

This reverts commit 24e5e49.

* prompt: remove unneeded prompt_opts from smiley prompt

* Fix typo

* Fix typo

* Edit pyenv virtualenv-init check to support non-brew installations

If the pyenv virtualenv plugin is installed using the [pyenv-installer][1]
app script or directly via a [Git clone][2], then the pyenv-virtualenv-init
executable, that the `pyenv virtualenv-init` command uses, will not
exist in the user's PATH and therefore cannot be found using
`$commands[pyenv-virtualenv-init]`.
Installing the pyenv-virtualenv plugin in this manner is common among Linux users.

Using the pyenv `commands` command, which lists all commands pyenv can
run, we can find if the virtualenv-init command is available to pyenv
and subsequently the virtualenv plugin, without relying on
pyenv-virtualenv-init to exist in the user's PATH.

[1]: https://github.com/pyenv/pyenv-installer
[2]: https://github.com/pyenv/pyenv-virtualenv#installing-as-a-pyenv-plugin

* Update prompt_sorin_setup

Added python support

* Update prompt_sorin_setup

Moved ` ` after the virtual env info into the `zstyle` call and out of `RPROMPT`

* Update prompt_sorin_setup

Addressing a type - and switching from a custom orange to yellow (from default color list) for prompt.

* [python] Ensure availability of virtualenvwrapper file before sourcing it

* [python] Refine pyenv based virtualenv management

Now that pyenv plugins availability is detected by directly probing
'pyenv', we need to rely on the same mechanism consistently.

Further, we perform available pyenv plugin scan with native zsh
techniques instead of relying on external commands.

* Explicitly set PYENV_ROOT

* Fix English mistakes in the autosuggestions module README.md (#1444)

* Change 'conjuncture' to 'conjunction'
* Fix ambiguous pronoun references

* Update reference to Bombich's rsync

* Fix typo

* Drop `easy_install` in docs, everyone now uses `pip` (#1436)

* [python] cleanup readme formatting

Anyone want some backticks? :-)

* Use backticks rather than italics for paths

This is more typical with what I observe elsewhere

* Document that `fasd` is now bundled with prezto

Document that `fasd` is now bundled with prezto (19990c8) and that it's a fallback to a manually installed version (04bfb51).

* Swap italics to code formatting and add hyperlink

* Add missing highlighter to readme

This was added to `.zpreztorc` in 4f19700 but forgot to add it here.

* Add powerlevel9k theme

* Pin powerlevel9k submodule to latest release (v0.6.4)

* Add zsh-help function for easily searching the zsh documentation (#1360)

* Add zsh-help function for easily searching the zsh documentation

Looks up things in the zsh documentation.
Usage: zsh-help [--all] search term(s)

Option --all will seach for the term anywhere, not just at the start of a
line. When not using --all it will search nicely for terms at the beginning
of the line, which in the zsh man pages is where terms that are explained
are located, allowing you to search the zsh man pages easily.

* Improve zsh-help to search section headings before other text

Provides a much easier way to search and access ZSH's manual. First checks for
terms at the start of the manual, then checks if it's at start of a line allowing
whitespace.

Clean up some of the code a bit and format it to have a proper header for the
zprezto project with author/email and description of the function.

* [prompt_sorin] Use ✘ and show return value for non-0 rtrns (#1460)

If you do not want it to show the return code, you can set:
`zstyle ':prezto:module:prompt' show-return-val false`

* prompt: add documentation for return value display

* Updating submodules

Updating `completition`, prompt `async` and `syntax-highlighting`. All
modules where checkout to their latest tag.

* Updates outdate Mac OS X to macOS

* Fix typo in zprezto-update function

* Bind more unbound keys in viins and vicmd to nothing

Unbound keys in viins or vicmd mode have undefined results. Bind
two more of these to nothing to avoid this.

* Add make to gnu-utility commands

* archive: fix unrar-free and add support for unar (#1383)

* archive: fix unrar check when using unrar-free

unrar-free returns the error code 1 when run without arguments, thus
failing the presence check. Replacing the current presence check with
(( $+commands[unrar] )) fixes the problem.

* archive: add unar support for lsarchive and unarchive

No `archive` support with unar.

* Fix README.md for autosuggestions and history-substring-search (#1471)

* ssh: update SSH_ASKPASS workaround to more closely match what ssh-add needs

Fixes #1478

* Clarify that brewu updates AND upgrades

As homebrew includes both an update and upgrade command, it is beneficial to clarify that this performs both, rather than just the update.

* ssh: fix loading of ssh identities when none are explicitly defined

* [tmux] Avoid run tmux when the shell is executed on emacs

This avoid weird bugs to try running zsh through C-x M-x
and bug happens because obviously tmux is not designed to be
executed inside emacs.

* Document support for macOS

This adds docs for b0c85ed which was added in sorin-ionescu/prezto#1376

* Lower requirements down to 4.3.11 again (#1491)

There was an update with the syntax-highlighting module which fixed compatibility with 4.3.11.

* prompt: Add basic troubleshooting information for fonts

This is related to #1495 and a number of other issues which have been
filed about font issues.

* Update init.zsh

It seems that my older git does not support '@' yet.

* prompt: update pure to 1.6.0

Refs #1487

* Set key binding (^space) to expand all aliases including global (#1500)

* environment: Fix logic around url quoting in zsh >= 5.1

Closes #1015, Fixes #978

Thanks to @Eriner for pointing us in right direction.

The code for this comes from zim. This is the last commit with the code we're using:
zimfw/zimfw@537f076#diff-30465d78a41f73dc0f6967d3f34d7964

Note that we need this workaround because we currently support back to
4.3.11.

I believe that originally came from here:
ohmyzsh/ohmyzsh#4473

* Don't show ruby info if using system version

Based off chauncey-garrett/zsh-prezto@a8fe1b3 by @chauncey-garrett

* Add Alternatives section to archive module README (Fixes #705)

* editor: Fix Home and End in vicmd mode

Fixes #1160

* Store cache files in a user-writable location

Fixes #1122

* gnu-utility: avoid overriding shell builtins

Fixes #1263

* gpg: potential fix for #1252

* prompt: update sorin prompt async usage to be closer to pure

* prompt: fix async usage in sorin prompt

Fixes #1509

* Allow modules to be loaded from multiple places (#1458)

* Allow modules to be loaded from multiple places
* Add setting for user specified module dirs

This is initial work for the contrib repo, mentioned in #1424

* Added conda virtualenv support to python module. (#1505)

* Added conda virtualenv support to python module
* Added instructions for Python module options to README

Thanks to @egpbos for the original feature and @ickc for fixing the merge conflicts.

* [utility] Simplify enabling 'diff' color conditions in wrapper function

Nested `if` can be removed for simple cases like these.
Also, doc cleanup.

* Add basic documentation on external module directories

* Fix README formatting

* Allow module to be a symbolic link to a non-empty directory (#1510)

* Remove BRACE_CCL as default

Fixes #1162

* Source correct module's `init.zsh`

Now that modules can be located in different directories, the `init.zsh` should be loaded from the `$module_location` and not `$ZPREZTODIR/modules/$pmodule`

* Update zsh-autosuggestions to v0.4.1

* Update zsh-async to v1.6.0

* [git] Support short-code and improve completion in 'git-hub-shorten-url'

Changes:
- Add optional short-code support
- Improve completion for github.com URL (`http(s)://*.github.com` only)
- Return with non-zero exit code appropriately

* editor: Avoid prompt redisplay on completion when there is no indicator

Refs #1512

* pacman: Update README to recommend pacaur over yaourt

* Add support for loading plugins in the oh-my-zsh format

Closes #1484

* Better TTY logic for zlogin and zlogout

* python-info: provide python version info for theming

Closes #1173
Closes #958

* python-info: avoid setting python_info[version] if python is not on the PATH

* ruby-info: only run commands if the prompt needs the info

* python-info: add support for pyenv and only do extra work if the prompt needs it

* Update zsh-autosuggestions to v0.4.2

* python: make a reasonable guess about virtualenvwrapper python location

Fixes #1416

* python: only override virtualenvwrapper python when needed

Fixes #1519

* python: only override virtualenv python if not set

Fixes #1520

* python: remove zstyle setting in favor of third party environment variable

Refs #1519, #1520

* autosuggestions: ensure external submodule is the latest version

* utility: remove usage of noremoteglob until bugs can be fixed

Fixes #1443, #1521

* 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: #998, #1081

* 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 #1531

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

* Set INTERACTIVE_COMMENTS by default

This allows using # to comment lines in the interactive shell

* Move INTERACTIVE_COMMENTS from editor to environment

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

Refs #1533, #1534

* Add vi-pound-insert as # in vicmd mode

Fixes #1534

* autosuggestions: add basic history troubleshooting information

* 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).

* Only call reset-prompt when the appropriate zstyle is set

Resolves issue #1524 (#1548)

* git: add tag aliases

Originally submitted in sorin-ionescu/prezto#1094

* Add another shadow to the git aliases

Originally submitted in sorin-ionescu/prezto#979

* Remove support for pydf to make options more consistent

Closes #1388

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

Fixes #1550

* Replace git with 'command git' (#1551)

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

* Ignore tmux autostart in vscode terminal

* Allow users to easily define LS_COLORS and LSCOLORS (#1546)

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

* 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.

* Add proper prompt_opts to smiley prompt

* 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/prezto#1449.

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

Fixes #1577, Fixes #1451

* 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.

* Update cache files when .zpreztorc file is modified

Fixes #1581

* Document macOS support for `command-not-found`

Document macOS support for `command-not-found`

* Document `gpf` vs `gpF`

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

* Remove zlogout's Apu quote (#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 #1583

* Fix spelling error in CONTRIBUTING.md (#1590)

* 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.

* syntax-highlighting: Update README to clarify module load order

Fixes #1584

* completion: Compact path to global ssh known hosts file

* coreutils: update list of included coreutils (#1592)

* 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

* Make node-info work without nvm/nodenv

* 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

* Update submodules (#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.

* Correct alphabetical order in zprestorc

* Add explanation for extra git theme symbols in README.md

Helps with #1589

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

* homebrew: Load standard Homebrew environment variables into shell session.

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

* 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.

* homebrew: Cleanup homebrew aliases

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

* 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.

* python: use pure's magic value for VIRTUAL_ENV_DISABLE_PROMPT

Fixes #1627

* python: respect PYENV_ROOT if already set

Fixes #1578

* environment: only enable bracketed paste on non-dumb terminals

Fixes #1552

* doc: Bit of copyediting and formatting for consistency and clarification

* submodule: Updating submodules

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

* 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

* doc: More copyediting and formatting for consistency

* Update submodule 'history-substring-search'

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

* prompt/steeef: Add basic support for editor_info and preview

* prompt/minimal: Add support for preview

* prompt/sorin: Minor cleanup and reordering

* Fix issue #1635. Option to disable GNU ls to group directories first.

* Update submodules

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

And for agnoster prompt

* Resolves #1641 - Roll the pure prompt back from 1.8.0 to 1.7.0
  • Loading branch information
Mark Fletcher authored Dec 6, 2018
1 parent b4327d5 commit 78d4c90
Show file tree
Hide file tree
Showing 142 changed files with 3,094 additions and 810 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
trim_trailing_whitespace = true

[{.gitattributes,.gitignore,.gitmodules}]
indent_style = tab
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!-- Please check if a similar issue already exists or has been closed before before opening your issue. -->

### Description
<!-- Provide a general 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:
10 changes: 10 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
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

-
-
-
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.zwc
*.zwc.old
modules/*/cache.zsh
contrib
12 changes: 12 additions & 0 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.git
[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,3 +19,12 @@
[submodule "modules/prompt/functions/pure"]
path = modules/prompt/external/pure
url = https://github.com/sindresorhus/pure.git
[submodule "modules/fasd/external"]
path = modules/fasd/external
url = https://github.com/clvv/fasd.git
[submodule "modules/prompt/external/async"]
path = modules/prompt/external/async
url = https://github.com/mafredri/zsh-async.git
[submodule "modules/prompt/external/powerlevel9k"]
path = modules/prompt/external/powerlevel9k
url = https://github.com/bhilburn/powerlevel9k.git
38 changes: 36 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,39 @@ 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

This project follows the [Google Shell Style Guide][5] when possible. However,
there are a number of additional things to keep in mind.

- Local variables should be used whenever possible.
- 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 waived for readability.

#### Using an Alternative zprezto Directory

To work on zprezto without messing with your current configuration:

```sh
mkdir devel-zprezto
cd devel-zprezto
git clone --recursive https://github.com/sorin-ionescu/prezto.git .zprezto
ZDOTDIR=$(pwd)
echo "Your development ZDOTDIR is $ZDOTDIR"
setopt EXTENDED_GLOB
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
done
```

Then to start zsh in this development environment you will run:

```sh
ZDOTDIR=/path/to/devel-zprezto zsh
```

#### Modules

- A *README.md* must be present.
Expand All @@ -32,10 +65,11 @@ improve its performance, do not hesitate to fork and send pull requests.
#### Themes

- A screenshots section must be present in the file header.
- The pull request description must have [embedded screenshots][5].
- The pull request description must have [embedded screenshots][6].

[1]: https://github.com/sorin-ionescu/prezto/contributors
[2]: http://gun.io/blog/how-to-github-fork-branch-and-pull-request
[3]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
[4]: https://help.github.com/articles/using-pull-requests
[5]: http://daringfireball.net/projects/markdown/syntax#img
[5]: https://google.github.io/styleguide/shell.xml
[6]: http://daringfireball.net/projects/markdown/syntax#img
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
87 changes: 53 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,42 @@ Installation
------------

Prezto will work with any recent release of Zsh, but the minimum required
version is 4.3.17.
version is 4.3.11.

1. Launch Zsh:

zsh
```console
zsh
```

2. Clone the repository:

git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
```console
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
```sh
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 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:

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

5. Open a new Zsh terminal window or tab.

Expand All @@ -42,9 +57,18 @@ window or tab.
Updating
--------

Pull the latest changes and update submodules.
Run `zprezto-update` to automatically check if there is an update to zprezto.
If there are no file conflicts, zprezto and its submodules will be
automatically updated. If there are conflicts you will instructed to go into
the `$ZPREZTODIR` directory and resolve them yourself.

To pull the latest changes and update submodules manually:

git pull && git submodule update --init --recursive
```console
cd $ZPREZTODIR
git pull
git submodule update --init --recursive
```

Usage
-----
Expand All @@ -66,6 +90,23 @@ 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

1. By default modules will be loaded from */modules* and */contrib*.
2. Additional module directories can be added to the
`:prezto:load:pmodule-dirs` setting in *~/.zpreztorc*.

Note that module names need to be unique or they will cause an error when
loading.

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

Customization
-------------
Expand All @@ -83,35 +124,13 @@ 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"
[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
Loading

0 comments on commit 78d4c90

Please sign in to comment.