1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-16 02:32:11 +02:00
This commit is contained in:
Sven Wischnowsky 2000-08-03 13:35:43 +00:00
parent 5d0ef3096c
commit 55b07cb525
14 changed files with 27 additions and 14 deletions

View file

@ -5,6 +5,18 @@
2000-08-03 Sven Wischnowsky <wischnow@zsh.org> 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 * 12497: Doc/Zsh/builtins.yo: small fix for `read -r' doc
* 12496: Completion/Core/_path_files: one more problem with * 12496: Completion/Core/_path_files: one more problem with

View file

@ -25,7 +25,7 @@
# that will not have been overridden, so you should add '~' to the # that will not have been overridden, so you should add '~' to the
# list of keys at the top of the for-loop. # 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 unsetopt markdirs globsubst shwordsplit nounset ksharrays
local key=$KEYS[-1] expl local key=$KEYS[-1] expl

View file

@ -1,6 +1,6 @@
#compdef -k complete-word \C-x? #compdef -k complete-word \C-x?
setopt localoptions nullglob rcexpandparam extendedglob setopt localoptions nullglob rcexpandparam extendedglob noshglob
unsetopt markdirs globsubst shwordsplit nounset ksharrays unsetopt markdirs globsubst shwordsplit nounset ksharrays
setopt localtraps noerrexit ; trap - ZERR setopt localtraps noerrexit ; trap - ZERR

View file

@ -1,7 +1,7 @@
#compdef -k complete-word \C-xh #compdef -k complete-word \C-xh
_complete_help() { _complete_help() {
setopt localoptions nullglob rcexpandparam extendedglob setopt localoptions nullglob rcexpandparam extendedglob noshglob
unsetopt markdirs globsubst shwordsplit nounset ksharrays unsetopt markdirs globsubst shwordsplit nounset ksharrays
exec </dev/null # ZLE closes stdin, which can cause errors exec </dev/null # ZLE closes stdin, which can cause errors

View file

@ -7,7 +7,7 @@
# If configurations keys with the prefix `correctword_' are # If configurations keys with the prefix `correctword_' are
# given they override those starting with `correct_'. # given they override those starting with `correct_'.
setopt localoptions nullglob rcexpandparam extendedglob setopt localoptions nullglob rcexpandparam extendedglob noshglob
unsetopt markdirs globsubst shwordsplit nounset ksharrays unsetopt markdirs globsubst shwordsplit nounset ksharrays
local curcontext="$curcontext" local curcontext="$curcontext"

View file

@ -2,7 +2,7 @@
# Simple completion front-end implementing expansion. # Simple completion front-end implementing expansion.
setopt localoptions nullglob rcexpandparam extendedglob setopt localoptions nullglob rcexpandparam extendedglob noshglob
unsetopt markdirs globsubst shwordsplit nounset ksharrays unsetopt markdirs globsubst shwordsplit nounset ksharrays
local curcontext="$curcontext" local curcontext="$curcontext"

View file

@ -16,7 +16,7 @@
# range -- range of history words to complete # range -- range of history words to complete
_history_complete_word () { _history_complete_word () {
setopt localoptions nullglob rcexpandparam extendedglob setopt localoptions nullglob rcexpandparam extendedglob noshglob
unsetopt markdirs globsubst shwordsplit nounset ksharrays unsetopt markdirs globsubst shwordsplit nounset ksharrays
local expl direction stop curcontext="$curcontext" local expl direction stop curcontext="$curcontext"

View file

@ -3,7 +3,7 @@
# Main widget. # Main widget.
_next_tags() { _next_tags() {
setopt localoptions nullglob rcexpandparam extendedglob setopt localoptions nullglob rcexpandparam extendedglob noshglob
unsetopt markdirs globsubst shwordsplit nounset ksharrays unsetopt markdirs globsubst shwordsplit nounset ksharrays
local ins ops="$PREFIX$SUFFIX" local ins ops="$PREFIX$SUFFIX"

View file

@ -63,7 +63,7 @@ if [[ "$force" = *s* ]] ||
eval exp\=\( ${${(q)exp}:gs/\\{/\{/:gs/\\}/\}/} \) eval exp\=\( ${${(q)exp}:gs/\\{/\{/:gs/\\}/\}/} \)
eval 'exp=( ${${(e)exp//\\[ eval 'exp=( ${${(e)exp//\\[
]/ }//(#b)([ ]/ }//(#b)([
])/\\$match[1]} )' 2>/dev/null \\])/\\$match[1]} )' 2>/dev/null
else else
exp=( ${exp:s/\\\$/\$} ) exp=( ${exp:s/\\\$/\$} )
fi fi
@ -77,7 +77,7 @@ subd=("$exp[@]")
# Now try globbing. # Now try globbing.
[[ "$force" = *g* ]] || zstyle -T ":completion:${curcontext}:" glob && [[ "$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 # If we don't have any expansions or only one and that is the same
# as the original string, we let other completers run. # as the original string, we let other completers run.

View file

@ -16,7 +16,7 @@
# which makes the output of setopt and unsetopt reflect a different # which makes the output of setopt and unsetopt reflect a different
# state than the global one for which you are completing. # 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 unsetopt markdirs globsubst shwordsplit nounset ksharrays
exec </dev/null # ZLE closes stdin, which can cause errors exec </dev/null # ZLE closes stdin, which can cause errors

View file

@ -421,7 +421,7 @@ for prepath in "$prepaths[@]"; do
# There are more components, so skip over the next components and make a # There are more components, so skip over the next components and make a
# slash be added. # slash be added.
tmp1=( ${tmp1//(#b)([][()|*?^#~<>])/\\${match[1]}} ) tmp1=( ${tmp1//(#b)([][()|*?^#~<>\\])/\\${match[1]}} )
tmp2="${(M)tpre##((.|..|)/)##}" tmp2="${(M)tpre##((.|..|)/)##}"
if [[ -n "$tmp2" ]]; then if [[ -n "$tmp2" ]]; then
skipped="/$tmp2" skipped="/$tmp2"

View file

@ -14,7 +14,7 @@
# to see if auto-dump should re-dump the dump-file. # to see if auto-dump should re-dump the dump-file.
emulate -L zsh emulate -L zsh
setopt extendedglob setopt extendedglob noshglob
typeset _d_file _d_f _d_bks _d_line _d_als _d_files typeset _d_file _d_f _d_bks _d_line _d_als _d_files

View file

@ -1465,9 +1465,9 @@ setpmnameddirs(Param pm, HashTable ht)
#endif #endif
if (!(val = getstrvalue(&v)) || *val != '/' || if (!(val = getstrvalue(&v)) || *val != '/' ||
#ifdef HAVE_PATHCONF #ifdef HAVE_PATHCONF
strlen(val) >= PATH_MAX)
#else
((strlen(val) >= pathmax)) && pathmax != -1) ((strlen(val) >= pathmax)) && pathmax != -1)
#else
strlen(val) >= PATH_MAX)
#endif #endif
zwarn("invalid value: %s", val, 0); zwarn("invalid value: %s", val, 0);
else else

View file

@ -2388,6 +2388,7 @@ tokenize(char *s)
case ')': case ')':
if (isset(SHGLOB)) if (isset(SHGLOB))
break; break;
case '>':
case '^': case '^':
case '#': case '#':
case '~': case '~':