summaryrefslogtreecommitdiff
path: root/bin/ksh/sh.1
AgeCommit message (Collapse)Author
2022-08-31use the posix phrasing to improve the description of "shift";Jason McIntyre
nudge from luka krmpotic
2022-03-31man pages: add missing commas between subordinate and main clausesChristian Weisgerber
jmc@ dislikes a comma before "then" in a conditional, so leave those untouched. ok jmc@
2021-05-04shell scripts should use getopts instead of getoptChristian Weisgerber
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@
2019-05-22mention that using vi command line editing mode requires enabling it;Ingo Schwarze
omission reported by Rudolf Sykora <rsykora at disroot dot org> on misc@; tweak and OK jmc@
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-11-30in getopts, when a option is followed by a colon the parameter is mandatorysolene
ok guenther@ deraadt@
2018-09-28Contrary to the sh manual, it is possible to modify the PWD variableTodd C. Miller
(and this is allowed by POSIX). OK deraadt@ kn@
2018-03-31Fix spacing in brace command list grammar.anton
Initial diff by me, later improved by schwarze@; also ok jmc@
2018-03-16improve markup quality in the cases found by the new "--" style messageIngo Schwarze
2017-12-30backslash also escapes newlines when quoted;Jason McIntyre
from kshe
2017-12-15oops - previous should have been a list item;Jason McIntyre
2017-12-12Document change in the default shell prompts.Theo Buehler
Discussed with and ok jmc
2017-06-01The fact is simple: Subshells have the same PPID as the current shell.Theo Buehler
What is not so simple is squinting hard enough to conclude that POSIX actually says that. I'm still not sure how to do that. Problem with the shell manual pointed out by "Choose a display name". ok otto, halex, jmc
2017-05-26document behaviour when CDPATH unset;Jason McIntyre
requested by a mail on misc, via otto; ok otto
2017-03-16document the "type" built-in, marked as xsi by posix;Jason McIntyre
2017-03-16document the ulimit built-in, which is now marked xsi by posix;Jason McIntyre
noted by scott cheloha
2017-03-16document the "hash" built-in, moved to (posix) base in issue 7;Jason McIntyre
2016-11-14Remove an escaped blank space and insert an No macro to keep \&; at aTheo Buehler
distance from 'Ar command'. This is schwarze's correct version of an initial incorrect diff from me.
2016-11-12Fix lexicographic order of shell built-ins: trap comes before true.Theo Buehler
2016-08-12rework initial text a little, to read better;Jason McIntyre
2016-07-28remove note about command substitution and double quotes: it is probableJason McIntyre
that i misunderstood something when i wrote it; found by guenther and naddy
2016-07-18rework the first sentence of this page;Jason McIntyre
with help from otto
2016-05-04Correct the description of the != operator in arithmetic expansion;Ingo Schwarze
from Andras Farkas <deepbluemistake at gmail dot com>.
2016-05-04line editing correction; from andras farkasJason McIntyre
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@
2015-10-12indent the builtin text a little, for naddy;Jason McIntyre
2015-09-14Avoid .Ns right after .Pf, it's pointless.Ingo Schwarze
In some cases, do additional cleanup in the immediate vicinity.
2015-05-04lightly document the posix option and POSIXLY_CORRECT; will sketch outJason McIntyre
in more detail once i get my head round them...
2015-04-30reapply the rules of english to the option keywords: i was persuaded to undo itJason McIntyre
because the option names are case sensitive, but it just looks awful. so expect just a little more from the reader...
2015-03-31both rpe and zhuk pointed out some problems with my if/elf template.Jason McIntyre
zhuk suggested using "condition" rather than command, and this commit reworks the loop/conditional section to do that; ok zhuk rpe
2015-03-30on zhuk's advice, don;t talk about null: posix uses null and emptyJason McIntyre
interchangeably, but we've stuck with empty; while here, sneak in an otherwsie -> otherwise
2015-03-27clarity fix from zhuk;Jason McIntyre
2015-03-26a little wording tweak;Jason McIntyre
2015-03-26various fixes from rpe;Jason McIntyre
2015-03-26from zhuk: in the for loop, show "in word ..." as optional;Jason McIntyre
2015-03-26from zhuk: sequential and asynchronous lists may take only one item;Jason McIntyre
2015-03-26rework the section on when different types of command are processed;Jason McIntyre
zhuk pointed out the flaws in my original text, and has found many more since;
2015-03-19Fix IFS description. May be polished further when all consequences ofVadim Zhukov
following "null is the same as empty" from POSIX are investigated. okay jmc@
2015-03-19Make it clear that it's the line who shouldn't be empty, and not theVadim Zhukov
command history. This version comes from jmc@ together with his okay.
2015-03-18remove ambiguity from the COMMANDS section, after discussion with zhuk;Jason McIntyre
2015-03-18from zhuk: a little more info on <>Jason McIntyre
2015-03-18improve the description of here documents; prompted by zhukJason McIntyre
2015-03-18rework the redirection text after some feedback from zhuk;Jason McIntyre
2015-03-17revert a previous word change - the original seems more accurate;Jason McIntyre
2015-03-17Escape certain characters for slightly more correct (and prettier) output.Anthony J. Bentley
ok jmc@
2015-03-17from zhuk: provide some SxJason McIntyre
2015-03-17from zhuk: shell does not wait for command to complete if job run in backgroundJason McIntyre
2015-03-16from zhuk: be clear that "#" is a variableJason McIntyre
2015-03-15from zhuk: two grammar fixes;Jason McIntyre
2015-03-15from zhuk: clarify "set --";Jason McIntyre