summaryrefslogtreecommitdiff
path: root/bin/ksh/ksh.1
AgeCommit message (Collapse)Author
2019-11-26some corrections to CDPATH;Jason McIntyre
from chohag
2019-06-24Fix spellingJeremie Courreges-Anglas
2019-06-24Partial revert of rev. 1.151:Ingo Schwarze
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@.
2019-06-21zap trailing whitespace;Jason McIntyre
2019-06-19Allow string greater/less than than operators to work with test aka [.Todd C. Miller
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@
2019-04-03Bind ^L (C-l) to clear-screen instead of redrawJeremie Courreges-Anglas
Slightly more useful for some, same defaults as bash. No objection deraadt@ phessler@, ok tb@ kn@ benno@
2018-12-16Tweak the syntax displays to show that the list of wordsIngo Schwarze
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@
2018-06-18Add clear-screen emacs editing command, currently not bound to aTodd C. Miller
key by default. The shell will query the terminfo database to find the escape sequence to clear the screen. OK deraadt@
2018-05-30point readers to the correct place instead of having themSebastian Benoit
jump around. suggested and ok jmc@, ok jcm@
2018-05-18remove the alias type='whence -v' and replace it withSebastian Benoit
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@
2018-02-06Clarify that the "bind" built-in command only affects Emacs editingIngo Schwarze
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.
2017-12-12Document change in the default shell prompts.Theo Buehler
Discussed with and ok jmc
2017-11-22Fix some incorrectness related to Emacs editing mode in ksh:anton
- 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@
2017-08-30Implement HISTCONTROL ignoredups & ignorespace featuresJeremie Courreges-Anglas
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@
2017-08-30Stop exposing the emacs-usemeta option, and warn when trying to set it.Jeremie Courreges-Anglas
Unused since 2012, to be removed after 6.2. Input from anton@, ok anton@ millert@
2017-08-19\$ in PS1 gets you the default prompt character, which differs from theJason McIntyre
default prompt by not including a space after the character; diff from scott cheloha
2017-08-11Retire old behavior of requiring root prompt to contain # or \!Philip Guenther
Requested by akoshibe and phessler ok phessler@ anton@ jca@
2017-07-06fix broken cross references; found with mandoc -TlintIngo Schwarze
2017-07-04Backout previous due to a bug discovered by zhuk@ that requires some tinkeringanton
and is not an easy fix for now.
2017-07-04Add support for pattern substitution to variables in ksh using a common syntaxanton
borrowed from ksh93. Survived a ports build performed by naddy@ and encouraged by many.
2017-06-20'^T' is documented to be bounded to transpose-chars while in emacsBryan Steele
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@
2017-02-19Assigning to RANDOM calls srand_deterministic(3), not srand(3),Ingo Schwarze
and simplify the next sentence; triggered by a different patch from Anton dot Lindqvist at gmail dot com. OK millert@ tb@
2016-11-14Markup improvements:Ingo Schwarze
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).
2016-10-15remove the "in the future" notes from the past;Jason McIntyre
from ray lai
2016-10-14Correct description of the "bind" builtin command.Ingo Schwarze
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.
2016-10-07note that ulimit -m is not enforced, spotted by jmcTed Unangst
2016-09-30remove unneccessary .Pp; from jan staryJason McIntyre
2016-09-27Move bug description to the BUGS sectionDmitrij Czarkoff
OK natano@, jmc@ (I forgot to commit it back in mid-August when it was discussed.)
2016-09-04Allow simple custom completions by creating an array namedNicholas Marriott
"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
2016-04-27Do not handle echo "`echo \"hi\"`" in POSIX mode differently than inChristian Weisgerber
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@
2016-03-21More ksh POSIX compliance fixes by Martijn Dekker:tb
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@
2016-03-06tweak previous a little;Jason McIntyre
2016-03-06Make set +o conform with POSIX.natano
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@
2016-03-04Fix a typo. The command is to get the default system PATH valueTodd C. Miller
is "getconf PATH" not "getconf CS_PATH".
2016-03-04remove CSRG BSD-licensed mknod builtin code which was previously used toTheo de Raadt
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
2015-12-29Remove reference to $ERRNO, which was been unimplemented for >= 19mmcc
years. From Michael Reed. ok halex@
2015-12-26remove special characters; diff from michael reedJason McIntyre
2015-11-24Revert previous tweak, pending a more complete rewording. Discussed withmmcc
halex@, sthen@, jmc@.
2015-11-22This man page uses "Note that" profusely, which is generally consideredmmcc
bad writing style. Also, add a paragraph break and split up a megasentence.
2015-11-22Don't use pdksh for self-reference and remove needless historicalmmcc
context.
2015-11-22Remove commented-out BUGS section that directs reports to long-extinctmmcc
upstream.
2015-11-21"one" -> "one or more"mmcc
2015-11-09add missing NAME entries; ok schwarzeJason McIntyre
2015-10-30zap trailing whitespace;Jason McIntyre
2015-10-30Try to clarify the fc section a tad; fc apprently stands for "fix command".Todd C. Miller
Also the "fc -e -" syntax is obsoleted by "fc -s". OK tedu@
2015-10-30'fc -e -' is deprecated in favor of 'fc -s', so update the built-in aliasPhilip Guenther
ok millert@
2015-10-17add missing underscore; from theo buehlerJason McIntyre
2015-09-14Avoid .Ns right after .Pf, it's pointless.Ingo Schwarze
In some cases, do additional cleanup in the immediate vicinity.
2015-07-04Use "alternation" consistentlyfeinerer
ok jmc@
2015-03-25Bind the Delete key (ESC[3~) to delete-char-forwardJeremie Courreges-Anglas
ok mpi@