Commit Graph

1987 Commits

Author SHA1 Message Date
Xin LI
0e3e87bd43 Fix a bug when shell expansion is done against dangling symlinks, by
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
2005-07-07 18:10:33 +00:00
Ruslan Ermilov
7b020a2f1e Sort sections.
Approved by:	re (blanket)
2005-06-14 08:25:54 +00:00
Ruslan Ermilov
fb039b55dc Sorted sections and fixed prompt (PS[12]) strings.
Approved by:	re (blanket)
2005-06-14 08:25:00 +00:00
Ruslan Ermilov
fd50df303c Put the description of the -c option in the right place, as
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)
2005-06-14 07:50:44 +00:00
Dag-Erling Smørgrav
ee66677a7a Remove kludges intended to support src trees with partial obj trees.
Discussed with:	ru
2005-06-10 06:12:53 +00:00
Dima Dorfman
24b0280f8c Remove the EXAMPLES section that describes how to sort by size using
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
2005-06-03 11:38:35 +00:00
Dima Dorfman
77a15272e7 Improve wording: A sort is "in" a particular order, not "by" a
particular order.
2005-06-03 11:22:06 +00:00
Dima Dorfman
71b8b74887 Add the -S option to sort files by size. NetBSD and OpenBSD already
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
2005-06-03 11:05:58 +00:00
Tim J. Robbins
500b4917ab The new name for the DIAGNOSTICS section is EXIT STATUS.
Noticed by:	ru
2005-05-31 12:57:44 +00:00
Tim J. Robbins
4129539639 Move information about exit status into a DIAGNOSTICS section. 2005-05-29 08:18:48 +00:00
Andrey A. Chernov
aaf9c3b784 Fix: printed output flags (onocr) and (onlret) same as oxtabs
PR:             81256
Submitted by:   Arseny Nasokin <tarc@tarc.po.cs.msu.su>
2005-05-26 06:57:57 +00:00
Maxime Henrion
8835fa2759 Correct a few places where we called warn() when warnx() should have
been used.

Submitted by:	"Liam J. Foy" <liamfoy@sepulcrum.org>
Obtained from:	DragonFlyBSD
2005-05-19 21:33:48 +00:00
Garance A Drosehn
01c7bd5378 A second attempt to adjust option-parsing on a shell command, for the
benefit of scripts start out as:     #!/bin/sh -- # -*- perl -*-
With this fix in place, we can commit a change to kern/imgact_shell.c
so FreeBSD will process the `#!' line in shell-scripts in a more
standard fashion.

PR:		16393
Mentioned on:	freebsd-arch
2005-05-16 04:32:41 +00:00
Dima Dorfman
7e81a15205 Add an interface to the lchflags(2) syscall. The new -h option is
analogous to chmod(1)'s -h. It allows setting flags on symbolic links,
which *do* exist in 5.x+ despite a claim to the contrary in the
chflags(1) man page.

Suggested by:	Chris Dillon
2005-05-14 23:23:10 +00:00
Mark Peek
6048f2e121 Define HAVE_STRUCT_UTMP_UT_HOST in order for the REMOTEHOST environment
variable to show up correctly.

Note: This is really a bug with the stock tcsh configure.in script not
including <sys/types.h> before <utmp.h>. But, since config.h is maintained
separate from the contrib sources, this is the correct fix.

Noticed by: ache
2005-05-04 20:21:57 +00:00
Maxim Konovalov
fa6c8d89c9 o Typo: s/teminal/terminal/.
Submitted by:	Michal Varga
2005-04-29 11:10:27 +00:00
Mark Peek
90d5800df2 Add in FreeBSD specific options for tcsh 6.14. 2005-04-24 19:51:57 +00:00
Mark Peek
ced7a1fd5b Add the config.h resulting from running the configure script.
Note: the contents of this file has changed between 6.13 and 6.14.
The old contents of this file has been repocopied to config_p.h.
2005-04-24 19:50:22 +00:00
Mark Peek
099f08ce6e Add new file (tc.nls.c) to the build. 2005-04-24 19:44:43 +00:00
Giorgos Keramidas
f1caa99d54 There is no /etc/rc.network anymore.
Submitted by:	Benjamin Rossen <b.rossen@onsnet.nu>
MFC after:	2 weeks
2005-04-17 23:22:22 +00:00
Giorgos Keramidas
38afdcbc3c Various sh(1) enhancements:
- Move the description of the ``-c string'' option closer to the option itself.
- Add an ENVIRONMENT section (1)
- Add more .Xr cross references to the SEE ALSO section.

Obtained from:  NetBSD (1)
2005-04-15 14:53:29 +00:00
Scott Long
fd525b85a7 Document problems with writing to disks under GEOM. 2005-04-07 20:50:38 +00:00
Pawel Jakub Dawidek
a990344f7e Add and document the 'jid' keyword for the '-o' option.
Reviewed by:	gad
MFC after:	3 days
2005-03-20 10:40:36 +00:00
David E. O'Brien
5f44e053cc Fix bin/pax doesn't wait for compress/gzip before exiting.
Submitted by:	Joerg Sonnenberger <joerg@britannica.bec.de>
Obtained from:	OpenBSD (commited fix to PR 3455)
2005-03-12 06:38:01 +00:00
Giorgos Keramidas
a762afe578 Use `.Pq Ql'' to quote single characters, instead of `.Pq Li''.
This makes the resulting output more aesthetically pleasing in
text-only terminals:

Reviewed by:	ru
2005-03-04 13:16:50 +00:00
Giorgos Keramidas
91ee1c5df6 Add a section describing the exit status of the shell.
Obtained from:	NetBSD
2005-03-04 12:40:07 +00:00
Tom Rhodes
c71158d453 Wrap BSD r* commands in NO_RCMDS.
Change NO_RCMDNS to NO_RCMDS and do the switch in bsd.compat.mk.

Discussed with: ru, nectar
2005-03-02 11:53:22 +00:00
David E. O'Brien
f0c73601c1 Support \H, \h, \w, \W, \$ string expansion in the prompt.
Submitted by:	mini
2005-03-01 03:35:58 +00:00
Alexey Zelkin
bed602166f Fix typo 2005-02-27 18:18:32 +00:00
Tom Rhodes
61001d7506 Fix a few markup nits in previous commit.
Noticed by:	ru, who else? :)
2005-02-25 00:40:46 +00:00
Tom Rhodes
a5e1813654 Note how cp(1) handles directories ending in "/."
PR:		75774
Submitted by:	Mike Meyer <mwm@mired.org> (original version)
2005-02-24 00:06:22 +00:00
Tom Rhodes
51cf632946 Add information on utilities which may or may not be aware of file flags.
PR:		55653
Submitted by:	Tony Maher <tonymaher@optushome.com.au> (original version)
2005-02-23 23:07:45 +00:00
Garance A Drosehn
5cc540d471 Change /bin/sh so *it* implements the processing needed for scripts to
work as expected when they have a "shebang line" of:

     #!/bin/sh -- # -*- perl -*- -p

This specific line is recommended in some perl documentation, and I think
I've seen similar lines in documentation for ruby and python.  Those
write-ups expect `sh' to ignore everything after the '--' if the first
thing after the '--' is a '#'.  See chapter 19, "The Command-Line Interface"
in 3rd edition of "Programming Perl", for some discussion of why perl
recommends using this line in some circumstances.

The above line does work on solaris, irix and aix (as three data points),
and it used to work on FreeBSD by means of a similar patch to execve().
However, that change to execve() effected *all* shells (which caused
other problems), and that processing was recently removed.

PR:		16393  (the original request to fix the same issue)
Reviewed by:	freebsd-current (looking at a slightly different patch)
MFC after:	1 week
2005-02-16 05:17:58 +00:00
Xin LI
6aac4c27da Several improvements to ps.1:
- Document the fact that empty heading text suppresses the
	  heading line (e.g. 'ps -o pid='), as this is very useful
	  in scripts.
	- Describe logname keyword more completely.
	- Describe the printing of arguments more completely.
	- Put lockname in the correct alphabetical order in the list
	  of all keywords.
	- Correct sentence in standards section.

Submitted by:	Jilles Tjoelker <jilles at stack nl>
PR:		docs/73618
MFC After:	1 week
2005-02-14 16:56:15 +00:00
Ruslan Ermilov
36a142c455 Expand contractions. 2005-02-13 23:45:54 +00:00
Ruslan Ermilov
0227791b40 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
Ruslan Ermilov
6b806d21d1 Fixed the misplaced $FreeBSD$. 2005-02-09 18:07:17 +00:00
Ruslan Ermilov
a89237ae95 Sync program's usage() with manpage's SYNOPSIS. 2005-02-09 17:37:39 +00:00
Christian S.J. Peron
237d4cef65 Since it is not un-common for a process's resident set size (rss)
to exceed 10 megabytes in size (especially in X), bump the max
column width from 4 bytes to 5. This will make the ps auxw output
uniform again when a process's rss exceeds 10 megs.

It should be noted that when 5 digits becomes to small, other
solutions should be explored such as displaying them in megabytes
or having ps automatically re-size column widths.

Discussed with:	gad
MFC after:	1 week
2005-02-06 16:34:49 +00:00
Alexey Zelkin
2b40ba25cc Use LC_MESSAGES locale category instead of value of LANG environment variable
while opening of tcsh's message catalog.  It gives us more flexibility, and
do not change current behaviour (since we call setlocale() here)

Submitted by:	Rostislav Krasny <rosti_bsd@yahoo.com>
PR:		bin/76773
MFC After:	3 days
2005-02-01 08:48:15 +00:00
Xin LI
c49d3c9bac Remove unnecessary SRCS= where could be guessed directly by our
bsd.*.mk infrasture.

Obtained from:	ru
2005-01-27 14:52:47 +00:00
Xin LI
cc7045ec4c ps(1) is WARNS=6 on all Tier-1 platforms as far as I can test,
so use default WARNS level from bin/Makefile.inc
2005-01-27 13:42:40 +00:00
Xin LI
6984496e54 Don't specify SRCS= when it can be obtained from PROGS= 2005-01-27 13:25:09 +00:00
Xin LI
18ec63de27 WARNS?=6 is already in bin/Makefile.inc, so remove this one. 2005-01-27 13:23:05 +00:00
Suleiman Souhlal
c591aa7413 Remove useless errno.h include.
Approved by:	grehan (mentor)
Obtained from:	DragonFlyBSD
2005-01-26 06:51:28 +00:00
Suleiman Souhlal
3118731323 Remove WARNS?= 6 from Makefile, since it is already in src/bin/Makefile.inc
Requested by:	ru
Approved by:	grehan (mentor)
2005-01-26 06:48:17 +00:00
Suleiman Souhlal
3ac2b17742 - The first argument of getmode() is a void *
- Add WARNS?= 6

Approved by:	stefanf, grehan (mentor)
Obtained from:	DragonFlyBSD
2005-01-25 14:31:19 +00:00
Ruslan Ermilov
462fbe1ec0 De-kerberize the manpage. 2005-01-21 09:31:38 +00:00
Ruslan Ermilov
a866e17077 Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
Ruslan Ermilov
6fca4c7c3f Add the new standard EXIT STATUS section where appropriate.
Sort standard sections in the (documented) preferred order.
2005-01-16 16:41:59 +00:00