summaryrefslogtreecommitdiffstats
path: root/bin
Commit message (Collapse)AuthorAgeFilesLines
...
* | MFHgjb2016-02-2213-59/+105
|\ \ | |/ | | | | Sponsored by: The FreeBSD Foundation
| * sh: Don't hash alias name when there are no aliases.jilles2016-02-211-2/+4
| |
| * sh: Optimize setprompt(0).jilles2016-02-211-0/+2
| | | | | | | | Avoid doing work to print an empty prompt (such as when reading scripts).
| * sh: Remove unnecessary flushouts while reading script.jilles2016-02-211-2/+0
| | | | | | | | | | Output is flushed when a builtin is done or immediately after writing it (error messages, set -v output, prompts).
| * Make the "invalid numeric value" error message actually displayabletrasz2016-02-211-8/+6
| | | | | | | | | | | | | | | | | | (was a dead code before). Submitted by: bde@ (earlier version) Reviewed by: bde@ MFC after: 1 month Sponsored by: The FreeBSD Foundation
| * sh: Rework code to remove '\0' from shell input.jilles2016-02-193-28/+37
| | | | | | | | | | This fixes bugs where '\0' was not removed correctly and speeds up the parser.
| * sh: Add tests for comments in sh -c.jilles2016-02-193-0/+9
| |
| * Reorganize the handling all-zeroes terminal block in sparse modethomas2016-02-185-19/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The intent of the previous code in that case was to force an explicit write, but the implementation was incorrect, and as a result the write was never performed. This new implementation instead uses ftruncate(2) to extend the file with a trailing hole. Also introduce regression tests for these cases. PR: 189284 (original PR whose fix introduced this bug) PR: 207092 Differential Revision: D5248 Reviewed by: sobomax,kib MFC after: 2 weeks
* | MFHgjb2016-02-181-2/+0
|\ \ | |/ | | | | Sponsored by: The FreeBSD Foundation
| * Test directories can build in parallel fine.bdrewery2016-02-161-2/+0
| | | | | | | | Sponsored by: EMC / Isilon Storage Division
* | MFHgjb2016-02-103-8/+10
|\ \ | |/ | | | | Sponsored by: The FreeBSD Foundation
| * Rename P_KTHREAD struct proc p_flag to P_KPROC.kib2016-02-092-2/+2
| | | | | | | | | | | | | | | | I left as is an apparent bug in ntoskrnl_var.h:AT_PASSIVE_LEVEL() definition. Suggested by: jhb Sponsored by: The FreeBSD Foundation
| * Improve comment to reflect recent changes.trasz2016-02-091-2/+4
| | | | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
| * Use a proper type for return value of postfix_to_mult(); the way it'strasz2016-02-091-2/+2
| | | | | | | | | | | | | | | | being used wouldn't work if the value returned didn't fit in intmax_t. Submitted by: bde@ MFC after: 1 month Sponsored by: The FreeBSD Foundation
| * Use proper functions for parsing the numeric values.trasz2016-02-091-2/+2
| | | | | | | | | | | | Submitted by: bde@ MFC after: 1 month Sponsored by: The FreeBSD Foundation
* | Explicitly add unmarked bin/ binaries to the runtime package.gjb2016-02-0937-0/+37
| | | | | | | | | | | | | | | | Note: tcsh(1) has a MK_TCSH=no test, so this should be a separate package, which requires pre-install/post-install scripts, to be added later. Sponsored by: The FreeBSD Foundation
* | Add rcp(1) to the rcmds package.gjb2016-02-091-0/+1
| | | | | | | | Sponsored by: The FreeBSD Foundation
* | Add rmail to the sendmail packagegjb2016-02-091-0/+1
| | | | | | | | Sponsored by: The FreeBSD Foundation
* | MFHgjb2016-02-083-79/+75
|\ \ | |/ | | | | Sponsored by: The FreeBSD Foundation
| * Add 't' and 'p' postfixes to dd(1).trasz2016-02-042-2/+13
| | | | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
| * Reduce code duplication.trasz2016-02-041-48/+34
| | | | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
| * Don't link /usr/share/nls/de_DE.UTF-8/tcsh.cat to itself.bdrewery2016-02-031-1/+1
| | | | | | | | Sponsored by: EMC / Isilon Storage Division
| * The charset of NLS catalogs were converted to UTF-8ume2016-02-031-29/+28
| | | | | | | | since r231990.
* | More 'tests' packaging fixes.gjb2016-02-031-0/+5
| | | | | | | | Sponsored by: The FreeBSD Foundation
* | Fix build.gjb2016-02-037-7/+0
| | | | | | | | Sponsored by: The FreeBSD Foundation
* | MFHgjb2016-02-024-83/+141
|\ \ | |/ | | | | Sponsored by: The FreeBSD Foundation
| * Make dynamic link of libiconv from ports work again.ume2016-02-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | The symbols of libiconv from ports were changed to have prefixed. Since we have iconv in our libc these days, we don't need it on 10.X and later. However, 9.X still need this. Spotted by: Yoshihiko Sarumaru MFC after: 1 days
| * sh: Don't allocate a redirtab if there are no redirections.jilles2016-01-301-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Builtins (including variable assignments without command word), function calls and redirected compound commands need to restore file descriptors to their original state after execution. This is handled by allocating a redirtab structure. These mallocs and frees show up heavily in pmcstat. Only allocate a redirtab if there are actually redirections and maintain a count of how many levels of REDIR_PUSH there are without redirtabs. A simple loop without external programs like sh -c 'i=0; w=$(printf %0100d 7); while [ "$i" -lt 1000000 ]; do i=$((i+1)); done' is over 25% faster on an amd64 bhyve VM.
| * sh(1): Document 'cd -'.jilles2016-01-301-6/+19
| | | | | | | | | | This reflects the changes in r294649 and can therefore not be MFCed by itself.
| * test: Optimize operator lookup.jilles2016-01-301-67/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The linear search using strcmp() shows up in pmcstat for several percent. Split the operators into lengths and whether they start with '-' and compare bytes using == instead of strcmp(). A simple test sh -c 'i=0; w=$(printf %0100d 7); while [ "$i" -lt 1000000 ]; do v=$(printf %sx%s "$w" "$w"); i=$((i+1)); done' is over 4% faster on an amd64 bhyve VM.
* | First pass to fix the 'tests' packages.gjb2016-02-0218-0/+72
| | | | | | | | Sponsored by: The FreeBSD Foundation
* | MFHgjb2016-01-257-49/+79
|\ \ | |/ | | | | Sponsored by: The FreeBSD Foundation
| * sh: Constify internal representation in expand.c.jilles2016-01-241-22/+28
| | | | | | | | | | | | | | Forbid (temporary or permanent) modifications of the strings in NARG nodes during expansion. Tilde expansion now needs to copy the username for the terminating '\0'.
| * sh: Remove a global variable from cd.c.jilles2016-01-241-14/+15
| |
| * sh: Use OLDPWD shell variable for 'cd -'.jilles2016-01-231-10/+9
| | | | | | | | | | | | | | | | Per POSIX, 'cd -' should use the OLDPWD shell variable, not internal state. This variable is normally exported. Also, if OLDPWD is not set, fail 'cd -' instead of changing to the current directory.
| * Don't mention the "canonical six" in setfacl(1); it describes semanticstrasz2016-01-231-3/+4
| | | | | | | | | | | | | | that's long gone. MFC after: 1 month Sponsored by: The FreeBSD Foundation
| * sh: Clean a readonly local, even if the variable does not exist outside.jilles2016-01-223-0/+12
| | | | | | | | | | If a local variable has been made read-only, this should not prevent its removal when the function returns.
| * sh: Add already working test for local-readonly interaction.jilles2016-01-222-0/+11
| |
* | Create a rcmds package.gjb2016-01-211-0/+2
|/ | | | Sponsored by: The FreeBSD Foundation
* sh: Simplify some code related to positional parameters.jilles2016-01-192-17/+13
|
* sh: Update associated state when restoring locals while leaving a function.jilles2016-01-104-2/+29
| | | | | | | | Some variables like PATH call a function when modified. Make sure to call this also when leaving a function where such a variable was made local. Make sure to restore local variables before shellparam, so getopts state is not clobbered.
* sh: Reduce size of options table.jilles2016-01-074-71/+71
|
* sh: Add a test for 'cd -'.jilles2016-01-073-0/+11
| | | | | | Redirect 'cd -' output to /dev/null since POSIX requires it to write the new directory name even if not interactive, but we currently only write it if interactive.
* sh: Ensure OPTIND=1 in subshell without forking does not affect outer env.jilles2016-01-073-0/+19
| | | | | | | | | | | | Command substitutions containing a single simple command and here-document expansion are performed in a subshell environment, but may not fork. Any modified state of the shell environment should be restored afterward. The state that OPTIND=1 had been done was not saved and restored here. Note that the other parts of shellparam need not be saved and restored, since they are not modified in these situations (a fork is done before such modifications).
* sh: Link tests/builtins/getopts9.0 to the build.jilles2016-01-031-0/+1
| | | | This was forgotten in r273700.
* sh: Reduce size of builtins table.jilles2016-01-032-15/+12
|
* sh: Remove redundant CTLQUOTEMARK checks.jilles2015-12-311-18/+2
| | | | | | | | With the new expand.c code, the intermediate representation passed to the pathname generation code only contains CTLESC, not CTLQUOTEMARK. CTLQUOTEMARK now only occurs in the text of NARG nodes (output of the parser).
* sh: Reindent expandmeta().jilles2015-12-311-21/+21
|
* sh: Perform pathname generation during the first expansion phases.jilles2015-12-312-52/+57
| | | | | | | | This avoids the need to add and remove CTLESC bytes if pathname generation will not be performed (set -f). Side effect: the order of operations is slightly different: pathname generation in ${$+* $(CMD)} will not see filesystem changes from CMD.
* sh: Perform IFS splitting during the first expansion phases.jilles2015-12-311-362/+253
| | | | | | | | | This simplifies the code and should be faster in some cases. Side effect: the order of operations is different so that the value of IFS used when IFS is modified during expansion (${IFS:=...}, ${IFS=...} or $((...IFS=...))) may be different. Note that this order is highly unportable between shells.
OpenPOWER on IntegriCloud