dwmalone
3b0d121aeb
Make test check the tv_nsec part of a struct stat when comparing
...
the mtimes of a file. (This is probably only useful if you have
vfs.timestamp_precision set to something nonzero).
PR: 39163
Submitted by: Hal Burch <hburch@lumeta.com>
MFC after: 2 weeks
2002-07-27 22:53:44 +00:00
tjr
43d6a14678
Add a -P/-o physical option which behaves similarly to bash/ksh's options
...
by the same name. This option makes the cd and pwd builtins behave physically
(as opposed to logically) by default.
Submitted by: fanf
2002-07-25 10:57:39 +00:00
tjr
ca8e9f2edf
Set opterr to zero to avoid duplicate warnings from getopt(3) for unknown
...
options.
2002-07-25 10:47:38 +00:00
tjr
cb0dfaa9bd
Use PATH_MAX instead of a local guess at it, which happened to be incorrect.
...
Suggested by: fanf
2002-07-25 09:56:08 +00:00
tjr
077941cfae
pwdcmd()'s argc and argv arguments are no longer unused, remove __unused.
...
Pointed out by: fanf
2002-07-25 09:46:31 +00:00
mp
9fbc2019e8
Remove WARNS and WFORMAT overrides.
2002-07-24 22:26:44 +00:00
tjr
9c6ea7014e
Avoid calling el_resize() from a signal handler, even though libedit
...
itself does that if you set EL_SIGNAL. Instead, set a flag and check it
before calling el_gets(). This is safer, but slower to respond to changes.
Pointed out by: mp
2002-07-24 02:06:07 +00:00
tjr
8be25d316f
Catch SIGWINCH in interactive shells and call el_resize() to update
...
libedit's idea of the window size.
2002-07-23 15:05:00 +00:00
tjr
12e699af89
Call el_source() to read the contents of .editrc when line editing is enabled.
...
Obtained from: NetBSD
MFC after: 2 weeks
2002-07-23 12:26:34 +00:00
tjr
f9fd5faa32
Add a `bind' builtin command, which is simply a wrapper around libedit's
...
builtin command of the same name. This allows the key bindings for the
shell's line editor to be changed.
MFC after: 2 weeks
2002-07-23 11:50:53 +00:00
johan
c464bca234
Add the -n option, which automatically answers "no" to the overwrite question.
...
PR: 7828
Suggested by: Daniel O'Connor <doconnor@gsoft.com.au>
Approved by: sheldonh (mentor)
MFC after: 2 weeks
2002-07-23 00:42:56 +00:00
tjr
e73489bbe4
Don't allow "||" or "&&" to be the first tokens of a command.
...
PR: 40386
MFC after: 2 weeks
2002-07-22 05:50:12 +00:00
tjr
bd9024b4d7
Implement the P1003.2 `command' builtin command, which is used to suppress
...
shell function and alias lookup. The -p option has been implemented, the
UPE -v and -V options have not. The old `command' command has been renamed
to `builtin'.
2002-07-21 06:49:14 +00:00
tjr
28039a3e13
Document that only one of the -n and -e options may be specified for
...
sh(1)'s echo(1) builtin command.
PR: 32935, 40747
MFC after: 1 week
2002-07-20 04:39:23 +00:00
tjr
6f7073eccf
Remove broken and incomplete support for old releases of System V,
...
don't support system that implement getcwd(3) with a pipe to /bin/pwd.
2002-07-19 08:09:04 +00:00
tjr
74e419398d
Don't assume file descriptors fit in a short, use an int instead.
2002-07-18 12:24:35 +00:00
tjr
9e3506ab60
Avoid using ints or shorts to store process id's, use pid_t instead.
...
The pgrp member of struct job was declared as a short and could not store
every possible process group ID value, the rest of them were benign because
pid_t happens to be an int.
2002-07-18 10:22:42 +00:00
tjr
60af0dcffa
Make the message that is printed when the foreground process is terminated
...
by a signal the same as pdksh/bash/sh before rev. 1.34.
2002-07-18 09:37:51 +00:00
sheldonh
eaeed7f0ff
Revert previous delta, which is not required with rev 1.5 of
...
src/contrib/gcc/c-format.c .
2002-07-15 12:08:21 +00:00
keramida
467c3ff452
Fix a couple of typos in a comment.
...
PR: docs/33559
Submitted by: Marc Olzheim <marcolz@ilse.nl>
2002-07-15 02:03:30 +00:00
tjr
1f5fc25e7a
Complain if more than one file argument is given to unlink(1) like we did
...
before I made unlink use getopt().
2002-07-12 07:20:20 +00:00
keramida
722bbd5d1c
Don't duplicate the description of the sticky bit that is already
...
part of chmod(2) and sticky(8), but refer to those manpages instead.
PR: docs/35605
Submitted by: Gary W. Swearingen <swear@blarg.net>
2002-07-12 01:57:44 +00:00
bde
f340aa750e
Fixed a printf format error that was fatal on alphas. Adding WFORMAT=0
...
to the Makefile didn't affect this bug because WFORMAT only controls
higher- level format checking (not the -Wformat that is implicit in
-Wall).
Fixed a nearby printf format error that was benign and 3 nearby style bugs.
2002-07-11 17:28:29 +00:00
sheldonh
aa9de7efae
Set WFORMAT=0, because our compiler currently complains about NULL
...
arg 2 to err() and friends, and warnings are promoted to errors.
This allows the following revisions to be reverted:
rev 1.39 src/bin/cp/cp.c
rev 1.26 src/bin/chmod/chmod.c
rev 1.40 src/bin/rm/rm.c
The following revisions can already be reverted, because they were
already covered by WFORMAT=0:
rev 1.8 src/bin/ls/lomac.c
rev 1.63 src/bin/ls/ls.c
rev 1.8 src/bin/ps/lomac.c
rev 1.34 src/bin/rcp/rcp.c
2002-07-11 08:45:38 +00:00
tjr
b8a53fb638
Don't assume the shell's controlling terminal is attached to file descriptor
...
2. Instead, open /dev/tty. This problem stopped commands in subshells from
being executed correctly if standard error was redirected.
PR: 36671
Obtained from: NetBSD (but simplified)
2002-07-11 06:42:11 +00:00
tjr
b6bd829347
Remove support for the "old" tty driver by unifdef -UOLD_TTY_DRIVER;
...
many other parts of the shell are no longer compatible with this, and it
makes jobs.c quite cluttered with #ifdef's.
2002-07-11 06:26:48 +00:00
tjr
0087ce2988
When growing the job table, don't relocate the jobmru pointer if it's NULL.
2002-07-11 04:22:41 +00:00
dillon
3adf63f81d
err() is documented as allowing NULL for the format string but GCC isn't
...
happy about it any more so change the usage to make buildworld work again.
2002-07-10 20:44:55 +00:00
dillon
d5291af616
err() is documented as allowing NULL for the format string but GCC isn't
...
happy about it any more so change the useage so buildworld works again.
2002-07-10 20:36:25 +00:00
johan
c7b5c353d2
Update usage for the addition of -n in rev 1.35 of mv.c.
...
Approved by: obrien, sheldonh (mentor).
2002-07-09 17:45:13 +00:00
tjr
df20e19b27
Close file descriptors when [n]>&- and [n]<&- redirections are used.
...
This was broken by rev. 1.16.
PR: 40334
MFC after: 1 week
2002-07-09 08:55:46 +00:00
tjr
284f7b1851
Print out commands with NTOFD/NFROMFD redirections that close the
...
descriptors (">&-" or similar) correctly in the jobs(1) command.
2002-07-09 03:26:47 +00:00
jmallett
15fec8826f
Bring back WFORMAT=0.
2002-07-08 15:48:39 +00:00
robert
47f9f58c0a
- Use (MAXLOGNAME - 1) where UT_NAMESIZE was used to be able to
...
(-)remove the inclusions of <utmp.h>.
2002-07-08 09:08:51 +00:00
jmallett
b246443071
Make printval() take a 'void *' thus negating any assumptions the compiler
...
may try to make about the alignment of the dereferenced datum.
2002-07-07 21:45:59 +00:00
charnier
26da445d07
The .Nm utility
2002-07-06 19:13:21 +00:00
mike
27f3da3573
Don't depend on pollution in <limits.h> for the definition of
...
<stdint.h> macros.
2002-07-05 15:58:27 +00:00
maxim
9dbbde57e6
Fix a memory leak.
...
PR: bin/40177
MFC after: 1 week
2002-07-05 10:27:34 +00:00
ru
7a7a1e7da8
mdoc(7) police: a bit of tidying.
2002-07-04 13:22:22 +00:00
markm
837d0142a4
Fix some low-hanging lint-fruit: endianness and staticness warnings.
2002-07-03 16:35:20 +00:00
dillon
7340de44e8
Fix type-o in last commit in preparation for MFC.
2002-07-02 19:06:33 +00:00
ru
5179f05e33
Reimplemented bsd.nls.mk using bsd.files.mk and bsd.links.mk.
...
Provided the (previously missing) dependency on source files
for intermediate .msg files.
Provided the default for NLSSRCDIR (defaults to .CURDIR).
Slightly changed the API: NLS should now list plain locale
names, without the .msg suffix.
When included from bsd.prog.mk, NLSNAME defaults to PROG.
2002-07-02 12:37:09 +00:00
dwmalone
3c634774fa
Remove double #include <sys/cdef.h> and __FBSDID.
...
PR: 40053
Submitted by: Dan Lukes <dan@obluda.cz>
2002-07-01 10:46:39 +00:00
tjr
41d2a14ec1
Put documentation of the -m option's argument in its list tag in the
...
Description section for consistency with other manpages.
2002-06-30 06:50:16 +00:00
obrien
bc61fc95d8
Consistently use FBSDID
2002-06-30 05:25:07 +00:00
obrien
f6f518b207
Consistently use FBSDID
2002-06-30 05:15:05 +00:00
obrien
c84c569bd1
Consistently use __FBSDID
2002-06-30 05:13:54 +00:00
tjr
2ca2fb4fa3
Avoid truncating the pathname to UNIX Domain Sockets with snprintf(),
...
giving a more sensible warning when the (relatively meagre) sun_path
limit is exceeded.
2002-06-29 04:52:33 +00:00
tjr
c2f443c824
Check that snprintf() does not truncate the destination pathname when
...
linking into a directory.
2002-06-29 04:10:40 +00:00
sheldonh
8e1ca9d76c
Document addition of RLIMIT_VMEM support, added in rev 1.26 of miscbltin.c.
2002-06-27 16:56:45 +00:00