`tty` command infers the current TTY from file descriptor 0.
`$TTY` gives current TTY directly. The latter works even when
file descriptor 0 is redirected. It's also over 1000 times faster.
==[ Changes since the last release ]==
- Complete documentation overhaul. Powerlevel10k documentation is no
longer embarrassing (still no reference though; coming "soon").
- Worker pool and recursive globber have been rewritten for better
performance and simpler code. Performance improvements (large
speedup means an improvement in big-O and at least 2x in typical
configurations):
- +15% prompt speedup across the board.
- Large prompt speedup for several rarely used prompt segments
(disk_usage, ram, etc.).
- Large prompt speedup for a few prompt segments on macOS
(battery, swap, etc.).
- Large prompt speedup when many prompt segments are active
simultaneously.
- Large prompt speedup when filesystem is slow.
- New prompt segments: nix_shell and timewarrior. Both enabled by
default.
- Configuration wizard:
- Many new options for Pure style (color scheme, number of lines,
etc.)
- Several new options for 8-color version of Pure style.
- Better support for terminals with less than 256 colors.
- Lean, Classic and Rainbow style configs now have disk_usage and
swap prompt segments (disabled by default).
- POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER now contains 'oc'.
- New parameters:
- POWERLEVEL9K_LEGACY_ICON_SPACING=true makes spaces around icons
appear just like in powerlevel9k.
- When in a vcs repo, POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=true
removes directory prefix that precedes repo root.
- P9K_KUBECONTEXT_USER can now be used in kubecontext format.
- POWERLEVEL9K_GOENV_SOURCES -- the same as
POWERLEVEL9K_RBENV_SOURCES but or go.
- POWERLEVEL9K_TERRAFORM_CLASSES -- the same as
POWERLEVEL9K_AWS_CLASSES but for terraform.
- Bug fixes:
- Configuration wizard now correctly follows symlinks when modifying
~/.zshrc and ~/.p10k.zsh.
- ram prompt segment now works on WSL.
- Powerlevel10k now correctly works with zsh-you-should-use in
hardcore mode.
- POWERLEVEL9K_PUBLIC_IP_HOST now points to a host that actually
works.
- Instant prompt no longer prints nonsensical "entry=" in rare
circumstances.
- Misc:
- Config templates no longer work with
POWERLEVEL9K_VISUAL_IDENTIFIER='' defined after them.
- Powerlevel10k now detects when Antigen corrupts its source and
emits an appropriate error message.
- Command line parser now understands 'tabbed'.
- Remove all references to romkatv/dotfiles-public. Fonts are now
hosted in romkatv/powerlevel10k-media together with all images
and animations.
==[ Build time dependencies ]==
- edb99aa7b8
- 75be63625a
- https://opensource.apple.com/tarballs/libiconv/libiconv-51.200.6.tar.gz
Bug report from @qosmio:
https://github.com/sorin-ionescu/prezto/pull/1771#issuecomment-575596417
I'm unable to reproduce it and @qosmio hasn't yet confirmed or
disconfirmed whether this fix works. It's a good idea to change
the code this way in either case.
(As I mentioned in #1771, this `stty -ixon` call may have been added
by mistake. It doesn't do what the comment suggest and is at least as
likely to be harming users as helping them.)
- New features:
- Show On Command -- Display prompt segments conditional on the
command being typed. Demo:
https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/show-on-command.gif
- `p10k display` -- Quickly hide or show different parts of prompt.
- `p10k-on-*` hooks -- Get notified about prompt-related events.
- New prompt segments:
- google_app_cred -- Google Application Credentials.
- luaenv -- Lua version from https://github.com/cehoffman/luaen.
- jenv -- Java version from https://github.com/jenv/jenv.
- plenv -- Perl version from https://github.com/tokuhirom/plenv.
- nnn -- Shell indicator for https://github.com/jarun/nnn.
- Important fixes:
- Ctrl-C no longer shortens prompt when used to terminate a zle widget
with transient prompt enabled.
- Don't print warnings in instant prompt when OMZ is updating.
- rust_version now properly recognized rustup overrides.
- Smoother rendering when using transient prompt.
- New style in `p10k configure`: Lean restricted to 8 colors.
- New feature: Instant Prompt.
- Zsh starts instantly even if zshrc loads dozens of plugins.
- Must be explicitly enabled via `p10k configure`.
- New prompt segment: azure.
- New styles: Pure and Rainbow.
- 6 times faster loading (independent of instant prompt).
`brew cleanup --force` produces the following error message: `Error: invalid option: --force`. I can't seem to find any record of this being a valid option for the cleanup command, so either it was deprecated in the stone age or it was a simple mistake. However, there is a `--force` option available for `brew uninstall`, but that's a dicey thing to alias.
Module `directory` used to set AUTO_NAME_DIRS. This was changed in
73e94b84 but README.md hasn't been updated. This looks like an
accidental omission that this commit fixes.
- New prompt segment: terraform.
- Configuration wizard:
- Offer to install Meslo Nerd Font (only on iTerm2 and Termux).
- Offer to enable `time` prompt segment.
- New style options: round separators, heads and tails.
- Reduce the minimum required terminal width to 55 columns.
- Several bug fixes. Most notable:
- Fix network interface and ip parsing on Linux and WSL.
- Disregard auto_name_dirs if it's set.
- Several bug fixes. Most notable:
- Don't hide command execution time on reset-prompt.
- Support prezto with zsh 5.1.
- Don't hide nvm prompt when there is no nvm command.
- New prompt: ranger.
- Add an option to hide rust version when outside of rust project tree.
- Add an option to show rvm gemset.
A dozen bug fixes. Most important:
- rbenv and a few other segments didn't work if IFS was set
to something unusual.
- vcs segment couldn't properly apply subsegment style if
color overrides used mnemonic names.
- the check for .p10k.zsh already being sourced was too strict.
This is a new variable that will need to be set on all new prompts and
is not backwards compatible with custom prompts that are not prezto
managed, but use prezto's editor-info functionality. Updated the
README.md with additional information for themes.
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
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.
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.
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.
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.
- Add missing documentation for options and environment variables
- Rearrange definition and documentation of 'Options', 'Variables'
and 'Aliases' in a consistent order
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.
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.
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.
After profiling startup time, I found that "pyenv rehash" is
by far the slowest piece. This change skips rehashing on init.
See https://github.com/pyenv/pyenv/issues/784#issuecomment-404850327
Also pass the shell explicitly, as suggested in
https://github.com/pyenv/pyenv/issues/784#issuecomment-404944318,
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
This reverts commit 6d00fdf8c8.
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.
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
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
* 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.
* 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.
* 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.
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.
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
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.
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.
By keeping the variable `_etc_host_ignores` around, it can be resolved
lazily which is turn should allow selective ignores on a per invocation
basis.
Also, `'\#'` doesn't need to be added to `_etc_host_ignores` anymore.
It is enforced inline.
Entries from static '/etc/hosts' can now be ignored via 'zstyle' based
configuration. Both IP address and corresponding hostname will be ignored
during host completion. However, some of the entries ignored from '/etc/hosts'
still might appear during completion because of their presence in 'ssh'
configuration ('~/.ssh/config') or history ('~/.ssh/ssh_hosts',
'~/.ssh/known_hosts' etc.).