| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In particular, these two sequences were still broken after 54294:
% v() { vim "$@"; }; v
[suspend vim]
% urxvt &
[3] 12707
% bg %-
bg: job already in background
% fg
[1] continued
[exit vim]
% fg
before:
fg: no current job
after:
[3] + running urxvt
% sleep 100
^Z
zsh: suspended sleep 100
% bg
[1] continued sleep 100
% fg
before
fg: no current job
after:
[1] - running sleep 100
The changed test expected the sole remaining job to be %- which should
not be possible, and now it is properly %+ instead.
|
| | |
|
| |
|
|
| |
This lets us remove these mysterious braces too.
|
| |
|
|
|
|
|
| |
Apparently on OSX (and BSD kernels?) the pty device won't wait for every
last process closing its reference, but on Linux it does. We can just
set up the sleep commands to close their fds since they aren't using
them anyway.
|
| |
|
|
| |
Combinations of options can remain invalid, though.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
This one is complicated by the fact it's using fprintf. If the user
passed a nonprintable char as an option, we shouldn't print that, which
nicechar handles for us.
Fixes 54077.
|
| |
|
|
|
|
|
|
| |
otherwise we print this:
parse error in ${...\M-D...} substitution
In practice, I'm not sure how to hit this path, I uncommented the
condition to test it.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A lot of places check option strings char by char, then send that char
to zwarn/zerr, instead of reading out the full multibyte character.
Doing so is quite easy with unmeta_one in most cases, so just go ahead
and do that. The print functions in fact expect a wchar_t for %c anyway.
Also renames "unknown option" to "bad option" because that's what every
other place calls it (also one place was missing the colon, added that).
To reproduce the math errors, since it's slightly less obvious (you need
a multibyte character that is also an invalid parameter name, otherwise
it actually works fine)
% zsh -c '(( ¯ ))'
zsh:1: bad math expression: illegal character: ^
% zsh -c 'zmodload zsh/mathfunc; (( sin(1¯) ))'
zsh:1: bad math expression: illegal character: ^
% zsh -c 'の=5; echo $(( の ))' # unchanged because it is working
5
Also adds some tests because B12 was looking very empty, not sure if
this is the correct way to handle the intersection of possibly not
compiled module with possibly not available UTF-8 locale, but X02 and
some others do a similar thing with ZSH_TEST_LANG, though in those cases
that's handled specially by comptest, not the test itself.
|
| | |
|
| |
|
|
|
|
|
| |
fixes this issue:
% kill -l 6term
kill: unknown signal: SIGterm
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
% autoload +X nonexist
zsh:999: nonexist: function definition file not found
% nonexist
exec.c:6086: function definition nonexist has zero reference count
All the paths that set shf->funcdef in loadautofn call freeeprog on
the old one first anyway, so rather than make a new mkautofn if
loadautofn fails, just keep the old one.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
% bindkey T foo
% zle -N foo
% foo() { emulate -L ksh; () { zle -M ${.sh.edchar} } }
% zmodload zsh/ksh93
% [press T twice]
\M-(\M-^Ak\M-<\M-G^?
or alternatively, emulate ksh in the main shell and just define this,
but then you have to make sure you're in a zsh -f shell so random things
aren't entering functions in the background.
% foo() { zle -M ${.sh.edchar} }
the code tries to restore sh_edchar = sh_unsetval; in the else branch,
but this doesn't ever run in the above scenario because we never enter
or leave a function with ksh emulation enabled (or indeed at all).
|
| |
|
|
|
| |
After 54475 changed deleteparamdef to use getnode2 instead, this
workaround isn't needed anymore.
|
| |
|
|
|
|
| |
acquired a weird type
Reported in 43032.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reported in 48901.
Also has a secondary effect of correcting the string sent to the
command_not_found_handler. If you don't have such a handler, then the
errors are correct before the patch as well.
command_not_found_handler() { echo -E >&2 command not found: $1 }
Before:
% ARGV0=foobar blurg
zsh:1> ARGV0=foobar foobar
command not found: foobar
% - blurg
+zsh:1> -blurg
command not found: -blurg
% ARGV0=foobar - blurg
+zsh:1> ARGV0=foobar foobar
command not found: foobar
After:
% ARGV0=foobar blurg
+zsh:1> ARGV0=foobar blurg
command not found: blurg
% - blurg
+zsh:1> - blurg
command not found: blurg
% ARGV0=foobar - blurg
+zsh:1> ARGV0=foobar - blurg
command not found: blurg
|
| |
|
|
| |
Fixes 49409.
|
| |
|
|
| |
Reported in 50991 and introduced in 22525.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the original report we had [[ é = *$'\xa9' ]] which has op == P_STAR,
in this case charstart is filled out inline, in the other cases it's
done by the patrepeat function. If ptlen > P_LS_LEN(next) we have
returned, if it is < then we have backtracked into the region where
charstart is valid and we can check that, and finally if they are equal
we know we are on a valid character boundary (but charstart might not be
valid here, in fact multiple tests fail if you leave out the ptlen
check).
Separately,
% [[ éé = é#$'\xa9' ]]; echo $?
pattern.c:4113: closure following more than one character
0
% [[ éé = (é)#$'\xa9' ]]; echo $?
1
so just treat multibyte single characters as "not simple", which fixes
that case too.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
% mkdir 'a b c'; touch 'a b c'/{'a b c','d e f'}
% ls a\ b\ c/{<tab>
corrupts the command line into
% ls a\ b\ {c/
and the effect is worse the more backslashes there are. It seems like
this code should simply always use bp->qpos so there is no reason to
keep hasunqu around either.
For the compctl path, the curpos members need to be whatever they're
determined to be at the start by addwhat for the comparison with ppl and
psl, so just fix them at the end before add_match_data.
The quotename in get_comp_string fixes subsequent completions, eg
% ls a\ b\ c/{a\ b\ c,<tab>
|
| |
|
|
|
|
|
|
|
|
| |
If you do this,
wide() { zle -M ${(l:$COLUMNS::a:)} }; zle -N wide; bindkey W wide
then we would move the cursor up one row too many after printing the
message.
The hunks with 1 + are triggered by this (one is MULTIBYTE the other not),
wide() { zle -M ${(l:$COLUMNS::a:)}$'\n'b }; zle -N wide; bindkey W wide
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Typing one of these characters in isearch caused the terminal cursor to
jump to the wrong row, and various other problems, because we totally
lost track of things.
Make use of addmultiword() to draw the combining characters, analogously
to how the main input line does it. This resolves ccs/vcs getting out of
sync with the display, because there are no top level glyphs of zero
width anymore.
The code seems to simply have forgotten about nonprintable wide
characters that weren't ascii control characters, so handle those like
in the main line redraw code.
I didn't bother handling the ZSH_INVALID_WCHAR range because I don't see
how you could possibly insert one of those in the isearch buffer. If you
manage to do this, congratulations.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The documentation says
${name::=word}
In the first form, if name is unset then set it to word; in
the second form, if name is unset or null then set it to word;
and in the third form, unconditionally set name to word. In
all forms, the value of the parameter is then substituted.
Particularly that "the value of the parameter is substituted", not "the
word is substituted".
This is what happens before the fix, and similarly for array flags like "unique":
% typeset -E3 fl; hi=5; echo ${fl::=hi}
hi
% echo $fl
5.00e+00
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- fix error name to (1) handle no_function_argzero and (2) not print a redundant
caller name when executed as a script
- fix checks for function case that are wrong on the first call after marking
for auto-load
- add tests for the above
- test usage-error return status
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Tweaked to account for workers/54328
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Also corrects exit status of "wait %%" (TBD from workers/43945)
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
I'm not sure how I messed this up in 54558, but now it should be
actually correct. I even tested it:
% [[ foo = (#m)(#b)f(o)o ]]
% zmodload -F zsh/ksh93 p:.sh.match
% () { setopt localoptions ksharrays; typeset -p .sh.match }
typeset -g -ar .sh.match=( foo o )
|
| | |
|