From 0c364cdd5eae97438d7615259d09af5b6d2f4e65 Mon Sep 17 00:00:00 2001 From: Indrajit Raychaudhuri Date: Wed, 26 Apr 2023 19:25:39 -0500 Subject: [PATCH 01/11] prompt: Update async submodule to 1.8.6 --- modules/prompt/external/async | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/prompt/external/async b/modules/prompt/external/async index bbbc92b..a66d76f 160000 --- a/modules/prompt/external/async +++ b/modules/prompt/external/async @@ -1 +1 @@ -Subproject commit bbbc92bd01592513a6b7739a45b7911af18acaef +Subproject commit a66d76f8404bd9e7a26037640e6c892cf5871ff4 From f5dff4fe2237def19d392d5ffa9b719b51b47166 Mon Sep 17 00:00:00 2001 From: Indrajit Raychaudhuri Date: Wed, 26 Apr 2023 19:26:09 -0500 Subject: [PATCH 02/11] prompt: Update pure submodule to 1.21.0 --- modules/prompt/external/pure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/prompt/external/pure b/modules/prompt/external/pure index 5b458ba..2f13dea 160000 --- a/modules/prompt/external/pure +++ b/modules/prompt/external/pure @@ -1 +1 @@ -Subproject commit 5b458ba5b75f49a8071d53c343f1a23631f7bced +Subproject commit 2f13dea466466dde1ba844ba5211e7556f4ae2db From e7f75d20bc11093da934fce7e7a722155e1dc018 Mon Sep 17 00:00:00 2001 From: Indrajit Raychaudhuri Date: Wed, 26 Apr 2023 19:40:59 -0500 Subject: [PATCH 03/11] prompt: Remove 'powerlevel9k' deprecation warning 'powerlevel9k' is unsupported and deprecated for 2 years now. It's time to cleanu the deprecation warning message. --- modules/prompt/init.zsh | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/modules/prompt/init.zsh b/modules/prompt/init.zsh index 3180883..37bff32 100644 --- a/modules/prompt/init.zsh +++ b/modules/prompt/init.zsh @@ -10,18 +10,8 @@ autoload -Uz promptinit && promptinit # Load the prompt theme. zstyle -a ':prezto:module:prompt' theme 'prompt_argv' -if [[ "$TERM" == (dumb|linux|*bsd*) ]] || (( $#prompt_argv < 1 )); then +if [[ $TERM == (dumb|linux|*bsd*) ]] || (( $#prompt_argv < 1 )); then prompt 'off' -elif [[ "$prompt_argv[1]" == 'powerlevel9k' ]] ; then - < Date: Wed, 26 Apr 2023 19:55:33 -0500 Subject: [PATCH 04/11] history: Remove 'HISTFILE' path relocation warning 'HISTFILE' path relocation was done 2 years ago. It's time to cleanup the warning message. --- modules/history/init.zsh | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/modules/history/init.zsh b/modules/history/init.zsh index 3ef52ea..084a7ed 100644 --- a/modules/history/init.zsh +++ b/modules/history/init.zsh @@ -42,28 +42,3 @@ if ! zstyle -t ':prezto:module:history:alias' skip; then # Lists the ten most used commands. alias history-stat="history 0 | awk '{print \$2}' | sort | uniq -c | sort -n -r | head" fi - -if [[ -s "${OLD_HISTFILE::=${HISTFILE:h}/.zhistory}" ]]; then - - # New 'HISTFILE' doesn't exist yet, rename legacy one if available and notify. - if [[ ! -s "$HISTFILE" ]]; then - < Date: Wed, 26 Apr 2023 21:11:09 -0500 Subject: [PATCH 05/11] python: Expand Python command pattern per convention Use `(i)python[0-9.]#` as subscript for commands associative array, following the convention [1] of detection python more exhaustively. [1] https://github.com/zsh-users/zsh/blob/858b8de3d70fe76a3637c281bc2c8e3a6d961a2c/Completion/Unix/Command/_python#L1 --- modules/python/init.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/python/init.zsh b/modules/python/init.zsh index 02eb52d..ce2fc69 100644 --- a/modules/python/init.zsh +++ b/modules/python/init.zsh @@ -50,7 +50,7 @@ fi unset local_pyenv # Return if requirements are not found. -if (( ! $#commands[(i)python[23]#] && ! $+functions[pyenv] && ! $+commands[conda] )); then +if (( ! $+commands[(i)python[0-9.]#] && ! $+functions[pyenv] && ! $+commands[conda] )); then return 1 fi @@ -136,8 +136,8 @@ if (( $+VIRTUALENVWRAPPER_VIRTUALENV || $+commands[virtualenv] )) \ if [[ $pyenv_virtualenvwrapper_plugin_found != "true" ]]; then # Fallback to standard 'virtualenvwrapper' if 'python' is available in '$path'. - if (( ! $+VIRTUALENVWRAPPER_PYTHON )) && (( $#commands[(i)python[23]#] )); then - VIRTUALENVWRAPPER_PYTHON=$commands[(i)python[23]#] + if (( ! $+VIRTUALENVWRAPPER_PYTHON )) && (( $+commands[(i)python[0-9.]#] )); then + VIRTUALENVWRAPPER_PYTHON=$commands[(i)python[0-9.]#] fi virtualenvwrapper_sources=( From f7cb1fee1b5d45df07d141c1f10d9286f98fb8de Mon Sep 17 00:00:00 2001 From: Indrajit Raychaudhuri Date: Thu, 27 Apr 2023 13:21:16 -0500 Subject: [PATCH 06/11] gnu-utility: Remove now obsolete egrep and fgrep These were marked deprecated for a while and has now been marked obsolete since gnu-grep 3.8 [1]. They have been removed from POSIX as well [2]. [1] https://lists.gnu.org/archive/html/info-gnu/2022-09/msg00001.html [2] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html#tag_20_55_18 --- modules/gnu-utility/init.zsh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/gnu-utility/init.zsh b/modules/gnu-utility/init.zsh index a8521f0..2cfbf2f 100644 --- a/modules/gnu-utility/init.zsh +++ b/modules/gnu-utility/init.zsh @@ -44,8 +44,7 @@ _gnu_utility_cmds=( 'libtool' 'libtoolize' # Miscellaneous - 'awk' 'egrep' 'fgrep' 'getopt' 'grep' 'indent' 'make' 'sed' 'tar' 'time' - 'units' 'which' + 'awk' 'getopt' 'grep' 'indent' 'make' 'sed' 'tar' 'time' 'units' 'which' ) # Wrap GNU utilities in functions. From 3c002f772ef4ba8bd247d695b0429e5c9df6f331 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Thu, 4 May 2023 12:08:42 +0200 Subject: [PATCH 07/11] prompt: update powerlevel10k submodule to v1.18.0 Release notes: - https://github.com/romkatv/powerlevel10k/releases/tag/v1.18.0 --- modules/prompt/external/powerlevel10k | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/prompt/external/powerlevel10k b/modules/prompt/external/powerlevel10k index a066b55..0af598c 160000 --- a/modules/prompt/external/powerlevel10k +++ b/modules/prompt/external/powerlevel10k @@ -1 +1 @@ -Subproject commit a066b55f855c8e488d3ea9e26e861bdd5ecd4fe8 +Subproject commit 0af598cbed78660066f8a8f4465844501ba5695b From e14fdff4cbce3fb70dd641d2234465a5dae44561 Mon Sep 17 00:00:00 2001 From: Indrajit Raychaudhuri Date: Thu, 4 May 2023 20:48:55 -0500 Subject: [PATCH 08/11] history: Remove interim zstyle variables --- modules/history/init.zsh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/modules/history/init.zsh b/modules/history/init.zsh index 084a7ed..3912c19 100644 --- a/modules/history/init.zsh +++ b/modules/history/init.zsh @@ -26,13 +26,12 @@ setopt HIST_BEEP # Beep when accessing non-existent history. # Variables # -zstyle -s ':prezto:module:history' histfile '_pmh_histfile' || _pmh_histfile="${HISTFILE:-${ZDOTDIR:-$HOME}/.zsh_history}" -zstyle -s ':prezto:module:history' histsize '_pmh_histsize' || _pmh_histsize=10000 -zstyle -s ':prezto:module:history' savehist '_pmh_savehist' || _pmh_savehist=${_pmh_histsize} -HISTFILE="${_pmh_histfile}" # The path to the history file. -HISTSIZE="${_pmh_histsize}" # The maximum number of events to save in the internal history. -SAVEHIST="${_pmh_savehist}" # The maximum number of events to save in the history file. -unset _pmh_{hist{file,size},savehist} +zstyle -s ':prezto:module:history' histfile 'HISTFILE' \ + || HISTFILE="${HISTFILE:-${ZDOTDIR:-$HOME}/.zsh_history}" # The path to the history file. +zstyle -s ':prezto:module:history' histsize 'HISTSIZE' \ + || HISTSIZE=10000 # The maximum number of events to save in the internal history. +zstyle -s ':prezto:module:history' savehist 'SAVEHIST' \ + || SAVEHIST=$HISTSIZE # The maximum number of events to save in the history file. # # Aliases From 5ca892d6af50bedb1dd930e03bbe6b3511e976d3 Mon Sep 17 00:00:00 2001 From: Indrajit Raychaudhuri Date: Thu, 4 May 2023 22:02:29 -0500 Subject: [PATCH 09/11] history: Reformat inline comments --- modules/history/init.zsh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/history/init.zsh b/modules/history/init.zsh index 3912c19..069dc2f 100644 --- a/modules/history/init.zsh +++ b/modules/history/init.zsh @@ -10,17 +10,17 @@ # Options # -setopt BANG_HIST # Treat the '!' character specially during expansion. -setopt EXTENDED_HISTORY # Write the history file in the ':start:elapsed;command' format. -setopt SHARE_HISTORY # Share history between all sessions. -setopt HIST_EXPIRE_DUPS_FIRST # Expire a duplicate event first when trimming history. -setopt HIST_IGNORE_DUPS # Do not record an event that was just recorded again. -setopt HIST_IGNORE_ALL_DUPS # Delete an old recorded event if a new event is a duplicate. -setopt HIST_FIND_NO_DUPS # Do not display a previously found event. -setopt HIST_IGNORE_SPACE # Do not record an event starting with a space. -setopt HIST_SAVE_NO_DUPS # Do not write a duplicate event to the history file. -setopt HIST_VERIFY # Do not execute immediately upon history expansion. -setopt HIST_BEEP # Beep when accessing non-existent history. +setopt BANG_HIST # Treat the '!' character specially during expansion. +setopt EXTENDED_HISTORY # Write the history file in the ':start:elapsed;command' format. +setopt SHARE_HISTORY # Share history between all sessions. +setopt HIST_EXPIRE_DUPS_FIRST # Expire a duplicate event first when trimming history. +setopt HIST_IGNORE_DUPS # Do not record an event that was just recorded again. +setopt HIST_IGNORE_ALL_DUPS # Delete an old recorded event if a new event is a duplicate. +setopt HIST_FIND_NO_DUPS # Do not display a previously found event. +setopt HIST_IGNORE_SPACE # Do not record an event starting with a space. +setopt HIST_SAVE_NO_DUPS # Do not write a duplicate event to the history file. +setopt HIST_VERIFY # Do not execute immediately upon history expansion. +setopt HIST_BEEP # Beep when accessing non-existent history. # # Variables From 8ee9d1bbfe3b82d73a611fd01d7a3a53b1a97bb6 Mon Sep 17 00:00:00 2001 From: Indrajit Raychaudhuri Date: Thu, 4 May 2023 22:21:48 -0500 Subject: [PATCH 10/11] general: Documentation update for zstyle based alias skipping support Add documentation to surface the `zstyle` based alias skipping. --- modules/directory/README.md | 7 +++++++ modules/emacs/README.md | 7 +++++++ modules/fasd/README.md | 7 +++++++ modules/history/README.md | 7 +++++++ modules/homebrew/README.md | 7 +++++++ modules/macports/README.md | 7 +++++++ modules/node/README.md | 7 +++++++ modules/perl/README.md | 7 +++++++ modules/python/README.md | 7 +++++++ modules/rails/README.md | 7 +++++++ modules/ruby/README.md | 7 +++++++ modules/screen/README.md | 7 +++++++ modules/tmux/README.md | 7 +++++++ 13 files changed, 91 insertions(+) diff --git a/modules/directory/README.md b/modules/directory/README.md index 86953a4..8603d9f 100644 --- a/modules/directory/README.md +++ b/modules/directory/README.md @@ -17,6 +17,13 @@ Sets directory options and defines directory aliases. ## Aliases +Aliases are enabled by default. To disable them, add the following to +_`${ZDOTDIR:-$HOME}/.zpreztorc`_. + +```sh +zstyle ':prezto:module:directory:alias' skip 'yes' +``` + - `d` prints the contents of the directory stack. - `1 ... 9` changes the directory to the **n** previous one. diff --git a/modules/emacs/README.md b/modules/emacs/README.md index f93304a..8cf7bfc 100644 --- a/modules/emacs/README.md +++ b/modules/emacs/README.md @@ -12,6 +12,13 @@ execution of `carton`. ## Aliases +Aliases are enabled by default. To disable them, add the following to +_`${ZDOTDIR:-$HOME}/.zpreztorc`_. + +```sh +zstyle ':prezto:module:emacs:alias' skip 'yes' +``` + ### Carton - `cai` installs dependencies. diff --git a/modules/fasd/README.md b/modules/fasd/README.md index 1958a73..04f9693 100644 --- a/modules/fasd/README.md +++ b/modules/fasd/README.md @@ -19,6 +19,13 @@ instead of the bundled version. ## Aliases +Aliases are enabled by default. To disable them, add the following to +_`${ZDOTDIR:-$HOME}/.zpreztorc`_. + +```sh +zstyle ':prezto:module:fasd:alias' skip 'yes' +``` + - `j` changes the current working directory interactively. ## Completion diff --git a/modules/history/README.md b/modules/history/README.md index 11c6d94..51e6e8c 100644 --- a/modules/history/README.md +++ b/modules/history/README.md @@ -36,6 +36,13 @@ Alternately, you can set `HISTFILE` manually to _`${ZDOTDIR:-$HOME}/.zhistory`_. ## Aliases +Aliases are enabled by default. To disable them, add the following to +_`${ZDOTDIR:-$HOME}/.zpreztorc`_. + +```sh +zstyle ':prezto:module:history:alias' skip 'yes' +``` + - `history-stat` lists the ten most used commands ## Settings diff --git a/modules/homebrew/README.md b/modules/homebrew/README.md index 1875e08..77d8f37 100644 --- a/modules/homebrew/README.md +++ b/modules/homebrew/README.md @@ -12,6 +12,13 @@ brew shellenv ## Aliases +Aliases are enabled by default. To disable them, add the following to +_`${ZDOTDIR:-$HOME}/.zpreztorc`_. + +```sh +zstyle ':prezto:module:homebrew:alias' skip 'yes' +``` + ### Homebrew Core - `brewc` cleans outdated brews and their cached archives. diff --git a/modules/macports/README.md b/modules/macports/README.md index ba6143b..15963b3 100644 --- a/modules/macports/README.md +++ b/modules/macports/README.md @@ -4,6 +4,13 @@ Defines MacPorts aliases and adds MacPorts directories to path variables. ## Aliases +Aliases are enabled by default. To disable them, add the following to +_`${ZDOTDIR:-$HOME}/.zpreztorc`_. + +```sh +zstyle ':prezto:module:macports:alias' skip 'yes' +``` + - `portc` cleans the files used to build ports. - `porti` installs a port. - `ports` searches for a port. diff --git a/modules/node/README.md b/modules/node/README.md index 6ec0b75..bc26215 100644 --- a/modules/node/README.md +++ b/modules/node/README.md @@ -29,6 +29,13 @@ _`$XDG_CONFIG_HOME/nvm`_, _`~/.nvm`_, or is installed with homebrew. ## Aliases +Aliases are enabled by default. To disable them, add the following to +_`${ZDOTDIR:-$HOME}/.zpreztorc`_. + +```sh +zstyle ':prezto:module:node:alias' skip 'yes' +``` + ### npm - `npmi` install a package. diff --git a/modules/perl/README.md b/modules/perl/README.md index 772d068..dd59449 100644 --- a/modules/perl/README.md +++ b/modules/perl/README.md @@ -40,6 +40,13 @@ The subcommands of _plenv_ is similar with _rbenv_. ## Aliases +Aliases are enabled by default. To disable them, add the following to +_`${ZDOTDIR:-$HOME}/.zpreztorc`_. + +```sh +zstyle ':prezto:module:perl:alias' skip 'yes' +``` + ### General - `pl` is short for `perl`. diff --git a/modules/python/README.md b/modules/python/README.md index 1695fa0..2e3b2ee 100644 --- a/modules/python/README.md +++ b/modules/python/README.md @@ -124,6 +124,13 @@ zstyle ':prezto:module:python:virtualenv' initialize 'no' ## Aliases +Aliases are enabled by default. To disable them, add the following to +_`${ZDOTDIR:-$HOME}/.zpreztorc`_. + +```sh +zstyle ':prezto:module:python:alias' skip 'yes' +``` + - `py` is short for `python`. - `py2` is short for `python2`. - `py3` is short for `python3`. diff --git a/modules/rails/README.md b/modules/rails/README.md index 129627a..5e230e0 100644 --- a/modules/rails/README.md +++ b/modules/rails/README.md @@ -4,6 +4,13 @@ Defines [Ruby on Rails][1] aliases. ## Aliases +Aliases are enabled by default. To disable them, add the following to +_`${ZDOTDIR:-$HOME}/.zpreztorc`_. + +```sh +zstyle ':prezto:module:rails:alias' skip 'yes' +``` + - `ror` is short for `rails`. - `rorc` starts the Rails console. - `rordc` starts the Rails console connected to the database. diff --git a/modules/ruby/README.md b/modules/ruby/README.md index 97a09f0..fa3d106 100644 --- a/modules/ruby/README.md +++ b/modules/ruby/README.md @@ -54,6 +54,13 @@ dependencies, with [Bundler][5]. ## Aliases +Aliases are enabled by default. To disable them, add the following to +_`${ZDOTDIR:-$HOME}/.zpreztorc`_. + +```sh +zstyle ':prezto:module:ruby:alias' skip 'yes' +``` + ### General - `rb` is short for `ruby`. diff --git a/modules/screen/README.md b/modules/screen/README.md index a1775f7..b554951 100644 --- a/modules/screen/README.md +++ b/modules/screen/README.md @@ -24,6 +24,13 @@ zstyle ':prezto:module:screen:auto-start' remote 'yes' ## Aliases +Aliases are enabled by default. To disable them, add the following to +_`${ZDOTDIR:-$HOME}/.zpreztorc`_. + +```sh +zstyle ':prezto:module:screen:alias' skip 'yes' +``` + - `scr` is short for `screen`. - `scrl` lists sessions/socket directory. - `scrn` starts a new session. diff --git a/modules/tmux/README.md b/modules/tmux/README.md index e7ae929..f6d375b 100644 --- a/modules/tmux/README.md +++ b/modules/tmux/README.md @@ -53,6 +53,13 @@ Read [iTerm2 and tmux Integration][7] for more information. ## Aliases +Aliases are enabled by default. To disable them, add the following to +_`${ZDOTDIR:-$HOME}/.zpreztorc`_. + +```sh +zstyle ':prezto:module:tmux:alias' skip 'yes' +``` + - `tmuxa` attaches or switches to a tmux session. - `tmuxl` lists sessions managed by the tmux server. From 8d00c51900dfce3b2bc1e5bd99bd58f238c5668a Mon Sep 17 00:00:00 2001 From: Indrajit Raychaudhuri Date: Thu, 4 May 2023 21:36:08 -0500 Subject: [PATCH 11/11] python: Remove pip completion from prezto local pip completion is bundled with Zsh 5.9. Remove it from prezto local to avoid shadowing the bundled completion. --- modules/python/functions/_pip | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 modules/python/functions/_pip diff --git a/modules/python/functions/_pip b/modules/python/functions/_pip deleted file mode 100644 index 4e0ffb8..0000000 --- a/modules/python/functions/_pip +++ /dev/null @@ -1,19 +0,0 @@ -#compdef -P pip[0-9.]# -#autoload - -# -# Pip completion, delegating to pip to do all the completion work. -# -# Authors: -# Indrajit Raychaudhuri -# - -if (( $+commands[$words[1]] )); then - - function _pip_completion { - compadd -- $( COMP_WORDS="$words[*]" COMP_CWORD=$(( CURRENT - 1 )) \ - PIP_AUTO_COMPLETE=1 $words[1] 2>/dev/null ) - } - _pip_completion "$@" - -fi