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
tegge
b0e7279ba2
Don't check uninitialized memory for having the shell control character
...
value CTLARI since this might break expansion of arithmetic expressions.
Don't access memory below start of stackblock.
Problem analyzed by hunt@iprg.nokia.com , slightly different patch applied.
PR: 24443
Submitted by: hunt@iprg.nokia.com
2001-09-19 20:16:38 +00:00
tegge
0c39138a0b
BASESYNTAX, DQSYNTAX, SQSYNTAX and ARISYNTAX handles negative indexes.
...
Allow those to be used to properly quote characters in the shell
control character range.
2001-09-19 20:07:47 +00:00
tegge
221fff6437
Adjust some type checks to include CTLQUOTEMARK in the range of
...
shell control characters.
2001-09-19 19:58:09 +00:00
peter
a28e7a866a
Initialize infp at main()
2001-08-13 21:55:04 +00:00
ru
95ce4d2cdc
Removed duplicate VCS ID tags, as per style(9).
2001-08-13 14:06:34 +00:00
sheldonh
7950d85ec2
can not -> cannot
2001-08-08 18:32:06 +00:00
ru
4345758876
mdoc(7) police:
...
Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text.
Not only this slows down the mdoc(7) processing significantly, but it also
has an undesired (in this case) effect of disabling hyphenation within the
entire enclosed block.
2001-08-07 15:48:51 +00:00
sheldonh
9bfb9eedcd
Use STD{ERR,IN,OUT}_FILENO instead of their numeric values. The
...
definitions are more readable, and it's possible that they're
more portable to pathalogical platforms.
Submitted by: David Hill <david@phobia.ms>
2001-07-26 11:02:39 +00:00
sheldonh
8eba0410f0
Break the list of parameter expansions into two lists so that
...
the paragraph introducing the prefix and suffix pattern expansions
does not appear as part of the explanation for the string length
expansion.
2001-07-23 10:18:05 +00:00
dd
a145482cf6
Remove whitespace at EOL.
2001-07-15 07:53:42 +00:00