diff options
author | Brad Davis <brd@FreeBSD.org> | 2018-08-15 14:41:24 +0000 |
---|---|---|
committer | Brad Davis <brd@FreeBSD.org> | 2018-08-15 14:41:24 +0000 |
commit | b26c7f7fee919c6697b3e218c73f3f7ddd646177 (patch) | |
tree | b2e631b8f76eefdb6c28e397c9716ea934b5754f /bin/csh | |
parent | fa68430df2302b31bba7a6a0bd06a13a178852ad (diff) | |
download | src-b26c7f7fee919c6697b3e218c73f3f7ddd646177.tar.gz src-b26c7f7fee919c6697b3e218c73f3f7ddd646177.zip |
Notes
Diffstat (limited to 'bin/csh')
-rw-r--r-- | bin/csh/Makefile | 15 | ||||
-rw-r--r-- | bin/csh/csh.cshrc | 3 | ||||
-rw-r--r-- | bin/csh/csh.login | 15 | ||||
-rw-r--r-- | bin/csh/csh.logout | 3 | ||||
-rw-r--r-- | bin/csh/dot.cshrc | 43 | ||||
-rw-r--r-- | bin/csh/dot.login | 12 |
6 files changed, 90 insertions, 1 deletions
diff --git a/bin/csh/Makefile b/bin/csh/Makefile index 128ba5b19ab0..2e54483721ab 100644 --- a/bin/csh/Makefile +++ b/bin/csh/Makefile @@ -8,6 +8,11 @@ .include <src.opts.mk> +CONFGROUPS= ETC ROOT +ETC= csh.cshrc csh.login csh.logout +ROOT= dot.cshrc +ROOTDIR= /root +ROOTNAME= .cshrc PACKAGE=runtime TCSHDIR= ${SRCTOP}/contrib/tcsh .PATH: ${TCSHDIR} @@ -44,7 +49,8 @@ MLINKS= csh.1 tcsh.1 LIBADD= termcapw crypt -LINKS= ${BINDIR}/csh ${BINDIR}/tcsh +LINKS= ${BINDIR}/csh ${BINDIR}/tcsh \ + /root/.cshrc /.cshrc CLEANFILES= ${GENHDRS} gethost csh.1 @@ -148,4 +154,11 @@ tc.const.h: tc.const.c sh.char.h config.h config_f.h sh.types.h sh.err.h ${BUILD sort >> ${.TARGET} @echo '#endif /* _h_tc_const */' >> ${.TARGET} +beforeinstall: + rm -f ${DESTDIR}/.cshrc + +afterinstallconfig: + sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd + pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd + .include <bsd.prog.mk> diff --git a/bin/csh/csh.cshrc b/bin/csh/csh.cshrc new file mode 100644 index 000000000000..f4f775ae6ada --- /dev/null +++ b/bin/csh/csh.cshrc @@ -0,0 +1,3 @@ +# $FreeBSD$ +# +# System-wide .cshrc file for csh(1). diff --git a/bin/csh/csh.login b/bin/csh/csh.login new file mode 100644 index 000000000000..283c6d4fddbc --- /dev/null +++ b/bin/csh/csh.login @@ -0,0 +1,15 @@ +# $FreeBSD$ +# +# System-wide .login file for csh(1). +# Uncomment this to give you the default 4.2 behavior, where disk +# information is shown in K-Blocks +# setenv BLOCKSIZE K +# +# For the setting of languages and character sets please see +# login.conf(5) and in particular the charset and lang options. +# For full locales list check /usr/share/locale/* +# +# Check system messages +# msgs -q +# Allow terminal messages +# mesg y diff --git a/bin/csh/csh.logout b/bin/csh/csh.logout new file mode 100644 index 000000000000..6b0584f49984 --- /dev/null +++ b/bin/csh/csh.logout @@ -0,0 +1,3 @@ +# $FreeBSD$ +# +# System-wide .logout file for csh(1). diff --git a/bin/csh/dot.cshrc b/bin/csh/dot.cshrc new file mode 100644 index 000000000000..1fcc9917f0f9 --- /dev/null +++ b/bin/csh/dot.cshrc @@ -0,0 +1,43 @@ +# $FreeBSD$ +# +# .cshrc - csh resource script, read at beginning of execution by each shell +# +# see also csh(1), environ(7). +# more examples available at /usr/share/examples/csh/ +# + +alias h history 25 +alias j jobs -l +alias la ls -aF +alias lf ls -FA +alias ll ls -lAF + +# A righteous umask +umask 22 + +set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin $HOME/bin) + +setenv EDITOR vi +setenv PAGER less +setenv BLOCKSIZE K + +if ($?prompt) then + # An interactive shell -- set some stuff up + set prompt = "%N@%m:%~ %# " + set promptchars = "%#" + + set filec + set history = 1000 + set savehist = (1000 merge) + set autolist = ambiguous + # Use history to aid expansion + set autoexpand + set autorehash + set mail = (/var/mail/$USER) + if ( $?tcsh ) then + bindkey "^W" backward-delete-word + bindkey -k up history-search-backward + bindkey -k down history-search-forward + endif + +endif diff --git a/bin/csh/dot.login b/bin/csh/dot.login new file mode 100644 index 000000000000..8d87604f4f7d --- /dev/null +++ b/bin/csh/dot.login @@ -0,0 +1,12 @@ +# $FreeBSD$ +# +# .login - csh login script, read by login shell, after `.cshrc' at login. +# +# See also csh(1), environ(7). +# + +# Query terminal size; useful for serial lines. +if ( -x /usr/bin/resizewin ) /usr/bin/resizewin -z + +# Uncomment to display a random cookie on each login. +# if ( -x /usr/bin/fortune ) /usr/bin/fortune -s |