1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-07-03 13:30:28 +00:00
Commit Graph

1092 Commits

Author SHA1 Message Date
Indrajit Raychaudhuri
37443368c1 ruby: Cleanup and optimize 'ruby' module
Changes:
- Honor `$RBENV_ROOT` or `RVM_DIR` if set but, no need to set it
  explicitly if not set. Instead, let the respective initialization
  scripts take care of that.
- Reverse `rbenv` vs `rvm` selection order, preferring `rbenv` instead.
- Check for availability of `rbenv` or `rvm` function instead of command
  to validate requirements. In a properly configured and initialized
  shell, `rbenv` or `rvm` will be available as function.
- Adhere to more idiomatic Zsh operation and minimize redundant syntaxes.

For additional rationale, see: https://github.com/rbenv/rbenv/wiki/Why-rbenv%3F
2021-06-01 14:31:26 -05:00
Indrajit Raychaudhuri
afe59b293b python: Update pyenv initialization flow per pyenv 2.0
In pyenv 2.0 onwards, it is not enough anymore to initialize pyenv in
shell by just calling `pyenv init -`. We also need to update `path` to
include pyenv shims by calling `pyenv init --path`.

Also, honor `$PYENV_ROOT` if set but, no need to set it explicitly if
not set. Instead, let the initialization script take care of that.
2021-06-01 14:29:39 -05:00
Indrajit Raychaudhuri
f0942e6dda python: Optimize completion for loading lazily on demand
Move `pip` to separate completion definition delegating to pip to do
all the completion work.

Since the completion is loaded lazily on-demand, it avoids the
performance overhead during Zsh initialization.

Implementation note:
The helper function `_pip_completion` implementation is based on the
official pip completion function (which can be generated with
`pip completion --zsh`) adhering to the newer compsys style.

See: 'man zshcompsys' for more details.
2021-06-01 14:29:39 -05:00
Indrajit Raychaudhuri
d686da3c03 python: Reformat and apply visual cleanup
Changes:
- Fallback to `virtualenvwrapper` without `pyenv` wrapper if `python` is
  available in path, regardless of whether `brew` is available.
- Look up for availability of `python2` and `python3`, not just `python`.
- Check for existence of path before adding to global `$path` array.
- Adhere to more idiomatic Zsh operation and minimize redundant syntaxes.
- Prefer looking up `$functions` for fully initialized `pyenv`.
2021-06-01 14:29:39 -05:00
Indrajit Raychaudhuri
9037fda36d completion: Avoid double-quoting LS_COLORS for completion
Double-quoting `LS_COLORS` prevents it from loading in environment,
which isn't what we want.
2021-05-25 18:12:45 -05:00
Ehren Kret
53033bc5d9 Fix broken source commands in node module
Placing `--no-use` inside the quoted string results in source
attempting to load a file which literally ends with ` --no-use`
instead of passing --no-use as an argument.
2021-05-24 11:33:49 -05:00
Indrajit Raychaudhuri
7052e2a002 completion: Skip completion lookup for key-only brewed curl
Skip lookup for `_curl` completion function to avoid fallback
completion having higher priority.
2021-05-23 19:40:32 -05:00
Indrajit Raychaudhuri
979144d0e4 git: Update minimum required git version to 2.11
Git 2.11+ has more versatile `submodule`, `fetch`, `rebase` options for
common use-cases.
2021-05-21 13:40:49 -05:00
hidekuro
c4a8f446c6 git: Use update instead of foreach in alias 'gSu'
Modern `git` can use `submodule` option `update` instead of `foreach`
to achieve approximately similar outcome.

To allows call without assuming that all submodules will have default
branch as `master`, the preferred approach would be to call
`git submodule update --remote --recursive` after registering the
correct branch for submodule in `.gitmodules`:

```
git config -f .gitmodules submodule.<path>.branch <branch>
```

For more discussion, see: https://stackoverflow.com/a/33835815

Signed-off-by: Indrajit Raychaudhuri <irc@indrajit.com>
2021-05-21 13:40:49 -05:00
Indrajit Raychaudhuri
a3643f124e git: Optimize scripts for git helper functions
Optimize git internal calls and adjustment git helper functions to use
more idiomatic Zsh conventions avoiding external calls.
2021-05-21 13:40:49 -05:00
Indrajit Raychaudhuri
efebe3efec git: Alias and function cleanup and formatting for clarity
Changes:
- Prefer longer form of git switch for better clarity.
- Move `-S` (`--gpg-sign`) in all the alias definitions to  the end to
  allow custom keyid.
- Simplify operations in helper functions git native calls.
- Apply minor reformatting and rearranging.
2021-05-21 13:40:49 -05:00
Indrajit Raychaudhuri
9459a716bf node: Add handy aliases for 'npm'
Add standard `npm` aliases that are used frequently.
2021-05-21 13:39:23 -05:00
Indrajit Raychaudhuri
28ec39d9b2 node: Add environment variable to store 'n' cache
See: https://github.com/tj/n#installation for details.
2021-05-21 13:39:23 -05:00
Indrajit Raychaudhuri
9f37fc9841 node: Optimize completions for loading lazily on demand
Move `grunt` and `gulp` to separate completion definitions wrapping
`grunt --completion=zsh` and `gulp --completion=zsh` respectively.

Since the completions are loaded lazily on demand, they avoid the
performance overhead during Zsh initialization.

Additionally, remove `npm` completion since it is already bundled with
Zsh for quite a while.
2021-05-21 13:39:23 -05:00
Indrajit Raychaudhuri
f84075b8d4 node: Prefer nodenv over nvm when available
Reverse `nodenv` vs `nvm` selection order, preferring `nodenv` instead.

For additional rationale, see: https://github.com/nodenv/nodenv/wiki/Why-nodenv%3F
2021-05-21 13:39:23 -05:00
Indrajit Raychaudhuri
af46875c5e node: Revamp and optimize 'node' module
Changes:
- nodenv and nvm now honors (and prioritizes) `$XDG_CONFIG_HOME` over
  `$HOME` to lookup local nodenv/nvm installation.
- Make `nvm` loading lazy (via `--no-use` argument).
- Remove redundant NODENV_ROOT or NVM_DIR, respective script already
  set them up.
- Adhere to more idiomatic Zsh operation and minimize external command
  usage (like `sed`).
2021-05-21 13:39:23 -05:00
Indrajit Raychaudhuri
c6b59f8bb1 completion: Set standard style used by 'list-colors'
Set `LS_COLORS` if not already available so that it is available as
standard style `list-colors`.

This needs to be explicitly set in completion module to ensure that the
variable is available even if 'utility' module is not loaded earlier.
2021-05-21 13:37:40 -05:00
Indrajit Raychaudhuri
515d70f639 utility: Add support for 'aria2c' in 'get' alias
`get` alias now supports `aria2c` via optional `zstyle`.

To configure `aria2c` to be used for `get`, use:
zstyle -s ':prezto:module:utility:download' helper 'aria2c'

Note that we still fall back to `curl` when the desired download helper
isn't available.
2021-05-21 13:35:51 -05:00
Indrajit Raychaudhuri
7980dd91c9 gnu-utility: Add more utility commands and rearrange
Add missing `basenc`, `egrep`, `fgrep` etc. and reformat a bit.
2021-05-21 13:33:58 -05:00
Indrajit Raychaudhuri
e07fd052d7 utility: Simplify conditional block for 'make' helper
Further, remove redundant `function` clause as per Prezto convention.
2021-05-21 13:33:07 -05:00
Indrajit Raychaudhuri
d3d79bbe74 utility: Use Zsh native mechanism to detect GNU 'du'
Skip additional call to `grep` and use Zsh native mechanism to detect
GNU version of `du`.

Further, Remove redundant `function` clause as per Prezto convention.
2021-05-21 13:33:07 -05:00
Indrajit Raychaudhuri
6eb4021556 utility: Remove redundant function clause in 'diff'
We don't use `function` clause in Prezto by convention.
2021-05-21 13:33:07 -05:00
Indrajit Raychaudhuri
d51e5ce40f utility: Always use 'git' fallback for 'wdiff' wrapper
Use `git` fallback (if present) even when color is off and `wdiff` is
not present.

Further, remove redundant `function` clause as per Prezto convention.
2021-05-21 13:33:07 -05:00
Indrajit Raychaudhuri
fae5e493ec utility: Check best-fit Python version for 'http-serve'
When creating `http-serve` alias, first check if Python is actually
available. And, if available, apply the most specific version.
2021-05-21 13:30:36 -05:00
Indrajit Raychaudhuri
2368c9142b utility: Honor pre-defined COLOR settings for grep
Honor `GREP_COLOR` or `GREP_COLORS` if already defined for coloring
`grep` output.
2021-05-21 13:27:52 -05:00
Indrajit Raychaudhuri
1ff9421f7b general: Update documentation better qualifying runcom paths
Zsh and Prezto files don't always reside in `~/`. Instead, they have
a more spec compliant location (`${ZDOTDIR:-$HOME}/`). Make them
unambiguous in the documentation. Likewise, for `$GNUPGHOME`.

Further, add instruction for optionally setting up Prezto in
`$XDG_CONFIG_HOME`.

While at this, also add clarification on relative ordering of some of
the modules, apply more formatting tweaks and doc improvements.
2021-05-21 12:31:02 -05:00
Indrajit Raychaudhuri
424d4cb779 utility: Detect GNU 'ls' before applying the relevant tweaks
Detect `ls` provided by GNU Core Utilities upfront before applying
the relevant settings and aliases.

The revised logic takes the following aspects into consideration:
- `is-callable 'dircolors'` is not a sufficient test for verifying if
  the `ls` in scope is _also_ provided by GNU Core Utilities. `ls` can
  continue to be the one provided by BSD Core Utilities because of its
  precedence in `$path`.
- The `ls` in scope anyway can be either GNU Utils provided or BSD Utils
  provided depending on either `$path` precedence, soft link (via
  `ln -s`), or wrapper function (via 'gnu-utility' module).
- So instead of '_guessing_' the possible one, just detect if it is from
  GNU Utils and apply the relevant settings and aliases.
- Note that GNU prefixed `ls` (`gls`) is intentionally not honored in
  this case to avoid possible conflict/shadowing with other `gls`
  callable (can happen if 'git' module is used, for example).
  Besides, honoring `gls` would imply we honor other commands (like
  `mv`, `rm` etc.) to be consistent. We have a module 'gnu-utils'
  dedicated for that after all.
2021-05-21 11:50:18 -05:00
Indrajit Raychaudhuri
b14aca307d prompt: Update async helper to 1.8.5 2021-05-12 01:32:54 -05:00
Indrajit Raychaudhuri
0628b91028 completion: Update zsh-completions submodule to 0.33.0 2021-05-06 21:23:20 -05:00
Indrajit Raychaudhuri
742c1ea26f history: use external mv command for HISTFILE migration
This will make sure the actual external command `mv` is used instead of
wrapper function.
2021-05-05 12:21:42 -05:00
Indrajit Raychaudhuri
d80e393f78 general: Reformat documentation with better formatting and wording
General purpose reformating and rewording in (a few places). This should
also make markdown linting happier.

Prefer back-ticks wherever useful and use `console` for code blocks to
be executed on terminal.

Also, update references links wherever possible (including update from
'http://' to 'https://').
2021-05-05 12:21:04 -05:00
Indrajit Raychaudhuri
8edc5e9323 environment: Simplify nested conditional block
Avoid unnecessary nesting for conditional block.
2021-05-05 12:13:02 -05:00
Indrajit Raychaudhuri
d04a6ef459 rsync: Recommend Homebrew or MacPorts rsync for macOS
Bundled `rsync` is 2.6.x which is too old. Prefer 3.2.x from Homebrew
or MacPorts instead.
2021-05-05 12:03:48 -05:00
Indrajit Raychaudhuri
788aa3d158 rsync: Check for new rsync before applying newer options
The newer options for extended attributes or file-flags got reliable
only after rsync v3.1.
2021-05-05 12:03:48 -05:00
Indrajit Raychaudhuri
261d3b8224 rsync: Remove broken HFS+ specific compression flag
Remove `--protect-decmpfs` by default since hfs-compression specific
changes have been marked by upstream as broken since 3.1.3 and there is
little likelihood of that changing.
2021-05-05 11:51:25 -05:00
Indrajit Raychaudhuri
68300e6de4 node: Fixup nvm path detection for Homebrew based nvm
Prefer using `brew --prefix nvm` instead of just `brew --prefix` and
actually use the variable `nvm_prefix` once detected and set up.
2021-05-05 11:50:59 -05:00
Indrajit Raychaudhuri
e87a9b0a93 completion: Add completion for keg-only brewed curl when available
As curl bundled with macOS does not include `_curl` definitions, one
way to make `_curl` available is to install curl from Homebrew.

However, since curl from Hombrew is _keg-only_, its function path needs
to be explicitly included.
2021-05-05 11:49:57 -05:00
Indrajit Raychaudhuri
509c5ca80f history: Move HISTFILE path to more conventional one
Change default `HISTFILE` path from `~/.zhistory` to more conventional
`~/.zsh_history`. This aligns better with Debian variants, macOS and
Oh My Zsh.

This would provide an easier onboarding experience to users coming to
Prezto from standard (framework free) zsh or from Oh My Zsh.

For existing Prezto users, we attempt to automatically rename old
`HISTFILE` to new one iff the old one exists and the new one doesn't.
However, if both old and new `HISTFILE` exist and the old one is more
recent, we just alert the user about what changed with a suggested way
to accommodate the change.
2021-05-02 03:35:12 -05:00
Indrajit Raychaudhuri
1d1ae0a661 homebrew: Update documentation 2021-05-02 03:34:45 -05:00
Indrajit Raychaudhuri
f830065347 homebrew: Add 'brew upgrade' alias for cask
This adds alias for 'brew upgrade --cask' specifically for casks
via alias 'casku' (analogous to 'brewu').
2021-05-02 03:34:45 -05:00
Indrajit Raychaudhuri
3285b33f0c homebrew: Remove wrapper function for deprecation warning 2021-05-02 03:34:45 -05:00
Roman Omarov
9d42feac16 homebrew: cask aliases update 2021-05-02 03:34:45 -05:00
Indrajit Raychaudhuri
93556a7d5f archive: Remove unnecessary interpreter directive
These files are expected to be `source`d in and not executed standalone.
2021-05-02 03:01:32 -05:00
Indrajit Raychaudhuri
5a8bfd5bf5 helper: Update docs for OS detection helpers 2021-05-02 01:15:19 -05:00
Jeff Widman
63bc5061a7 Delete prompt_powerlevel9k_setup
I think this should have been removed as part of 0a07ba27a2.

Currently I'm seeing this warning after updating to `master`:
```
Couldn't read file /Users/jeffwidman/.zprezto/modules/prompt/functions/prompt_powerlevel9k_setup containing theme powerlevel9k.
```
2021-04-30 16:16:11 -07:00
Indrajit Raychaudhuri
f651140f2c completion: Add note about keep zcompdump younger than cache time 2021-04-30 17:52:43 -05:00
mattmc3
6a70bdfff2 Ensure compinit updates its modified date
`compinit -i` doesn't always change zcompdump, which means that the
`compinit -C` condition fails to run until the completions change.
When we `compinit -i`, we should touch the file too to solve this.
2021-04-30 17:52:43 -05:00
Indrajit Raychaudhuri
c5175145d4
prompt: Fixup ~/.zpreztorc in p9k removal warning 2021-04-30 15:24:00 -05:00
Indrajit Raychaudhuri
16ddedd1f3 command-not-found: Update docs for Homebrew
Update documentation for Homebrew to indicate that a recent version of 
Homebrew does not need to tap `command-not-found` Homebrew repository.
2021-04-30 15:19:22 -05:00
Indrajit Raychaudhuri
db6cd0d668 prompt: Update 'powerlevel9k' removal warning with instruction 2021-04-30 10:54:29 -07:00
Indrajit Raychaudhuri
40cc9f52f9 command-not-found: Simplify Homebrew on macOS setup
Now that 'command-not-found' helper loading has been significantly
simplified and the startup time improved in the official Homebrew tap,
the workaround for script detection (and caching) can be removed.
2021-04-30 03:10:33 -05:00
Indrajit Raychaudhuri
8003d0c6d8 git: Autoload helper functions for 'run-help'
Now that, prezto is configured to lookup more specific 'run-help'
function, autoload the known one for git.
2021-04-30 03:09:07 -05:00
Indrajit Raychaudhuri
7222fe5fd6 utility: Autoload helper functions for 'run-help'
Now that, prezto is configured to lookup more specific 'run-help'
function, autoload the known ones for utility.
2021-04-30 03:09:07 -05:00
Poscat
4de0377106 Add support for zstd compressed tarballs to module 'archive' 2021-04-29 21:20:25 -07:00
Indrajit Raychaudhuri
a2f3f419f6 prompt: Make 'powerlevel9k' removal warning message friendlier 2021-04-29 17:53:46 -05:00
Indrajit Raychaudhuri
0a07ba27a2 prompt: Remove Powerlevel9k
Powerlevel9k has been marked deprecated and unmaintained by the author.
Powerlevel10k is now the recommended replacement.

See: https://github.com/Powerlevel9k/powerlevel9k#powerlevel9k-is-deprecated-and-now-unmaintained-please-use-powerlevel10k
2021-04-29 14:21:55 -05:00
Indrajit Raychaudhuri
ce937020ce history: Update doc to accommodate recent macOS
In recent versions of macOS (Catalina and above), `HISTFILE` is set
via system `/etc/zshrc`.
2021-04-26 18:05:37 -05:00
Indrajit Raychaudhuri
428632ac07
history: Minor formatting update 2021-04-26 17:53:52 -05:00
Herobs
76b8c810aa osx module mand fix
> 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}"
}
```
2021-04-26 15:37:01 -05:00
Yang Tang
d66041cdb7 Update history-substring-search submodule to v1.0.2 2021-04-08 21:22:06 -07:00
Kenichi Kamiya
b8a3d90a13 Fix a typo s/eigth/eighth/ 2021-04-08 21:12:29 -07:00
c005e87859 Merge upstream/master 2021-03-05 17:06:54 +01:00
667fba697e [aws] Update AWS prompt when ACCESS_KEY is present 2021-03-05 17:06:47 +01:00
Roman Perepelitsa
704fc46c3f prompt: update powerlevel10k submodule to v1.14.6
Release notes:

- https://github.com/romkatv/powerlevel10k/releases/tag/v1.14.6
2021-01-19 11:11:27 -08:00
Roman Perepelitsa
c43d483d47 prompt: update powerlevel10k submodule to v1.14.5
Release notes:

- https://github.com/romkatv/powerlevel10k/releases/tag/v1.14.5
2021-01-05 08:20:35 -08:00
f080e2075e Merge upstream/master 2020-12-20 17:52:55 +01:00
Roman Perepelitsa
b7a80d99a8 prompt: update powerlevel10k submodule to v1.14.4
Release notes:

- https://github.com/romkatv/powerlevel10k/releases/tag/v1.14.4
2020-12-18 10:18:59 -08:00
Dani
c7ef9c1f46 [aws] Update prompt 2020-12-17 13:24:41 +01:00
Dani
775f6123b2 Merge upstream/master 2020-12-17 12:06:52 +01:00
Roman Perepelitsa
e915c34507 prompt: update powerlevel10k submodule to v1.14.3
Release notes:

- https://github.com/romkatv/powerlevel10k/releases/tag/v1.14.0
- https://github.com/romkatv/powerlevel10k/releases/tag/v1.14.1
- https://github.com/romkatv/powerlevel10k/releases/tag/v1.14.2
- https://github.com/romkatv/powerlevel10k/releases/tag/v1.14.3
2020-12-14 14:19:17 -08:00
Dani
39151645ac Merge upstream/master 2020-09-05 16:05:00 +02:00
Roman Perepelitsa
0a405494ca prompt: update powerlevel10k submodule to v1.13.0
Release notes: https://github.com/romkatv/powerlevel10k/releases/tag/v1.13.0
2020-09-01 09:50:55 -07:00
813bde4d44 Merge upstream/master 2020-08-01 18:12:16 +02:00
Matthieu PETIOT
38882275b8
Add ^_ mapping to undo in viins mode (#1860)
This allows to cancel a tab completion, as ^_ in emacs mode.
2020-07-30 13:29:59 -07:00
Olaf Conradi
e9197234cf
Add check for empty WORKON_HOME (#1861)
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.
2020-07-27 12:49:40 -07:00
Yasuharu Iida
685da200d7
completion: bump version to tags/0.32.0 (#1856) 2020-07-22 10:28:53 -07:00
Austin Sloane
4e7ab4b8b7
utility, helper: add aliases to use with termux terminal emulator (android) (#1859) 2020-07-20 16:07:53 -07:00
677e301174 Merge upstream/master 2020-07-14 19:39:15 +02:00
Roman Perepelitsa
c21295b27f prompt: update powerlevel10k submodule to v1.12.0
Release notes: https://github.com/romkatv/powerlevel10k/releases/tag/v1.12.0
2020-07-06 09:15:34 -07:00
83f3dca4a3 Merge upstream/master 2020-07-01 18:05:08 +02:00
Zhiming Wang
a132c1007a
git-info: use tab as separator for splitting ahead_and_behind (#902)
The current implementation is not tamper-proof against a modified IFS. See discussion in https://github.com/sorin-ionescu/prezto/pull/902 for details.
2020-06-29 10:26:36 -07:00
Joost Cassee
2d3763380c
Ask pyenv whether pip exists if installed (#1848)
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.
2020-06-29 10:25:15 -07:00
hidekuro
20a78c04e5
Remove --all from git alias glg (#1853) 2020-06-29 10:23:08 -07:00
Texas Toland
ff91c8d410
Make .zcomp* location configurable (#1842) 2020-06-04 13:53:44 -07:00
Roman Perepelitsa
b8f5b31573 prompt: update powerlevel10k submodule to v1.11.0
Release notes: https://github.com/romkatv/powerlevel10k/releases/tag/v1.11.0
2020-05-31 20:19:44 -07:00
Srijan R Shetty
cb69d2d3e4
Merge pull request #1836 from diraol/dro/git_pull_autostash
[git] Add git pull autostash alias
2020-05-29 11:56:04 +05:30
romkatv
793f239a5e prompt: update powerlevel10k submodule to v1.10.0
Release notes:

- https://github.com/romkatv/powerlevel10k/releases/tag/v1.8.0
- https://github.com/romkatv/powerlevel10k/releases/tag/v1.8.1
- https://github.com/romkatv/powerlevel10k/releases/tag/v1.8.2
- https://github.com/romkatv/powerlevel10k/releases/tag/v1.9.0
- https://github.com/romkatv/powerlevel10k/releases/tag/v1.9.1
- https://github.com/romkatv/powerlevel10k/releases/tag/v1.10.0
2020-05-20 03:22:52 -07:00
Diego Rabatone Oliveira
649c0e4561 [git] Add git pull autostash alias
Adds the gfma and gfra aliases with the `--autostash` flag.
2020-05-14 15:19:03 -03:00
Amyn
13c61bae30
Do not source history-substring-search if already loaded (#1830) 2020-05-02 11:21:27 -07:00
6d546561c6 Merge upstream/master 2020-05-01 11:38:39 +02:00
romkatv
530ea10126 prompt: update powerlevel10k submodule to v1.7.0
Release notes:

  - https://github.com/romkatv/powerlevel10k/releases/tag/v1.6.0
  - https://github.com/romkatv/powerlevel10k/releases/tag/v1.6.1
  - https://github.com/romkatv/powerlevel10k/releases/tag/v1.7.0
2020-04-30 14:34:22 -05:00
Zac Bergquist
342385618c homebrew: load helper dependency
Updates #1815
2020-04-23 21:21:17 -05:00
2da4774473 [aws] Improve ssh_aws_any function 2020-04-13 15:45:08 +02:00
f427a567d7 Merge upstream/master 2020-04-09 18:27:14 +02:00
Srijan R Shetty
95ff0360ae
fix: regression in homebrew module (#1816) 2020-04-06 02:55:01 -07:00
Ackerley Tng
5b03d7fa32
prompt: fix usage of zsh-async in sorin prompt (#1810) 2020-03-29 12:51:11 -07:00
Charith Amarasinghe
d5bef142d4
Fix missing dependency on helper module for helpers added in #1793 (#1811)
PR #1793 introduced helper functions for OS detection in some modules.
These helpers require a module dependency on the 'helper' module.
2020-03-29 12:49:35 -07:00
9b2744cfdf Merge upstream/master 2020-03-25 12:18:59 +01:00
7fbedf4a3b [aws] Add iops to aws_ebs() output 2020-03-25 12:18:35 +01:00
romkatv
f479f37ead prompt: update powerlevel10k submodule to v1.5.0
Release notes: https://github.com/romkatv/powerlevel10k/releases/tag/v1.5.0
2020-03-22 14:07:08 -07:00
Kaspar Vollenweider
f4ca9ebfc9 feat(helper): add os-type helper functions
Add the following functions:

- is-darwin
- is-linux
- is-bsd
- is-cygwin

And apply them everywhere I found code doing that what these functions do.
2020-03-19 11:49:11 -07:00
Kaleb Elwert
1b99be879c Update syntax-highlighting module 2020-03-19 11:19:25 -07:00
romkatv
cfeb8cd6c9 prompt: update powerlevel10k submodule to v1.4.0
Release notes: https://github.com/romkatv/powerlevel10k/releases/tag/v1.4.0
2020-03-16 09:32:50 -07:00
0c22054a49 Merge upstream/master 2020-03-09 19:51:20 +01:00
romkatv
d955fbdeb7 prompt: update powerlevel10k submodule to v1.3.0
Release notes: https://github.com/romkatv/powerlevel10k/releases/tag/v1.3.0
2020-03-06 10:04:57 -08:00
romkatv
94f9e44f3f use $TTY instead of $(tty); it's faster and more reliable
`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.
2020-03-02 10:50:11 -08:00
romkatv
92e6b37f73 prompt: update powerlevel10k submodule to v1.2.0
Release notes: https://github.com/romkatv/powerlevel10k/releases/tag/v1.2.0
2020-02-27 13:17:43 -08:00
d2832051f7 [aws] Improve output of aws_subnets function 2020-02-26 18:58:12 +01:00
65e8ba0596 [æws] Add aws_subnet function 2020-02-24 21:11:09 +01:00
272528b439 [aws] Add function for deactivating (unset variables) current aws profile 2020-02-22 20:04:40 +01:00
a73bb314cc [aws] Fix switch_aws_profile when dealing with AWS_DEFAULT_REGION 2020-02-22 19:41:14 +01:00
cb0099ec7a [aws] Improve output of aws_cf function 2020-02-22 16:12:23 +01:00
fc8f82329b [aws] Add function to activate and switch profiles taken from aws credentials file 2020-02-22 16:11:38 +01:00
3d827cdb88 [aws] Add support for showing AWS region in prompt 2020-02-20 18:43:05 +01:00
47b37b22ea Merge upstream/master 2020-02-20 18:04:49 +01:00
Federico Frenguelli
e9f281cd6f Updated prompt pure to version 1.11.0 2020-02-11 10:09:48 -08:00
4b32ae96db Merge upstream/master 2020-02-06 19:48:41 +01:00
bca85497f8 [aws] Add a (dirty) function for showing cloudfront distributions 2020-02-06 19:48:22 +01:00
romkatv
4bcbe2ee68 prompt: update powerlevel10k submodule to v1.1
==[ 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
2020-02-02 11:09:29 -08:00
ac9843e2d4 Merge upstream/master 2020-01-30 08:54:36 +01:00
Kaleb Elwert
66b9ea7d44 Update documentation
- Fix an old link to the wrong issue tracker
- Add documentation to the history module about migration from oh-my-zsh

Closes #1766
2020-01-20 07:50:42 -08:00
Roman Perepelitsa
7cad349a5a environment: improve the TTY check (#1785)
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.)
2020-01-20 07:29:34 -08:00
7ec4aad48c Merge upstream/master 2020-01-19 18:54:16 +01:00
romkatv
1f52b03a45 prompt: update powerlevel10k submodule to the latest commit (#1784)
- 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.
2020-01-16 08:52:09 -08:00
Ivan Smirnov
2acaec814f autosuggestions: update to v0.6.4 2020-01-14 09:08:47 -08:00
Roman Perepelitsa
7c94154dda environment: apply stty -ixon only to tty (#1771) 2019-12-27 15:22:15 -08:00
Maxim Baz
e86200e7aa Allow mapping Ctrl+S and Ctrl+Q shortcuts (#1750) 2019-12-18 15:37:51 -08:00
721b1535ea Merge upstream/master 2019-12-18 16:03:08 +01:00
romkatv
a5ebde1b17 prompt: update powerlevel10k submodule to the latest commit (#1768)
- New prompt segments:
  - gcloud
  - fvm
  - vim_shell
  - midnight_commander
  - goenv
- Many bug fixes and new minor features.
2019-12-09 16:04:22 -08:00
a251bd2fb9 [aws] Add date to aws_ami function output 2019-12-01 18:31:29 +01:00
ef3e9eda18 Merge upstream/master 2019-12-01 17:38:39 +01:00
romkatv
2d6205e714 prompt: update powerlevel10k submodule to the latest commit (#1761)
New feature: Transient Prompt.

Demo:
https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/transient-prompt.gif

Announcement post:
https://www.reddit.com/r/zsh/comments/dsh1g3/new_powerlevel10k_feature_transient_prompt
2019-11-11 09:25:39 -08:00
b9c34d9445 [aws] Improve filtering at aws_ssm_session_any() 2019-11-08 19:44:43 +01:00
romkatv
0af28e758b prompt: update powerlevel10k submodule to the latest commit (#1757)
- 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).
2019-11-07 00:33:37 -08:00
048d5302d6 [modsorin] Change AWS prompt 2019-11-06 19:19:16 +01:00
e9e8c31217 [aws] Merge aws_elb and aws_elb2 aliases and improve information shown 2019-11-06 19:02:45 +01:00
f549bd7a0b [aws/sorinmod] Fix AWS profile prompt 2019-11-06 18:31:43 +01:00
daniel.carrillo
ed511e6747 [aws/sorinmod] Show aws profile in prompt 2019-11-06 17:28:19 +01:00
daniel.carrillo
13f3cabd81 [aws] Add alias for ssh through ssm proxy 2019-11-05 12:05:16 +01:00
daniel.carrillo
b2aead431c [aws] Fix typo at aws_kms_decrypt 2019-11-05 11:40:15 +01:00
daniel.carrillo
21ce6a6f97 Merge branch 'master' of https://github.com/dcarrillo/prezto 2019-11-04 11:06:52 +01:00
daniel.carrillo
585b3646f9 aws: Fix profile issues 2019-11-04 11:05:59 +01:00
aeb58b972d Merge upstream/master 2019-10-24 19:43:06 +02:00
daniel.carrillo
b44893d9eb [aws] Add aws_kms_decrypt and aws_ssm_session functions 2019-10-24 14:57:58 +02:00
lambdanerd
ed6303c340 homebrew: add alias brewL 2019-10-17 13:59:40 -07:00
lambdanerd
6d65cb4176 Remove documentation for obsolete brewC alias 2019-10-17 13:59:40 -07:00
lambdanerd
55eb406515 Remove alias for invalid brew cleanup --force
`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.
2019-10-16 09:13:29 -07:00
Kaleb Elwert
2873885d37 utility: fix safe-ops commands
Fixes #1699
2019-09-21 17:29:21 -07:00
91292526a0 Add sorin prompt changes to sorinmod 2019-09-20 21:22:12 +02:00
a1df63bade Merge upstream/master 2019-09-20 21:16:11 +02:00