summaryrefslogtreecommitdiffstats
path: root/bin
Commit message (Collapse)AuthorAgeFilesLines
* Give .Dd a tummy rub, forgotten on my last commit.dougb2005-09-301-1/+1
|
* Handle the case where the -P flag is specified for a read-only filedougb2005-09-292-4/+9
| | | | | | | | | | | | | | earlier, and more gracefully. Previously, this combination would be ignored early in the code where permissions are tested and fail later with a very unhelpful "permission denied" error. Instead, test for this flag in the same block that generates the "override?" messages for read-only files, but instead of trying to guess what the user has in mind, generate an error and exit. Update the man page to reflect this new behavior. Not objected to by: freebsd-hackers@
* Bump up BUFSIZE from 4k to 8k. This was requested by portmgr@ to allowmp2005-09-221-0/+1
| | | | | | ports builds in the cluster to work correctly. Tested by: kris
* Add a "-q" quiet flag to kenv so that warnings can be suppressed.rwatson2005-09-132-9/+20
| | | | MFC after: 1 week
* Elaborate on the behaviour of set -e.stefanf2005-09-101-2/+7
|
* Pass the EV_TESTED flag to evalloop() and evalfor(). This fixes unwantedstefanf2005-09-101-8/+8
| | | | | | | | | | | | | | termination with set -e if a command fails in a loop body inside a function with an explicitely tested exit status, eg f() { for i in 1 2 3; do false done } f || true Briefly reviewed by: cracauer
* Pass the EV_TESTED flag to the left operand of NSEMI nodes. This fixesstefanf2005-09-101-1/+1
| | | | | | | | | | | | | | | | | | | | two cases of unwanted termination with set -e: * if-commands containing several commands separated by semicolons, eg if false; false; then [...] * functions with an explicitely tested exit status that contain a failing command which is not the last one, eg f() { false false } f || true PR: 77067, 85267 Briefly reviewed by: cracauer
* Exit the shell if a pipeline that is not preceded by ! fails and set -e isstefanf2005-09-101-3/+7
| | | | | | | active. Use a separate flag to avoid adding another condition to the if-statement at the end of evaltree(). Briefly reviewed by: cracauer
* Split the export synopsis into two lines as -p cannot be mixed with variablestefanf2005-09-091-2/+3
| | | | names.
* - Provide a reasonable error message for `export -p var'.stefanf2005-09-091-1/+3
| | | | - Use argv rather than argptr since getopt() is used here.
* Fix the error message if the mask that is passed to umask -S containsstefanf2005-09-091-1/+1
| | | | non-digits.
* Mention that uuidgen(1) generates DCE version 1 UUIDs onlyrse2005-09-071-2/+3
|
* fix typos: decribed -> described, preceeded -> precededrse2005-09-061-3/+3
|
* Various small code cleanups resulting from a code reviewingrse2005-09-063-12/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and linting procedure: 1. Remove useless sub-expression: - if (*start || (!ifsspc && start > string && (nulonly || 1))) { + if (*start || (!ifsspc && start > string)) { The sub-expression "(nulonly || 1)" always evaluates to true and according to CVS logs seems to be just a left-over from some debugging and introduced by accident. Removing the sub-expression doesn't change semantics and a code inspection showed that the variable "nulonly" is also not necessary here in any way (and the expression would require fixing instead of removing). 2. Remove dead code: - if (backslash && c == '\\') { - if (read(STDIN_FILENO, &c, 1) != 1) { - status = 1; - break; - } - STPUTC(c, p); - } else if (ap[1] != NULL && strchr(ifs, c) != NULL) { + if (ap[1] != NULL && strchr(ifs, c) != NULL) { Inspection of the control and data flow showed that variable "backslash" is always false (0) when the "if"-expression is evaluated, hence the whole block is effectively dead code. Additionally, the skipping of characters after a backslash is already performed correctly a few lines above, so this code is also not needed at all. According to the CVS logs and the ASH 0.2 sources, this code existed in this way already since its early days. 3. Cleanup Style: - ! trap[signo][0] == '\0' && + ! (trap[signo][0] == '\0') && The expression wants to ensure the trap is not assigned the empty string. But the "!" operator has higher precedence than "==", so the comparison should be put into parenthesis to form the intended way of expression. Nevertheless the code was effectively not really broken as both particular NUL comparisons are semantically equal, of course. But the parenthesized version is a lot more intuitive. 4. Remove shadowing variable declaration: - char *q; The declaration of symbol "q" hides another identical declaration of "q" in the same context. As the other "q" is already reused multiple times and also can be reused again without negative side-effects, just remove the shadowing declaration. 5. Just small cosmetics: - if (ifsset() != 0) + if (ifsset()) The ifsset() macro is already coded by returning the boolean result of a comparison operator, so no need to compare this boolean result again against a numerical value. This also aligns the macros usage to the remaining existing code. Reviewed by: stefanf@
* fix typo: ommitted -> omittedrse2005-09-061-1/+1
|
* Print pointers with %p rather than casting them to long.stefanf2005-09-052-5/+5
|
* Attempt to complete the userspace integration of POSIX.1e extended ACLs.csjp2005-09-054-2/+104
| | | | | | | | | | | | | | This includes adding support for ACLs into cp(1) and mv(1) userspace utilities. For mv(1), if _PC_ACL_EXTENDED is in effect for the source AND destination operands, the destination file's ACLs shall reflect the source. For cp(1), if _PC_ACL_EXTENDED is in effect for both source and destination operands, and -p has been specified, the ACLs from the source shall be preserved on the destination. MFC after: 1 month
* Document that `in word ...' is optional in the for command.stefanf2005-09-031-2/+7
|
* Return 1 from the unalias builtin if _any_ removal fails, not just the laststefanf2005-09-021-1/+1
| | | | one.
* Remove extra getenv() declaration.stefanf2005-09-021-1/+0
|
* Document that unalias can be used to remove several alias names.stefanf2005-09-021-5/+3
|
* Improved descriptions of block size handling.garys2005-08-311-37/+48
| | | | | | | PR: docs/84765 Submitted by: garys Approved by: keramida MFC after: 3 days
* Wrap a line due to a new sentence.jcamou2005-08-291-1/+2
| | | | | Noticed by: simon Approved by: trhodes (mentor)
* o Discuss the ways to escape an alias.jcamou2005-08-291-4/+16
| | | | | | | | | | o Fix the alias syntax lines. o Refer to the Aliases subsection. PR: docs/84914 Submitted by: garys Approved by: trhodes (mentor) MFC after: 3 days
* Document umask's -S option.stefanf2005-08-171-3/+8
|
* Remove a hack for an ancient gdb.stefanf2005-08-151-13/+4
|
* Recent cleanups made it possible to bump WARNS to 3.stefanf2005-08-141-1/+1
|
* Put the comparison with PEOF into a new macro is_eof(). Don't use it if thestefanf2005-08-132-6/+8
| | | | character comes from a string.
* Declare echocmd() and testcmd().stefanf2005-08-131-0/+2
|
* Use assignment rather than comparison.stefanf2005-08-131-2/+2
|
* - Provide all initialisers for a struct event.stefanf2005-08-131-5/+6
| | | | | - Include init.h in the generated init.c. - Generate prototypes and put the brace on the next line.
* First declare the functions to pacify -Wmissing-prototypes.stefanf2005-08-131-0/+4
|
* Include missing headers.stefanf2005-08-132-0/+2
|
* Use prototypes in the MKINIT lines collected by mkinit.stefanf2005-08-133-3/+3
|
* Use prototypes in the generated builtins.{c,h} files.stefanf2005-08-131-3/+3
|
* cvs -d stefanf@ncvs.FreeBSD.org:/home/ncvsstefanf2005-08-133-5/+9
|
* El_parse's third parameter is now const-qualified, add a cast.stefanf2005-08-111-1/+1
|
* Fix a comment.stefanf2005-08-071-1/+1
| | | | Submitted by: Liam J. Foy
* Don't install examples of NO_EXAMPLESphk2005-08-031-0/+2
|
* Spell "protections" correctly.keramida2005-07-281-1/+1
|
* Spell "background" correctly.keramida2005-07-281-5/+5
|
* Fix a bug when shell expansion is done against dangling symlinks, bydelphij2005-07-071-1/+1
| | | | | | | | | | | | converting the stat() call to a lstat() call, which will cover the situation. One can exercise this bug by referring a dangling link with something like */the-link. Approved by: re (scottl) Submitted by: Simon 'corecode' Schubert [corecode fs ei tum de] Obtained from: NetBSD via DragonFlyBSD (NetBSD rev. 1.51 and DragonFly rev. 1.6) MFC After: 3 days
* Sort sections.ru2005-06-142-13/+13
| | | | Approved by: re (blanket)
* Sorted sections and fixed prompt (PS[12]) strings.ru2005-06-141-11/+11
| | | | Approved by: re (blanket)
* Put the description of the -c option in the right place, asru2005-06-141-7/+9
| | | | | | | | | promised by the Argument List Processing section introduction. What follows the option in the options list is its long name, not its argument (as is the case for the -c option). Also sort references in the SEE ALSO section. Approved by: re (blanket)
* Remove kludges intended to support src trees with partial obj trees.des2005-06-101-6/+2
| | | | Discussed with: ru
* Remove the EXAMPLES section that describes how to sort by size usingdd2005-06-031-15/+0
| | | | | | | | | | sort(1). This functionality is provided by the -S option now, and it is useful even though a similar effect is achievable with sort(1), since the latter doesn't work in combination with -h. This option is also present in NetBSD, OpenBSD, and GNU fileutils, so there's clearly a demand for it. Noticed by: asmodai
* Improve wording: A sort is "in" a particular order, not "by" add2005-06-031-2/+2
| | | | particular order.
* Add the -S option to sort files by size. NetBSD and OpenBSD alreadydd2005-06-035-12/+43
| | | | | | | | have this option with identical semantics (sorting large files first). -r can be used to reverse the sort if that is desired. PR: 81625 Submitted by: Kostas Blekos <mplekos@physics.upatras.gr>, keramida
* The new name for the DIAGNOSTICS section is EXIT STATUS.tjr2005-05-311-1/+1
| | | | Noticed by: ru
OpenPOWER on IntegriCloud