Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
cb11d139
Commit
cb11d139
authored
Dec 15, 2015
by
Marc Cornellà
Browse files
Merge pull request #4697 from psprint/master
znt: more optimizing workarounds for 5.0.6 <= zsh < 5.2
parents
5de1704a
d30a501b
Changes
2
Show whitespace changes
Inline
Side-by-side
plugins/zsh-navigation-tools/README.md
View file @
cb11d139
...
@@ -105,7 +105,7 @@ colorize output of the tools, via their config files (check out e.g. n-cd.conf,
...
@@ -105,7 +105,7 @@ colorize output of the tools, via their config files (check out e.g. n-cd.conf,
it uses this).
it uses this).
## Performance
## Performance
ZNT are fastest with Zsh before 5.0.
8
and starting from 5.2
ZNT are fastest with Zsh before 5.0.
6
and starting from 5.2
vim:filetype=conf
vim:filetype=conf
plugins/zsh-navigation-tools/n-list
View file @
cb11d139
...
@@ -243,7 +243,9 @@ while (( 1 )); do
...
@@ -243,7 +243,9 @@ while (( 1 )); do
# Take all elements, including duplicates and non-selectables
# Take all elements, including duplicates and non-selectables
typeset
+U list
typeset
+U list
repeat 1
;
do
list
=(
"
$@
"
)
list
=(
"
$@
"
)
done
# Remove non-selectable elements
# Remove non-selectable elements
[
"
$#NLIST_NONSELECTABLE_ELEMENTS
"
-gt
0
]
&&
for
i
in
"
${
(nO)NLIST_NONSELECTABLE_ELEMENTS[@]
}
"
;
do
[
"
$#NLIST_NONSELECTABLE_ELEMENTS
"
-gt
0
]
&&
for
i
in
"
${
(nO)NLIST_NONSELECTABLE_ELEMENTS[@]
}
"
;
do
...
@@ -309,7 +311,9 @@ while (( 1 )); do
...
@@ -309,7 +311,9 @@ while (( 1 )); do
# Take all elements, including duplicates and non-selectables
# Take all elements, including duplicates and non-selectables
typeset
+U list
typeset
+U list
repeat 1
;
do
list
=(
"
$@
"
)
list
=(
"
$@
"
)
done
# Remove non-selectable elements only when in uniq mode
# Remove non-selectable elements only when in uniq mode
[
"
$NLIST_IS_UNIQ_MODE
"
-eq
1
]
&&
[
"
$#NLIST_NONSELECTABLE_ELEMENTS
"
-gt
0
]
&&
[
"
$NLIST_IS_UNIQ_MODE
"
-eq
1
]
&&
[
"
$#NLIST_NONSELECTABLE_ELEMENTS
"
-gt
0
]
&&
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment