Age | Commit message (Collapse) | Author |
|
the original diff had a couple of errors, which i've fixed
|
|
Triggered by a smaller diff from jan@.
OK jmc@ jan@
|
|
Drop the vestiges of the pre-POSIX support of `test -t' defaulting to fd
1. It doesn't work and it always succeed since "-t" is treated as a
string by default when no argument (fd) is specified.
diff by Lucas (lucas [at] sexy [dot] is) with minor change by me.
ok millert@
|
|
space (specifically in the "alias", "readonly" and "typeset"
commands);
from josiah frentsos
|
|
OK millert
|
|
jmc@ dislikes a comma before "then" in a conditional, so leave those
untouched.
ok jmc@
|
|
Add a prominent deprecation notice to getopt.1.
Add examples of the getopts idiom to sh.1 and ksh.1.
Requested by and ok espie@, ok jmc@
|
|
so escape it;
|
|
From gotroyb127, OK tb@
|
|
|
|
and installing USD/SMM/PSD docs.
jmc@ agrees with the direction, ok millert@ on an earlier diff
|
|
This is similar to the emacs mode clear-screen command. Unlike
bash, but like zsh, ^L also works in input mode, not just command
mode. OK kn@ tb@
|
|
With the pipefail option set, the exit status of a pipeline is 0 if all
commands succeed, or the return status of the rightmost command that
fails. This can help stronger error checking, but is not a silver
bullet. For example, commands will exhibit a non-zero exit status if
they're killed by a SIGPIPE when writing to a pipe. Yet pipefail was
considered useful enough to be included in the next POSIX standard.
This implementation remembers the value of the pipefail option when
a pipeline is started, as described as option 1) in
https://www.austingroupbugs.net/view.php?id=789#c4102
Requested by ajacoutot@, ok millert@
|
|
from chohag
|
|
|
|
Reference the First Edition (1989) of Bolsky/Korn which is about ksh88,
the shell the OpenBSD ksh(1) descends from (via pdksh).
The Second Edition (1995) of the book is about ksh93 which we don't provide.
Pointed out by Andras Farkas on bugs@.
|
|
|
|
Previously they were only recognized in [[ ... ]] expressions. This
changes sh/ksh to be consistent with test(1) as well as shells like
bash and dash. OK jca@ jmc@
|
|
Slightly more useful for some, same defaults as bash.
No objection deraadt@ phessler@, ok tb@ kn@ benno@
|
|
in "for name in [word ...]; do list; done" can be empty.
In sh(1), clarify what happens in that case.
In ksh(1), clarify how it can happen that the list is never executed.
OK jmc@ tb@
|
|
key by default. The shell will query the terminfo database to
find the escape sequence to clear the screen. OK deraadt@
|
|
jump around.
suggested and ok jmc@, ok jcm@
|
|
a buildin command, that just calls into c_whence().
This makes type look like the buildin in other shells and makes
things like system("'type' 'git'"); work.
With lots of suggestions and feedback from anton@, kn@ and jca@.
ok kn@ jca@
|
|
mode, to avoid potential confusion pointed out by andreas dot kahari
at icm dot uu dot se on misc@.
Patch minimally tweaked based on a comment from jmc@.
OK anton@ jca@ jmc@ on the previous version without the tweak.
|
|
Discussed with and ok jmc
|
|
- Keep the order of bindings in sync between the manual and implementation
- Fix wrongly documented bindings in the manual
- Break out commands without a default binding in the manual
ok jmc@ tb@
|
|
ignoredups: don't save the current line if it is identical to the last
history line.
ignorespace: don't save the current line if it starts with a space
ok anton@ millert@
|
|
Unused since 2012, to be removed after 6.2. Input from anton@,
ok anton@ millert@
|
|
default prompt by not including a space after the character;
diff from scott cheloha
|
|
Requested by akoshibe and phessler
ok phessler@ anton@ jca@
|
|
|
|
and is not an easy fix for now.
|
|
borrowed from ksh93.
Survived a ports build performed by naddy@ and encouraged by many.
|
|
mode, not "stuff". While here, remove the poorly described "stuff"
and "stuff" bind functions as well..
In the unlikely event anyone has those in .kshrc, they'll need to
be removed.
ok anton@
|
|
and simplify the next sentence; triggered by a different patch
from Anton dot Lindqvist at gmail dot com.
OK millert@ tb@
|
|
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).
|
|
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.
|
|
|
|
|
|
OK natano@, jmc@
(I forgot to commit it back in mid-August when it was discussed.)
|
|
"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
|
|
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@
|
|
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@
|
|
|
|
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@
|
|
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
|
|
years.
From Michael Reed. ok halex@
|
|
|