summaryrefslogtreecommitdiff
path: root/bin
AgeCommit message (Collapse)Author
2017-03-11switch pax to using pledge tape instead of ioctl.Theo Buehler
ok kettenis
2017-02-23SHA-1 collisions have now been found so update some man pages. As noted byDaniel Dickman
minek van on misc@. Thanks. ok tb@, tj@ (and jmc@ is ok with the diff but can't ok the technical content).
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@
2017-02-19More whitespace, helps readingJeremie Courreges-Anglas
ok ajacoutot@
2017-02-17In chmod's symbolic mode without -h and -R flags, a missing FTS_COMFOLLOWTheo Buehler
flag to fts_open led to the following behavior: the symlink's permissions were read, changed according to the command line, and transferred to the target file. chflags had a similar problem while chmod was unaffected. Regression introduced in r1.33. Reported by Christopher Wellons, thanks! ok guenther
2017-01-24do not need sys/proc.hTheo de Raadt
2017-01-23Slow down the churn and continue using old pledge name "ioctl" insteadTheo de Raadt
of "tape" for a week or so.
2017-01-23Call isatty() before tcgetattr() in the lex. This is a little redundant,Theo de Raadt
but avoids doing pledge "tty" operations against flat files. The shell's tty will be kind of special in the near future. isatty is also a lot less kernel code to run through the loop.
2017-01-23Split pledge "ioctl" into "tape" and "bpf", and allow SIOCGIFGROUP onlyTheo de Raadt
upon "inet". Adjust the 4 programs that care about this.
2017-01-21Add an explicit syntax() call to indicate that no binary op wasKenneth R Westerback
found. Makes gcc happier. Add __dead to function prototype as we go by. ok guenther@
2017-01-21Nuke whitespace foolish enough to expose itself during the greatKenneth R Westerback
"warning:" rectification.
2017-01-03Allow the omission of one address in (.,.) and (.;.) address rangesTheo Buehler
as per POSIX. With this patch, ",n" is an abbreviation for "1,n", ";n" abbreviates ".;n". The "n," and "n;" variants mean "n,n" and "n;n", respectively. Patch from Jerome FRGAGIC; ok stefan, deraadt
2016-12-26Put some variable declarations under appropriate #if/#endif protectionKenneth R Westerback
so gcc doesn't complain about defining but not using them. typo correction & ok jca@
2016-12-20Fix a bug where archives smaller than 512 bytes would trigger a next volumeMark Kettenis
prompt. From NetBSD. ok millert@, deraadt@
2016-12-16Move declaration of an 'i' inside the scope of its use. Which inKenneth R Westerback
turn is inside an #ifdef. Thus making the code clearer by eliminating an #ifdef in the middle of the declarations. Suggested by millert@
2016-12-16Eliminate some gcc warnings about 'unused variables', mostly byKenneth R Westerback
adding appropriate #ifdef's around declarations. ok millert@ (with a tweak I will commit separately)
2016-12-11I missed a bit of the indentation fix from Kartik Agaram.Todd C. Miller
2016-12-11When ERREXIT (set -e) is in effect, don't disable it after aTodd C. Miller
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.
2016-12-11In execute() we assign xerrorok to a dummy value if it is NULLTodd C. Miller
so there is no need to check xerrorok for NULL after that. From Kartik Agaram.
2016-12-11Fix for() loop indentation for TCASE in execute() and add someTodd C. Miller
braces for improved readability. Based on a diff from Kartik Agaram.
2016-11-26Remove leftovers of line disciplines that are no more.Martin Pieuchot
ok mikeb@
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-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-11-12Fix lexicographic order of shell built-ins: trap comes before true.Theo Buehler
2016-10-26Document LC_CTYPE.Ingo Schwarze
The lack of this entry was reported by Jan Stary <hans at stare dot cz>. OK czarkoff@ jmc@
2016-10-24Unify wording for LC_CTYPE in ENVIRONMENT:Ingo Schwarze
* Consistently use "character encoding locale" as suggested by stsp@. * Resolve various gratuitious wording variations. OK jmc@.
2016-10-19Make the description of COLUMNS a bit more readable.Ingo Schwarze
Triggered by a different patch from Michal Mazurek. Joint work by tb@, jmc@, and tedu@, but no one ever committed it.
2016-10-19Delete useless setlocale(3) in src/bin/.Ingo Schwarze
Minor cleanup while here: return from main, static void __dead usage, etc. Based on a patch from Jan Stary <hans at stare dot cz>. Feedback and OK tb@, OK millert@.
2016-10-17simplify implementation of the '$' command, no functional change;Ingo Schwarze
OK nicm@ tb@ czarkoff@
2016-10-17resolve code duplication in domove() for the commands: b B w WIngo Schwarze
no functional change; suggested by tb@
2016-10-17No need to inspect LC_CTYPE:Ingo Schwarze
* 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@.
2016-10-17Make sure the cursor goes to the first byte of a UTF-8 characterIngo Schwarze
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@
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-14delete useless setlocale(3);Ingo Schwarze
noticed by Jan Stary <hans at stare dot cz>; return from main while here; feedback and OK tb@, OK martijn@
2016-10-11Partial UTF-8 line editing support for ksh(1) vi input mode;Ingo Schwarze
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@.
2016-10-11Remove now-unused pathnames.h, from Jan StaryTodd C. Miller
2016-10-11Reimplement g flag for s commands. Got lost in previous commit.Martijn van Duren
Found because of a hint by and OK schwarze@.
2016-10-10don't need to worry about pre/post order and skipping directories.Ted Unangst
remove more dead code
2016-10-10zap extra includesTed Unangst
2016-10-10remove some more dead code. (previous diff from Jan Stary)Ted Unangst
2016-10-10remove some dead code that's only used in rmTed Unangst
2016-10-10Remove infinite loop detection from the s-command.Martijn van Duren
If a zero-length match is found do the replacement and increment the start point for the next search by one. This allows for commands like s/^/- / This brings the behaviour closer to the way sed and vi work. OK schwarze@
2016-10-07suppose we should fix csh while we're at it.Ted Unangst
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-23Attempt to use stdout, stderr, or stdin terminal widths if they exist.Anthony J. Bentley
This behavior already existed but was unintentionally lost in revision 1.70 of ps.c. ok millert@ tb@
2016-09-23remove the note about the list command (l) displaying a --More--Jason McIntyre
prompt for huge lines (according to otto this happens only when BACKWARDS is not defined); ok otto
2016-09-20sync the description of -q with that of cksum.1;Jason McIntyre
from bytevolcano ok millert