summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-08-03 13:35:43 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-08-03 13:35:43 +0000
commit55b07cb525388bca7c0dbaf057483c493ff0b053 (patch)
treeb6aa0008b62c8b5b123bab75991f521baf54025e
parent5d0ef3096cae59e1c3a5906fc9bb153e0a7fdfb3 (diff)
downloadzsh-55b07cb525388bca7c0dbaf057483c493ff0b053.tar.gz
zsh-55b07cb525388bca7c0dbaf057483c493ff0b053.zip
quoting
-rw-r--r--ChangeLog12
-rw-r--r--Completion/Commands/_bash_completions2
-rw-r--r--Completion/Commands/_complete_debug2
-rw-r--r--Completion/Commands/_complete_help2
-rw-r--r--Completion/Commands/_correct_word2
-rw-r--r--Completion/Commands/_expand_word2
-rw-r--r--Completion/Commands/_history_complete_word2
-rw-r--r--Completion/Commands/_next_tags2
-rw-r--r--Completion/Core/_expand4
-rw-r--r--Completion/Core/_main_complete2
-rw-r--r--Completion/Core/_path_files2
-rw-r--r--Completion/Core/compdump2
-rw-r--r--Src/Modules/parameter.c4
-rw-r--r--Src/glob.c1
14 files changed, 27 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 94c5681b4..8d2f8c573 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,18 @@
2000-08-03 Sven Wischnowsky <wischnow@zsh.org>
+ * 12503: Completion/Commands/_bash_completions,
+ Completion/Commands/_complete_debug,
+ Completion/Commands/_complete_help,
+ Completion/Commands/_correct_word,
+ Completion/Commands/_expand_word,
+ Completion/Commands/_history_complete_word,
+ Completion/Commands/_next_tags, Completion/Core/_expand,
+ Completion/Core/_main_complete, Completion/Core/_path_files,
+ Completion/Core/compdump, Src/glob.c, Src/Modules/parameter.c:
+ try to get quoting of special character (`>' and `\') right; fix
+ for pathmax in parameter.c
+
* 12497: Doc/Zsh/builtins.yo: small fix for `read -r' doc
* 12496: Completion/Core/_path_files: one more problem with
diff --git a/Completion/Commands/_bash_completions b/Completion/Commands/_bash_completions
index fd2222797..3c19358b7 100644
--- a/Completion/Commands/_bash_completions
+++ b/Completion/Commands/_bash_completions
@@ -25,7 +25,7 @@
# that will not have been overridden, so you should add '~' to the
# list of keys at the top of the for-loop.
-setopt localoptions nullglob rcexpandparam extendedglob
+setopt localoptions nullglob rcexpandparam extendedglob noshglob
unsetopt markdirs globsubst shwordsplit nounset ksharrays
local key=$KEYS[-1] expl
diff --git a/Completion/Commands/_complete_debug b/Completion/Commands/_complete_debug
index 4f0ce7f27..3269eed4b 100644
--- a/Completion/Commands/_complete_debug
+++ b/Completion/Commands/_complete_debug
@@ -1,6 +1,6 @@
#compdef -k complete-word \C-x?
-setopt localoptions nullglob rcexpandparam extendedglob
+setopt localoptions nullglob rcexpandparam extendedglob noshglob
unsetopt markdirs globsubst shwordsplit nounset ksharrays
setopt localtraps noerrexit ; trap - ZERR
diff --git a/Completion/Commands/_complete_help b/Completion/Commands/_complete_help
index 36c41607b..9144ff991 100644
--- a/Completion/Commands/_complete_help
+++ b/Completion/Commands/_complete_help
@@ -1,7 +1,7 @@
#compdef -k complete-word \C-xh
_complete_help() {
- setopt localoptions nullglob rcexpandparam extendedglob
+ setopt localoptions nullglob rcexpandparam extendedglob noshglob
unsetopt markdirs globsubst shwordsplit nounset ksharrays
exec </dev/null # ZLE closes stdin, which can cause errors
diff --git a/Completion/Commands/_correct_word b/Completion/Commands/_correct_word
index 2d8d3065a..9df2166c5 100644
--- a/Completion/Commands/_correct_word
+++ b/Completion/Commands/_correct_word
@@ -7,7 +7,7 @@
# If configurations keys with the prefix `correctword_' are
# given they override those starting with `correct_'.
-setopt localoptions nullglob rcexpandparam extendedglob
+setopt localoptions nullglob rcexpandparam extendedglob noshglob
unsetopt markdirs globsubst shwordsplit nounset ksharrays
local curcontext="$curcontext"
diff --git a/Completion/Commands/_expand_word b/Completion/Commands/_expand_word
index c105e0322..fddd065ee 100644
--- a/Completion/Commands/_expand_word
+++ b/Completion/Commands/_expand_word
@@ -2,7 +2,7 @@
# Simple completion front-end implementing expansion.
-setopt localoptions nullglob rcexpandparam extendedglob
+setopt localoptions nullglob rcexpandparam extendedglob noshglob
unsetopt markdirs globsubst shwordsplit nounset ksharrays
local curcontext="$curcontext"
diff --git a/Completion/Commands/_history_complete_word b/Completion/Commands/_history_complete_word
index 01cd32fce..db387daa7 100644
--- a/Completion/Commands/_history_complete_word
+++ b/Completion/Commands/_history_complete_word
@@ -16,7 +16,7 @@
# range -- range of history words to complete
_history_complete_word () {
- setopt localoptions nullglob rcexpandparam extendedglob
+ setopt localoptions nullglob rcexpandparam extendedglob noshglob
unsetopt markdirs globsubst shwordsplit nounset ksharrays
local expl direction stop curcontext="$curcontext"
diff --git a/Completion/Commands/_next_tags b/Completion/Commands/_next_tags
index ffed800d0..22d833eea 100644
--- a/Completion/Commands/_next_tags
+++ b/Completion/Commands/_next_tags
@@ -3,7 +3,7 @@
# Main widget.
_next_tags() {
- setopt localoptions nullglob rcexpandparam extendedglob
+ setopt localoptions nullglob rcexpandparam extendedglob noshglob
unsetopt markdirs globsubst shwordsplit nounset ksharrays
local ins ops="$PREFIX$SUFFIX"
diff --git a/Completion/Core/_expand b/Completion/Core/_expand
index 09d89a30b..bcc357ead 100644
--- a/Completion/Core/_expand
+++ b/Completion/Core/_expand
@@ -63,7 +63,7 @@ if [[ "$force" = *s* ]] ||
eval exp\=\( ${${(q)exp}:gs/\\{/\{/:gs/\\}/\}/} \)
eval 'exp=( ${${(e)exp//\\[
]/ }//(#b)([
-])/\\$match[1]} )' 2>/dev/null
+\\])/\\$match[1]} )' 2>/dev/null
else
exp=( ${exp:s/\\\$/\$} )
fi
@@ -77,7 +77,7 @@ subd=("$exp[@]")
# Now try globbing.
[[ "$force" = *g* ]] || zstyle -T ":completion:${curcontext}:" glob &&
- eval 'exp=( ${~exp} )' 2>/dev/null
+ eval 'exp=( ${~exp} ); exp=( ${exp//(#b)([][()|*?^#~<>\\])/\\${match[1]}} )' 2>/dev/null
# If we don't have any expansions or only one and that is the same
# as the original string, we let other completers run.
diff --git a/Completion/Core/_main_complete b/Completion/Core/_main_complete
index 7f0e94358..8c856f4be 100644
--- a/Completion/Core/_main_complete
+++ b/Completion/Core/_main_complete
@@ -16,7 +16,7 @@
# which makes the output of setopt and unsetopt reflect a different
# state than the global one for which you are completing.
-setopt localoptions nullglob rcexpandparam extendedglob
+setopt localoptions nullglob rcexpandparam extendedglob noshglob
unsetopt markdirs globsubst shwordsplit nounset ksharrays
exec </dev/null # ZLE closes stdin, which can cause errors
diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files
index 26d2be6f3..8bb00bdf9 100644
--- a/Completion/Core/_path_files
+++ b/Completion/Core/_path_files
@@ -421,7 +421,7 @@ for prepath in "$prepaths[@]"; do
# There are more components, so skip over the next components and make a
# slash be added.
- tmp1=( ${tmp1//(#b)([][()|*?^#~<>])/\\${match[1]}} )
+ tmp1=( ${tmp1//(#b)([][()|*?^#~<>\\])/\\${match[1]}} )
tmp2="${(M)tpre##((.|..|)/)##}"
if [[ -n "$tmp2" ]]; then
skipped="/$tmp2"
diff --git a/Completion/Core/compdump b/Completion/Core/compdump
index ba65d1501..25df17fbf 100644
--- a/Completion/Core/compdump
+++ b/Completion/Core/compdump
@@ -14,7 +14,7 @@
# to see if auto-dump should re-dump the dump-file.
emulate -L zsh
-setopt extendedglob
+setopt extendedglob noshglob
typeset _d_file _d_f _d_bks _d_line _d_als _d_files
diff --git a/Src/Modules/parameter.c b/Src/Modules/parameter.c
index 7267025a9..2328eae51 100644
--- a/Src/Modules/parameter.c
+++ b/Src/Modules/parameter.c
@@ -1465,9 +1465,9 @@ setpmnameddirs(Param pm, HashTable ht)
#endif
if (!(val = getstrvalue(&v)) || *val != '/' ||
#ifdef HAVE_PATHCONF
- strlen(val) >= PATH_MAX)
-#else
((strlen(val) >= pathmax)) && pathmax != -1)
+#else
+ strlen(val) >= PATH_MAX)
#endif
zwarn("invalid value: %s", val, 0);
else
diff --git a/Src/glob.c b/Src/glob.c
index fb15a4efc..dbe1d2d58 100644
--- a/Src/glob.c
+++ b/Src/glob.c
@@ -2388,6 +2388,7 @@ tokenize(char *s)
case ')':
if (isset(SHGLOB))
break;
+ case '>':
case '^':
case '#':
case '~':