summaryrefslogtreecommitdiff
path: root/bin/ksh
AgeCommit message (Collapse)Author
2016-06-01put this in the public domain as well. reminded by theo. we discussedMarc Espie
this before previous release, and I plain forgot about it.
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-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-30for some time now mandoc has not required MLINKS to functionJason McIntyre
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
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-20Currently we have about a 50/50 split over fcntl(n, F_GETFL [,0])Kenneth R Westerback
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@
2016-03-17remove some ARGSUSEDmmcc
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-05POSIX-compliant behavior of "set -u" regarding "$*" and "$@" specialsDmitrij Czarkoff
All work done by Martijn Dekker OK millert@
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
2016-03-04don't parse (...|...) patterns in variable substitution inside double quotesDmitrij Czarkoff
fixes posix compatibility issue OK millert@, nicm@, otto@
2016-01-29Therefor -> Therefore (where appropriate)tb
from ray@, ok jmc@
2016-01-26remove a useless macrommcc
ok nicm@
2016-01-15Initialize a struct kill_info and an associated int in the declarationsmmcc
instead of scattering their initialization through the body. This makes the body simpler and avoids an uninitialized use false positive. ok nicm@
2016-01-08Next step in UTF-8 support:Ingo Schwarze
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@
2015-12-30add another combo for home/end keys that works in tmux.Ted Unangst
ok bmercer gsoares nicm sthen
2015-12-30rename global "e" to genv to avoid accidental shadowing and aliasing.Ted Unangst
ok millert nicm tb
2015-12-29Remove reference to $ERRNO, which was been unimplemented for >= 19mmcc
years. From Michael Reed. ok halex@
2015-12-27Tweak comment: we now always make a copy of argv.Jeremie Courreges-Anglas
ok halex@
2015-12-27unconditionally duplicate the argv array on initialization, to make itAlexander Hall
resilient against being altered by a subsequent shift operation tweak and ok semarie@
2015-12-26remove special characters; diff from michael reedJason McIntyre
2015-12-22Assign pointer variables to NULL rather than 0. No functional change.mmcc
2015-12-21Replace an ugly bit of pointer arithmetic with a conditional expression.mmcc
"seems sound" deraadt@
2015-12-14Move system headers from sh.h to those files that actually need them.tb
ok mmcc@ a while ago
2015-12-14Remove a superfluous macro. No binary change. ok tb@mmcc
2015-12-10In emacs command-line editing mode, make sure that moving left andIngo Schwarze
right can only move by whole characters, not into the middle of a character, and that deleting characters can only delete characters whole, not individual bytes out of characters. Based on parts of a patch by Frederic Nowak <fnwk at mailbox dot org>, tweaked by me. OK tedu@ semarie@ mpi@
2015-12-06Remove a 250-line catalog of AT&T ksh bugs. ok tedummcc
2015-12-05Remove some more pdksh-specific stuff and references to files that nommcc
longer exist.
2015-12-05Remove descriptions of files that no longer exist.mmcc
2015-12-05Remove needless reference to LEGAL, which is likely outdated itself.mmcc
2015-12-05Remove some bug report guidelines from pdksh that aren't relevant to us.mmcc
2015-12-02comment typommcc
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-20remove unused prototypetb
ok mmcc@
2015-11-18Only unget match[] if it has been used, ok sthenNicholas Marriott
2015-11-12use symbolics for flags to openTheo de Raadt
from Ricardo Mestre
2015-11-12Use isdigit() instead of ksh's homebrewed alternative.mmcc
ok nicm@. Also discussed with millert@ and guenther@.
2015-11-11exit() after perror() for pledge failure. Perhaps this got introducedTheo de Raadt
as a test idiom, either when pledge was young or during the transition to strings.... dunno
2015-11-09add missing NAME entries; ok schwarzeJason McIntyre
2015-11-08Tweak a reallocarray call to be more overflow-resistant. From Theo Buehler.mmcc
ok nicm@
2015-11-07Make it clearer that warningf()'s first argument determines whether themmcc
lineno is printed. ok nicm@
2015-11-05Capitalize entire macro name.mmcc
ok nicm@
2015-11-05Clean up an Xstring macro. Submitted by Theo Buehler.mmcc
ok and suggestions from nicm@