1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-11-12 21:11:13 +00:00
Commit Graph

1935 Commits

Author SHA1 Message Date
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
be61026920 general: Apply submodules' path change in doc and zprezto-update
We need to accommodate cases where a submodule local path (or remote)
URL can change. Accordingly, update instruction and `zprezto-update`
function to synchronizes submodules' remote URL configuration setting
to the updated value automatically.
2021-05-05 14:13:01 -05:00
bXV0ZQ
95d223aa8a prompt: Fix git submodule path for 'pure' with actual path
WARNING: This will require synchronizing submodules' remote URL
configuration setting to the value specified in `.gitmodules` by doing:
`git submodule sync --recursive` in your Prezto location.

Signed-off-by: Indrajit Raychaudhuri <irc@indrajit.com>
2021-05-05 14:13:01 -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
Indrajit Raychaudhuri
8a967fc108
base: Check for 'run-help' in aliases hash before evicting
Add guard to check for presence of 'run-help' in `aliases` hash before evicting.
In some systems (like Debian) '/etc/zshrc' might have already done it.
2021-05-01 03:05: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
Indrajit Raychaudhuri
095f44796b base: Allow loading more specific 'run-help' function
Allow loading more specific 'run-help' function from $fpath. This
allows automatically looking up specific sub-command helper if
available instead of the static default ('man').

See: ccc9cff9e2/Functions/Misc/run-help (L3-L8)
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
Kenichi Kamiya
a7f223d959 Enable history-substring-search as a default module
Resolves #1868
2021-04-17 20:24:13 -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
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
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
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
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
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
kwgchi
cb8b9ca746
README: fix small grammatical error (#1857) 2020-07-20 16:08:54 -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