Commit Graph

76 Commits

Author SHA1 Message Date
Edward Tomasz Napierala
d81ca439e7 Make sh(1) support \u in PS1. This removes one fork/exec on interactive
shell startup.

Reviewed by:	0mp (man page), jilles
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D18790
2019-01-24 11:59:46 +00:00
Edward Tomasz Napierala
ed1cfd30ce Don't mess with BLOCKSIZE in shell startup files - it's set by login.conf(5);
there's no need to even mention it in shell rc files.  Not that it's wrong;
just pointless and somewhat misleading.

Reviewed by:	jilles
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D18809
2019-01-20 22:08:49 +00:00
Edward Tomasz Napierala
4cea05a273 Make sh(1) recognize the default $HOME. By default /home
is a symlink; without this change, when you log in, sh(1)
won't realize the current directory (eg '/usr/home/test')
is the same as $HOME ('/home/test').

Reviewed by:	jilles
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D18775
2019-01-09 11:04:27 +00:00
Edward Tomasz Napierala
488174ba70 Give sh(1) a proper default prompt instead of just "$".
Reviewed by:	jilles
MFC after:	2 weeks
Relnotes:	totally
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D18697
2019-01-06 16:23:28 +00:00
Edward Tomasz Napierala
72e7eb2c64 Add current working directory to the default (although commented out) sh(1)
prompt, so it looks just like the tcsh(1) one when you uncomment it.

Reviewed by:	jilles
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D18673
2018-12-31 10:17:42 +00:00
Edward Tomasz Napierala
f6d3cd4b9e Simplify the way we set the default sh(1) PS1. No functional changes.
Reviewed by:	jilles
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D18662
2018-12-28 17:50:40 +00:00
Alan Somers
47cc9ee1b1 Switch the default pager for most commands to less
Finally, a pager for the nineties.

MFC after:	Never
Relnotes:	Yes
Differential Revision:	https://reviews.freebsd.org/D13465
Poll:		https://reviews.freebsd.org/V7
2018-08-08 19:24:20 +00:00
Brad Davis
dd0878dd7f Simplify this Makefile.
Approved by:	bapt (mentor)
2018-06-08 15:05:26 +00:00
Eitan Adler
02bace8053 [skel] Remove dot.rhosts from share/skel
The rcmds were removed in r324351. Chase that removal.
2018-05-05 08:16:19 +00:00
Eitan Adler
1a1620dc88 skel: Quote PAGER in dot.shrc
PR:		181853
Submitted by:	pl@catslair.org
MFC After:	1 week
2017-12-31 06:58:58 +00:00
Edward Tomasz Napierala
df6744e840 Cosmetic tweaks to the default shell rc files, mostly comments.
MFC after:	2 weeks
2017-07-05 13:08:07 +00:00
Edward Tomasz Napierala
dd0e1324ba Run "resizewin -z" from the default shell profile files. This makes
the terminal work properly out of the box when logging over a serial
line, which is quite important for the user experience on boards like
Raspberry Pi.  It doesn't affect cases where the terminal size is
already non-zero, such as SSH or vt(4) sessions.

Note that this doesn't handle a scenario pointed out by rgrimes@:
when the terminal is resized after login, the terminal size won't
get updated even after logging out and back in.

Reviewed by:	imp
Obtained from:	CheriBSD
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D10642
2017-07-05 10:37:37 +00:00
Jilles Tjoelker
824c5192ba skel: Remove reference to deleted part in previous commit to this file.
Reported by:	Rodney W. Grimes
MFC after:	1 week
2017-01-24 21:07:13 +00:00
Jilles Tjoelker
a04bd58017 skel: Do not set -o emacs in .shrc.
sh has defaulted to 'set -o emacs' since FreeBSD 9.0. Therefore, do not set
this again in .shrc, since that only serves to prevent invocations like
'sh -o vi' and 'sh +o emacs' to have the intended effect.

PR:		215958
Submitted by:	Andras Farkas
MFC after:	1 week
2017-01-15 13:40:14 +00:00
Bryan Drewery
7d8f797b72 Use more appropriate ${SHAREDIR} rather than /usr/share.
MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-10-27 23:35:02 +00:00
Simon J. Gerraty
ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
5b381db8cc Remove NO_OBJ
For meta mode we will want objdirs.

Differential Revision:	D2748
Reviewed by:	brooks imp
2015-06-11 04:22:17 +00:00
Simon J. Gerraty
44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty
98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Colin Percival
11d9aa6707 Step 1 of eliminating the "games" distribution: Move binaries to /usr/bin;
update paths; and include everything in the "base" distribution.

The "games" distribution being optional made sense when there were more
games and we had small disks; but the "games-like" games were moved into
the ports tree a dozen years ago and the remaining "utility-like" games
occupy less than 0.001% of my laptop's small hard drive.  Meanwhile every
new user is confronted by the question "do you want games installed" when
they they try to install FreeBSD.

The next steps will be:

2. Removing punch card (bcd, ppt), phase-of-moon (pom), clock (grdc), and
caesar cipher (caesar, rot13) utilities.  I intend to keep fortune, factor,
morse, number, primes, and random, since there is evidence that those are
still being used.

3. Merging src/games into src/usr.bin.

This change will not be MFCed.

Reviewed by:	jmg
Discussed at:	EuroBSDCon
Approved by:	gjb (release-affecting changes)
2015-02-12 05:35:00 +00:00
Simon J. Gerraty
3b8f084595 Merge head 2014-04-28 07:50:45 +00:00
Bryan Drewery
c0379dbd3e Prefer /etc/login.conf for some of these environment values.
PR:		conf/186085
Reported by:	Glen Neff <glen.neff@emc.com>
MFC after:	2 weeks
Sponsored by:	EMC
2014-04-14 18:07:00 +00:00
Simon J. Gerraty
c8191bc69e We do want objdir 2013-10-13 00:27:34 +00:00
Simon J. Gerraty
34b33809b7 Updated dependencies 2013-10-13 00:24:00 +00:00
David E. O'Brien
d9a447559b Sync with HEAD. 2013-02-08 16:10:16 +00:00
Eitan Adler
01d9852a4d Remove hack to emulate effective uid and just use the EUID's name in the
first place.  I was unaware of this option when originally committing
this change.

Submitted by:	gcooper
Approved by:	cperciva
MFC after:	3 days
2012-12-05 13:56:39 +00:00
Simon J. Gerraty
23090366f7 Sync from head 2012-11-04 02:52:03 +00:00
Baptiste Daroussin
4cbff7a3dc Change default prompt to show ~ again for the home directory
Submitted by:	flo
Approved by:	eadler
2012-11-04 01:00:35 +00:00
Eitan Adler
382dc3ca38 Revert the change that makes less default.
Since I've committed this I've receieved roughly an equal
amount of email thanking me for making this change
and asking me to revert it.

I've resisted making this change because
new users tend to prefer less over more
and these users are the least likely to know
how to change the PAGER on their own.

Requested by:	many
Objected to:	just as many
Decision made by:	core
Approved by:	cperciva
MFC after:	3 days
2012-11-03 14:46:15 +00:00
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Eitan Adler
c11c655c32 Copy recent changes from etc/root/dot.cshrc that make the defaults more
user friendly

Approved by:	cperciva
MFC after:	3 days
2012-04-29 22:29:48 +00:00
Jilles Tjoelker
4ae95455e0 skel/.shrc: Improve commented CDPATH example for POSIX requirements.
POSIX says an empty entry in CDPATH shall not result in the new directory
being printed, while any non-empty entry shall result in the new directory
being printed, including ".". Therefore, the value of CDPATH should almost
always start with a colon, not dot and colon.

Our sh does not print the name for empty entries as well as "." entries.

MFC after:	1 week
2011-06-10 13:47:11 +00:00
Ed Schouten
e42fc36867 Switch the default terminal emulation style to xterm for most platforms.
Right now syscons(4) uses a cons25-style terminal emulator. The
disadvantages of that are:

- Little compatibility with embedded devices with serial interfaces.
- Bad bandwidth efficiency, mainly because of the lack of scrolling
  regions.
- A very hard transition path to support for modern character sets like
  UTF-8.

Our terminal emulation library, libteken, has been supporting
xterm-style terminal emulation for months, so flip the switch and make
everyone use an xterm-style console driver.

I still have to enable this on i386. Right now pc98 and i386 share the
same /etc/ttys file. I'm not going to switch pc98, because it uses its
own Kanji-capable cons25 emulator.

IMPORTANT: What to do if things go wrong (i.e. graphical artifacts):

- Run the application inside script(1), try to reduce the problem and
  send me the log file.
- In the mean time, you can run `vidcontrol -T cons25' and `export
  TERM=cons25' so you can run applications the same way you did before.
  You can also build your kernel with `options TEKEN_CONS25' to make all
  virtual terminals use the cons25 emulator by default.

Discussed on:	current@
2009-11-13 05:54:55 +00:00
Ruslan Ermilov
0c9e0226e3 Add explicit test so that non-existence of /usr/games/fortune
doesn't affect command exit status.
2009-03-27 21:13:14 +00:00
Doug Barton
81c16aec72 Remove /usr/X11R6 from the path here too.
Reminded by:	Niclas Zeising <niclas.zeising@gmail.com>
2007-05-29 22:07:57 +00:00
Ruslan Ermilov
e653b48c80 Start the dreaded NOFOO -> NO_FOO conversion.
OK'ed by:	core
2004-12-21 08:47:35 +00:00
Ruslan Ermilov
a35d88931c For variables that are only checked with defined(), don't provide
any fake value.
2004-10-24 15:33:08 +00:00
Ruslan Ermilov
98159625c4 Use the standard <bsd.files.mk> API to install files. 2004-01-19 13:40:51 +00:00
Robert Watson
b1fe12236c Prefer FreeBSD.org to freebsd.org in mail alias examples. 2003-09-28 16:17:30 +00:00
Ruslan Ermilov
d2893b161b Drop support for COPY, -c has been the default mode of install(1)
for a long time now.

Approved by:	bde
2002-07-29 09:40:17 +00:00
Juli Mallett
698f822d6d Turn on emacs line editing mode by default, as this is what most shells do
these days, and the average user expects ^A and arrow keys to work, however
if they know nothing of editing modes, they will think sh(1) just sucks.  It
is likely that because of defaults on most systems and with most shells that
anyone who actually wants vi(1) editing mode will have 'set -o vi'.  This
won't affect existing accounts, this way, of course.  Only accounts with
.shrc from new etc/skel will be affected.  This is much better than making
the change in sh(1).
2002-07-23 12:28:16 +00:00
Ruslan Ermilov
0b87f79976 s/${INSTALL} -c/${INSTALL} ${COPY}/ 2002-07-18 12:07:49 +00:00
Mark Peek
c4e0f575d3 Synchronize path with dot.cshrc by adding /usr/local/sbin.
PR:             26720
Submitted by:   Rob Simmons <rsimmons@wumpus.wlcg.com>
MFC after:	1 week
2002-07-07 00:00:54 +00:00
Nik Clayton
9f1f5e8d53 Automatically exec bash at startup if it exists^U Turn on the display of
tips from the freebsd-tips database at login time.
2001-06-25 20:40:02 +00:00
Andrey A. Chernov
f615cc2b81 Fix ISO_ for new names 2001-06-10 17:08:53 +00:00
Archie Cobbs
ed3ebc7c4d Add these key bindings for tcsh users in interactive mode:
bindkey "^W" backward-delete-word
    bindkey -k up history-search-backward
    bindkey -k down history-search-forward

Reviewed by:    -current
2001-01-10 17:35:28 +00:00
Robert Watson
ab56179d5b o Apply asmodai's spelling commit from /etc/root to dot.cshrc in /share/skel
also.
2000-07-15 03:24:18 +00:00
Robert Watson
bddc1909cf o Migrate path, umask from dot.login to dot.cshrc
o Comment out display of fortune by default.
o Synch root's .cshrc/.login and non-root's .cshrc/.login in terms of
  gratuitous variables set (EDITOR).
o Remove some commented out variables set inconsistently or gratuitously,
  such as Interviews settings, 8-bit German locale for root only.
o Synchronize comments in header, as well as references to appropriate man
  pages.
o Remove MANPATH setting as apparently /etc/manpath.config does all that
  already.

Similar changes probably need to be made in other dot.* files for root
and skel, as all of these files seem to set different aliases, environmental
variables, prompts, and have different semantics.

As a result of this patch, leaving aside the setting of a special prompt
for root, users of csh and tcsh should find similar environments when
logging in or su'ing to any account using that shell.

Reviewed by:	asmodai, nbm, will
2000-03-25 20:23:39 +00:00
Alexey Zelkin
b2d28ca479 Comment out explicit MANPATH setting.
(BTW, it's very bad practice to have MANPATH environment variable set)

PR:		conf/14487
Submitted by:	Norihiko Ishitani <nori@tlab.is.uec.ac.jp>
1999-12-21 17:18:19 +00:00
Daniel C. Sobral
07b5ccc39d Keep fortunes short, so motd won't scroll outside the screen. 1999-12-13 01:05:15 +00:00