jmallett
0c56b95c32
Remove two unused variables.
2002-06-20 05:21:43 +00:00
jmallett
2b674f32f6
Minor const cleanup.
...
Don't discard qualifiers we don't need to discard.
2002-06-20 05:20:50 +00:00
tjr
6b197bb764
Bring documentation on CDPATH and its effects on cd(1) back into sync with
...
reality (and POSIX): current directory isn't searched unless CDPATH has
a "." element or is unset.
PR: 38442
Submitted by: oleg dashevskii <be9@be9.ru>
MFC after: 1 week
2002-06-19 12:04:22 +00:00
tjr
08e98db385
Don't list shell builtins when the hash command is used (SUSv3)
2002-06-13 07:50:50 +00:00
tjr
8b3a40cd3f
Document the -f and -v options of the unset builtin.
2002-06-06 04:12:50 +00:00
tjr
70c6f806e0
Quote the output of the no-argument form of the `set' builtin for re-input
...
to the shell.
2002-06-06 04:02:50 +00:00
tjr
c74ee6d523
Add the SUSv3 -p ("portable") option to both the export and readonly
...
builtins. This makes export/readonly print lines in the form
"export name=value".
2002-06-06 03:57:22 +00:00
tjr
d658a1e5c7
Don't modify output that is to be quoted if it contains no IFS characters
...
or shell metacharacters.
2002-06-06 03:29:23 +00:00
tjr
71a01dad7b
Display job status correctly when a pipeline is suspended.
2002-06-04 15:26:00 +00:00
tjr
da1177ce1d
Describe finished jobs as "Done", not "Exit" (SUSv3)
2002-06-04 14:40:33 +00:00
tjr
ec349498c5
Don't output state' and
current' fields for processes that aren't
...
leaders in -l option to jobs(1).
2002-06-04 14:37:13 +00:00
tjr
ba4116c514
Missing prototypes from previous commit.
2002-06-04 13:13:54 +00:00
tjr
de63da4c55
Correct minor spacing problem in output of jobs -l for pipelines.
2002-06-04 13:01:51 +00:00
tjr
33d27dd210
Quote alias values in the output of the alias(1) builtin so they are
...
suitable for re-input to the shell (SUSv3)
2002-06-04 12:59:12 +00:00
tjr
0930ee47eb
Fix typo causing ``fc -e'' to not work correctly. getopt() sets optarg,
...
not shoptarg.
2002-06-02 08:34:09 +00:00
tjr
0a9f255d03
Adding an entry to the history with H_ENTER moves libedit's internal
...
history cursor. Reset the cursor after adding the entry to the history
when doing ``fc -s'' so the output is correct.
2002-06-02 08:27:04 +00:00
tjr
d3a1f7d912
Implement $PPID, the parent process ID of the shell.
2002-06-01 02:14:48 +00:00
tjr
fff7a36566
Support the remaining job ID formats required by SUSv3:
...
%+ (current job, same as %%),
%- (previous job),
%?str (job with "str" in its command name).
2002-06-01 01:51:42 +00:00
tjr
1f8bb8d729
Add -s (output PID's only) and -l (show PID's) options to the jobs(1)
...
builtin. Modify the output format to match what SUSv3 requires.
2002-05-31 14:04:23 +00:00
tjr
c828fbddc6
#if JOBS around a job control-related statement to allow compilation with
...
job control disabled.
2002-05-31 13:10:38 +00:00
tjr
5250eaebac
Break the code to display status info for one job out from showjobs() into
...
showjob(), use it inside dowait() to display status info for consistency,
and in a format closer to what the standard requires.
2002-05-31 13:07:05 +00:00
tjr
952d847c40
Move job to front of most recently used job list when bg'd or fg'd.
2002-05-31 12:35:34 +00:00
tjr
7e9561b97a
Instead of keeping just the jobid of the most recently bg'd or fg'd job,
...
keep a linked list of the jobs, most recently used first. This is required
to support the idea of `previous job', and to allow the jobs fg and bg
default to be correct according to POSIX.
2002-05-31 12:31:23 +00:00
ru
76631b8618
mdoc(7) police: tidy up the markup a bit.
2002-05-29 15:38:59 +00:00
tjr
9ce8567e45
sh appeared in Version 1, not System V.1.
2002-05-25 12:18:27 +00:00
tjr
290ce9e466
Implement `set +o', which displays the currently set options in a format
...
suitable for re-input into the shell.
2002-05-25 12:11:58 +00:00
tjr
e6fbc84685
Bring back the cd -L and -P options from revision 1.24, but try harder not
...
to fail when the logical current directory no longer exists. Allow changes
to absolute paths when logical cwd is invalid, fall back to physical cd
if logical cd fails.
2002-05-22 05:15:53 +00:00
tjr
fff7331065
Temporarily back out revision 1.24; it seems to handle the case where the
...
current directory no longer exists incorrectly and breaks `make cleandir'.
2002-05-22 03:29:20 +00:00
tjr
bc86a28ef9
Add the SUSv3 -L and -P options to the cd and pwd builtin utilities. `Logical'
...
handling of .. is now the default.
2002-05-20 07:54:39 +00:00
jmallett
4205c9f55a
Remove a small, annoying, nit I ran in to editing this file, a lone tab
...
on a line by itself.
2002-05-19 17:50:23 +00:00
tjr
b19972e699
Implement the -u (-o nounset) option, which gives an error message if
...
an unset variable is expanded.
Obtained from: NetBSD (bjh21, christos)
2002-05-19 08:30:16 +00:00
tjr
b72e0fae17
Make the fg and bg commands give the output required by SUSv3.
...
fg outputs the name of the command, bg outputs the name of the command
and the job id.
2002-05-19 07:27:26 +00:00
tjr
ada2f900a3
Implement the -C (-o noclobber) option, which prevents existing regular
...
files from being overwritten by shell redirection.
2002-05-19 06:03:05 +00:00
trhodes
56036d2623
Consistancy check s/file system/filesystem/
...
Reviewed by: brian
2002-05-16 01:57:20 +00:00
des
4d6b787d2d
Usage style sweep: spell "usage" with a small 'u'.
...
Also change one case of blatant __progname abuse (several more remain)
This commit does not touch anything in src/{contrib,crypto,gnu}/.
2002-04-22 13:44:47 +00:00
charnier
79b89ed363
Use `The .Nm utility'
2002-04-16 20:08:06 +00:00
greid
5486a1c99e
Stop a null pointer dereference in the builtin hash function.
...
PR: 36141
Approved by: cracauer
MFC after: 1 week
2002-04-15 15:49:30 +00:00
imp
d4f0b8fef8
Remove now-obsolete __STDC__ ifdefs, remove redundant NULL definition and
...
include stdlib.h for NULL.
2002-02-18 06:08:23 +00:00
kris
bb3058824a
Lock down with WFORMAT=1 except those directories with unfixed warnings.
...
Tested on i386 and alpha.
2002-02-04 02:49:19 +00:00
imp
c4d9fbc331
%.* takes an int, not a size_t.
2002-02-02 07:06:58 +00:00
imp
5ef5088ac4
o __P has been reoved
...
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
they already are.
o Change
int
foo() {
...
to
int
foo(void)
{
...
2002-02-02 06:50:57 +00:00
babkin
6f66434b4f
The fix for >/dev/stdout, including Tor Egge's fix for the bug in the
...
original attempt of the fix. And yes, this time I've tried to build
world with it and it succeeded.
Submitted by: Tor Egge
MFC after: 1 week
2002-01-13 14:37:40 +00:00
alfred
39b93da10a
backout rev 1.14, it's breaking things.
2001-12-24 22:27:04 +00:00
babkin
a0dab54592
Added ability to do ">/dev/stdout". The apsfilter people are anxious
...
to get it MFCed in time for release 4.5.
MFC after: 2 weeks
2001-12-22 02:40:58 +00:00
obrien
099f8ecbe9
Default to WARNS=2. Binary builds that cannot handle this must explicitly
...
set WARNS=0.
Reviewed by: mike
2001-12-04 01:57:47 +00:00
knu
96265e088e
Remove the printf builtin command from sh(1), which command is not
...
used so often that it's worth keeping it as a builtin.
Now that all the printf invocations from within the system startup
scripts, we can safely remove it.
Urged by: sheldonh :)
No MFC is planned so far because it may break compatibility and
violate POLA.
2001-11-20 18:33:59 +00:00
knu
b58a3e4078
Make test(1) a builtin command of our sh(1) for efficiency. The
...
binary size increase is 3,784 bytes (about 0.6%).
I don't drop the printf builtin while I'm here because some /etc/rc.*
scripts seem to use it before mounting /usr where printf(1) resides.
Reviewed by: arch (sheldonh)
Inspired by: NetBSD, ksh
Clued by: ume (on how the printf builtin is used)
2001-11-17 19:10:11 +00:00
tegge
c98a8251e8
Don't call setvar() with the VTEXTFIXED flag. A copy is created by
...
setvar() and passed to setvareq(). When the VTEXTFIXED flag is set,
that copy is never freed, causing a memory leak.
PR: 31533
Submitted by: maxim@macomnet.ru
2001-11-07 23:00:05 +00:00
tegge
e6528784cf
Repair normally unused is_digit() macro.
2001-10-14 21:11:33 +00:00
obrien
d9494059c0
*** empty log message ***
2001-10-01 08:43:58 +00:00