mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-04-28 17:23:31 +02:00
chore(z): update to 519e5796 (#13716)
Co-authored-by: ohmyzsh[bot] <54982679+ohmyzsh[bot]@users.noreply.github.com> Co-authored-by: Mahesh Subramanian <maheshpec123@gmail.com>
This commit is contained in:
@@ -46,7 +46,7 @@ dependencies:
|
||||
plugins/z:
|
||||
branch: master
|
||||
repo: agkozak/zsh-z
|
||||
version: ae10ba3f4674c24ac353fd34deb2fd9f7b061055
|
||||
version: 519e5796df3db6c68317c7a3901444fab3241bbc
|
||||
precopy: |
|
||||
set -e
|
||||
test -e README.md && mv -f README.md MANUAL.md
|
||||
|
||||
@@ -33,6 +33,9 @@ Zsh-z is a drop-in replacement for `rupa/z` and will, by default, use the same d
|
||||
<details>
|
||||
<summary>Here are the latest features and updates.</summary>
|
||||
|
||||
- April 27, 2026
|
||||
+ Fixes a bug where re-sourcing the script caused an infinite loop when Tab was pressed. Props to @maheshpec for [successfully diagnosing the problem](https://github.com/ohmyzsh/ohmyzsh/pull/13715).
|
||||
+ Fixes a bug where the completion widget was not identifying flags correctly.
|
||||
- March 31, 2026
|
||||
+ When the user hits Tab after entering a command-line argument that uses spaces as wildcards (e.g., `z us lo bi`), the command line is clear of detritus (i.e., it looks like `z /usr/local/bin` instead of `z us lo /usr/local/bin`).
|
||||
+ Improved test for Docker containers.
|
||||
|
||||
+17
-7
@@ -960,8 +960,13 @@ add-zsh-hook chpwd _zshz_chpwd
|
||||
|
||||
(( ${fpath[(ie)${0:A:h}]} <= ${#fpath} )) || fpath=( "${0:A:h}" "${fpath[@]}" )
|
||||
|
||||
# Save the existing Tab binding
|
||||
ZSHZ[TAB_BINDING]="${$(bindkey -M main '^I')##* }"
|
||||
|
||||
# Save the existing Tab binding so that the completion widget can invoke it,
|
||||
# but being careful not to create a situation where the widget ends up calling
|
||||
# itself and causing infinite recursion if this script is re-sourced.
|
||||
if (( ! ${+widgets[_zshz_zle_completion_widget]} )); then
|
||||
ZSHZ[TAB_BINDING]="${$(bindkey -M main '^I')##* }"
|
||||
fi
|
||||
|
||||
############################################################
|
||||
# ZLE widget to fix spaces-as-wildcards completion
|
||||
@@ -976,7 +981,9 @@ ZSHZ[TAB_BINDING]="${$(bindkey -M main '^I')##* }"
|
||||
# ZSHZ_CMD
|
||||
############################################################
|
||||
_zshz_zle_completion_widget() {
|
||||
emulate -L zsh
|
||||
|
||||
setopt LOCAL_OPTIONS EXTENDED_GLOB NO_KSH_ARRAYS NO_SH_WORD_SPLIT
|
||||
|
||||
local cmd=${ZSHZ_CMD:-${_Z_CMD:-z}}
|
||||
|
||||
# If a trailing space was added after an already-completed absolute path
|
||||
@@ -994,7 +1001,7 @@ _zshz_zle_completion_widget() {
|
||||
|
||||
parts=( ${(z)after} )
|
||||
for p in $parts; do
|
||||
if (( ! past_flags )) && [[ $p == -[cehlrRtx]## ]]; then
|
||||
if (( ! past_flags )) && [[ $p == (-[cehlrRtx]##|--add|--complete|--help) ]]; then
|
||||
flag_parts+=( $p )
|
||||
else
|
||||
past_flags=1
|
||||
@@ -1012,9 +1019,12 @@ _zshz_zle_completion_widget() {
|
||||
zle ${ZSHZ[TAB_BINDING]:-expand-or-complete}
|
||||
}
|
||||
|
||||
zle -N _zshz_zle_completion_widget
|
||||
|
||||
bindkey -M main '^I' _zshz_zle_completion_widget
|
||||
# Register the widget and bind to Tab, but only if this script has not already
|
||||
# been sourced -- avoid infinite recursion.
|
||||
if (( ! ${+widgets[_zshz_zle_completion_widget]} )); then
|
||||
zle -N _zshz_zle_completion_widget
|
||||
bindkey -M main '^I' _zshz_zle_completion_widget
|
||||
fi
|
||||
|
||||
############################################################
|
||||
# zsh-z functions
|
||||
|
||||
Reference in New Issue
Block a user