> The {query} has to be percent-escaped in macOS 11.
Just replace `:` to `%3A` work fine.
But add function like this one I find on stackoverflow to encode the entire query string would be more robust.
```bash
urldecode() {
# urldecode <string>
local url_encoded="${1//+/ }"
printf '%b' "${url_encoded//%/\\x}"
}
```
When $WORKON_HOME is not set and $ENV_NAME is equal to
$PROJECT_ROOT/.venv which contains bin/activate then
the code wrongly assumes workon is available.
It should execute the second branch to source bin/activate.
Pyenv will install shims for commands that exist in any interpreter, even if it is not the current one. This means that a command may technically exist, but when executed will tell the user to try a different interpreter. The original check for pip in the Python module can fail for this reason, in particular on Ubuntu 20.04.
This change checks with pyenv whether pip really exists in the current interpreter to work around this problem and fixes a bug in pip command detection.
`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.)
On modern versions of nvm, when virtual environment is not activated
(i.e. node comes from system-wide and `nvm version` == 'system'),
redundant node-info could be suppressed from showing.
- 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.
The existing code in runcoms/zlogin results in `$?` being
equal to `1` when starting a login shell if stderr is not
a TTY. For example:
zsh -l 2>/dev/null
When using a theme that displays error/success status of
the last command, the first prompt will show an error.
This commit fixes it so that error code is zero after
sourcing zlogin (unless something unexpected and bad happens).