Commit Graph

76 Commits

Author SHA1 Message Date
trasz
7ebd53a49f 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
trasz
4b41e850a4 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
trasz
22b8ee88ea 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
trasz
0a9222d31f 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
trasz
8b34d7ca2b 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
trasz
a7031fd325 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
asomers
dae9290985 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
brd
1b4b0dad48 Simplify this Makefile.
Approved by:	bapt (mentor)
2018-06-08 15:05:26 +00:00
eadler
92ff396017 [skel] Remove dot.rhosts from share/skel
The rcmds were removed in r324351. Chase that removal.
2018-05-05 08:16:19 +00:00
eadler
5208acaebb 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
trasz
79072a6617 Cosmetic tweaks to the default shell rc files, mostly comments.
MFC after:	2 weeks
2017-07-05 13:08:07 +00:00
trasz
ea9da27820 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
9f6e5c9cdf 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
da0af25f70 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
bdrewery
b5aa209983 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
sjg
008d7c831f 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
sjg
cead8270d4 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
sjg
75a137820d dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
sjg
65145fa4c8 Merge sync of head 2015-05-27 01:19:58 +00:00
cperciva
adc74e8335 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
sjg
5e568154a0 Merge head 2014-04-28 07:50:45 +00:00
bdrewery
b8219eb2c7 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
sjg
724c99a1c9 We do want objdir 2013-10-13 00:27:34 +00:00
sjg
292ec5d301 Updated dependencies 2013-10-13 00:24:00 +00:00
obrien
3028e3f8ab Sync with HEAD. 2013-02-08 16:10:16 +00:00
eadler
6dd12d609d 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
sjg
778e93c51a Sync from head 2012-11-04 02:52:03 +00:00
bapt
71eb24f36a Change default prompt to show ~ again for the home directory
Submitted by:	flo
Approved by:	eadler
2012-11-04 01:00:35 +00:00
eadler
3d05bb3fd0 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
9dd41e3647 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
eadler
cbb800d0c5 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
564568bfd4 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
f49c0a7c60 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
ru
3c7ac9d092 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
dougb
f858bb2ebb Remove /usr/X11R6 from the path here too.
Reminded by:	Niclas Zeising <niclas.zeising@gmail.com>
2007-05-29 22:07:57 +00:00
ru
cec60429bb Start the dreaded NOFOO -> NO_FOO conversion.
OK'ed by:	core
2004-12-21 08:47:35 +00:00
ru
5db2b9d5b3 For variables that are only checked with defined(), don't provide
any fake value.
2004-10-24 15:33:08 +00:00
ru
3f8ee0c687 Use the standard <bsd.files.mk> API to install files. 2004-01-19 13:40:51 +00:00
rwatson
5aa7458a4a Prefer FreeBSD.org to freebsd.org in mail alias examples. 2003-09-28 16:17:30 +00:00
ru
a8adf98c82 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
jmallett
97bd8b8434 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
ru
cd7c90d38f s/${INSTALL} -c/${INSTALL} ${COPY}/ 2002-07-18 12:07:49 +00:00
mp
f5613e3e9d 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
bd6ce90734 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
ache
5b905e191f Fix ISO_ for new names 2001-06-10 17:08:53 +00:00
archie
e843a87882 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
rwatson
6b95bd725d o Apply asmodai's spelling commit from /etc/root to dot.cshrc in /share/skel
also.
2000-07-15 03:24:18 +00:00
rwatson
ba0bae3b55 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
phantom
5042c98832 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
dcs
ab8c17ad26 Keep fortunes short, so motd won't scroll outside the screen. 1999-12-13 01:05:15 +00:00