Age | Commit message (Collapse) | Author |
|
and simplify the next sentence; triggered by a different patch
from Anton dot Lindqvist at gmail dot com.
OK millert@ tb@
|
|
|
|
short-circuited `&&` or `||` chain in later iterations of `for`
loops. It should be disabled after a short-circuited `&&` or `||`
chain only in the *final* iteration of loops (as well as in
conditionals, which was already working). From Kartik Agaram.
|
|
so there is no need to check xerrorok for NULL after that.
From Kartik Agaram.
|
|
braces for improved readability. Based on a diff from Kartik Agaram.
|
|
distance from 'Ar command'.
This is schwarze's correct version of an initial incorrect diff from me.
|
|
1. Mark up reserved words intended to appear at the beginning of command
lines with .Ic.
2. Mark up syntax elements intended to appear in the middle of command
lines with .Cm.
This is not only more systematic, but also makes internal search
commands like :tif<enter>, :tstop<enter>, and :t[[<enter> work in
man(1).
|
|
|
|
OK nicm@ tb@ czarkoff@
|
|
no functional change; suggested by tb@
|
|
* It was only used in vi input mode.
* No functional change in case of set -o vi-show8.
* No functional change if LC_CTYPE is set to UTF-8.
* More robust for the default of LC_CTYPE=C on a UTF-8 xterm.
Behaviour changes for the combination LC_CTYPE=C with set +o vi-show8
on non-UTF-8 terminals, but that combination is useless and dangerous
with or without this patch. If you want to edit individual raw non-ASCII
non-UTF-8 bytes on the shell command line, always use set -o vi-show8.
(Besides, i doubt that you actually want to do that; better use a real
hex editor in the first place.)
OK czarkoff@.
|
|
and not to a continuation byte for these commands: b B e E w W |
Let {e,E}ndword return the position after the word because that is
easier to handle in the caller.
OK tb@ czarkoff@
|
|
from ray lai
|
|
jmc@ finds the key binding stuff "disgusting" (i can't argue with that)
and doesn't want to comment on the content, but agrees with the wording.
|
|
so far, it covers these commands: a h i l x /
This is an isu8cont()-based hack similar in style to what i did
in emacs input mode, but less elegant and slightly more intrusive
because the vi mode code is much more ugly and less straightforward
than the emacs mode code. This one required partial rewrites of
a few helper functions, and comments were added while there.
This is not perfect, but hopefully reduces people's cursing
until a more rigorous solution can be devised (much) later.
Some polishing may be useful in tree, in particular adding
utf8cont() support to a few missing commands.
Mostly written shortly after Christmas 2015.
Reminded by and OK czarkoff@.
Feedback, partial review and testing, no longer any objection by martijn@.
Feedback and testing by tb@.
Also read fine to nicm@.
|
|
|
|
|
|
OK natano@, jmc@
(I forgot to commit it back in mid-August when it was discussed.)
|
|
|
|
magic number.
|
|
|
|
alphanumeric, spotted by and ok sthen
|
|
ok nicm@
|
|
"complete_commandname_argnum", for example:
set -A complete_kill_1 -- -9 -HUP -INFO -KILL -TERM
To set completions for the first argument to kill(1). If no complete_*
arrays are present, the normal filename completion is offered.
positive comments from many; man page ok/tweaks jmc; ok tedu
|
|
OK deraadt@
|
|
other edge cases found by gsoares@. OK tb@ gsoares@
|
|
when ksh is compiled with -Os (done in distrib/special): move the
bit using XPptrv(l) (which expands to l.beg) where it is actually
used and clearly initialized.
ok tedu, tweak + ok millert
|
|
|
|
make commands starting with the escape key (^[) work as documented.
Long-standing bug, this time reported by Dave minus Cohen dot com.
OK natano@ halex@
|
|
that i misunderstood something when i wrote it;
found by guenther and naddy
|
|
with help from otto
|
|
this before previous release, and I plain forgot about it.
|
|
from Andras Farkas <deepbluemistake at gmail dot com>.
|
|
|
|
traditional mode. This aligns ksh's behavior with bash and FreeBSD sh.
The interpretation of the POSIX text is disputed, but it is unlikely
that a change from the traditional behavior was intended.
ok millert@
|
|
correctly - logically complete that now by removing MLINKS from base;
authors need only to ensure there is an entry in NAME for any function/
util being added. MLINKS will still work, and remain for perl to ease
upgrades;
ok nicm (curses) bcook (ssl)
ok schwarze, who provided a lot of feedback and assistance
ok tb natano jung
|
|
This simple patch makes the 'command' builtin POSIX-compliant and
consistent with other current shells. It fixes two things:
a) 'command -v' does not find shell reserved words (a.k.a. keywords).
For instance, 'command -v select' outputs nothing but should output
'select'.
b) 'command -pv' always outputs the path of an external command, even
if 'command -p' would execute a builtin. For instance, 'command -p kill'
executes the 'kill' builtin, as expected, but 'command -pv kill' outputs
'/bin/kill'. The '-v' option is supposed to reflect what would actually
be executed, so 'command -pv kill' should output 'kill'. The -p option
sets the PATH to a default system value before doing the search, but
that has no bearing on the fact that builtins take precedence over
external commands.
The patch fixes both issues for 'command' without affecting the
behaviour of the ksh-specific builtin 'whence', which is handled by the
same C function.
Regression test added to obsd-regress.t.
Issues found and fixed by Martijn Dekker, ok millert@
|
|
idioms.
Adopt the more concise fcntl(n, F_GETFL) over fcntl(n, F_GETFL, 0)
where it is obvious further investigation will not yield and
even better way.
Obviousness evaluation and ok guenther@
|
|
|
|
|
|
It should be possible to use set +o to save the current shell options,
then modify them at will and later restore them to the saved value.
Therefore the output must not only contain the options which are
currently set, but also the ones that are _not_ set, so a restore
disables them if they are enabled.
from Martijn Dekker (martijn (at) inlv (dot) org)
ok sthen@, tb@
|
|
All work done by Martijn Dekker
OK millert@
|
|
is "getconf PATH" not "getconf CS_PATH".
|
|
accelerate install/upgrade time MAKEDEV runs. That allows ramdisk ksh
to be pledged, without needing "dpath". We'll solve the performance issues
a different way (soon).
ok otto espie natano tb tobiasu rpe
|
|
fixes posix compatibility issue
OK millert@, nicm@, otto@
|
|
from ray@, ok jmc@
|
|
ok nicm@
|
|
instead of scattering their initialization through the body. This makes
the body simpler and avoids an uninitialized use false positive.
ok nicm@
|
|
1. Improve all functions involving words by allowing non-ASCII
characters to be part of words.
2. Allow insertion of non-ASCII characters without screwing up the
display, by backing up to the start byte after inserting a continuation
byte, and starting to re-print there.
3. Fix forward movement which i didn't get quite right in my previous
commit: Always advance to a start byte, never to a final continuation
byte, or the next insertion would split the character in the middle.
OK mpi@
|
|
ok bmercer gsoares nicm sthen
|