Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Feb 2012 00:27:46 -0300
From:      Gonzalo Nemmi <gnemmi@gmail.com>
To:        freebsd-current Current <freebsd-current@freebsd.org>
Cc:        Chris Rees <crees@freebsd.org>, Eitan Adler <lists@eitanadler.com>, "Wojciech A. Koszek" <wkoszek@freebsd.czest.pl>, Colin Percival <cperciva@freebsd.org>
Subject:   Re: Enhancing the user experience with tcsh
Message-ID:  <CAH8WUyucVk7V%2Bm9rzY6_Pq9z2jd8iNESZ8DCV5PGyGW_H1yACw@mail.gmail.com>
In-Reply-To: <CAF6rxgnebQUY8azv8fovQPkB%2BGgsQjaByZ6JwnNWjrM1hB65eQ@mail.gmail.com>
References:  <CAF6rxgnebQUY8azv8fovQPkB%2BGgsQjaByZ6JwnNWjrM1hB65eQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Feb 9, 2012 at 9:52 PM, Eitan Adler <lists@eitanadler.com> wrote:
> In conf/160689 (http://www.freebsd.org/cgi/query-pr.cgi?pr=3D160689)
> there has been some discussion about changing the default cshrc file.
>
> I'd like to commit something like the following based on Chris's patch
> at the end of the thread. This post is an attempt to open the change
> to wider discussion.
>
> commit dbe6cb730686dd53af7d06cc9b69b60e6e55549c
> diff --git a/etc/root/dot.cshrc b/etc/root/dot.cshrc
> --- a/etc/root/dot.cshrc
> +++ b/etc/root/dot.cshrc
> @@ -7,9 +7,10 @@
>
> =A0alias h =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0history 25
> =A0alias j =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0jobs -l
> -alias la =A0 =A0 =A0 ls -a
> +alias la =A0 =A0 =A0 ls -aF
> =A0alias lf =A0 =A0 =A0 ls -FA
> -alias ll =A0 =A0 =A0 ls -lA
> +alias ll =A0 =A0 =A0 ls -lAF
> +alias ls =A0 =A0 =A0 ls -F
>
> =A0# A righteous umask
> =A0umask 22
> @@ -17,19 +18,24 @@ umask 22
> =A0set path =3D (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin
> /usr/local/bin $HOME/bin)
>
> =A0setenv EDITOR =A0vi
> -setenv PAGER =A0 more
> +setenv PAGER =A0 less
> =A0setenv BLOCKSIZE =A0 =A0 =A0 K
>
> =A0if ($?prompt) then
> =A0 =A0 =A0 =A0# An interactive shell -- set some stuff up
> =A0 =A0 =A0 =A0set prompt =3D "`/bin/hostname -s`# "
> =A0 =A0 =A0 =A0set filec
> - =A0 =A0 =A0 set history =3D 100
> - =A0 =A0 =A0 set savehist =3D 100
> + =A0 =A0 =A0 set history =3D 10000
> + =A0 =A0 =A0 set savehist =3D 10000
> + =A0 =A0 =A0 set autolist
> + =A0 =A0 =A0 # Use history to aid expansion
> + =A0 =A0 =A0 set autoexpand
> =A0 =A0 =A0 =A0set mail =3D (/var/mail/$USER)
> =A0 =A0 =A0 =A0if ( $?tcsh ) then
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bindkey "^W" backward-delete-word
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bindkey -k up history-search-backward
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bindkey -k down history-search-forward
> =A0 =A0 =A0 =A0endif
> + =A0 =A0 =A0 set prompt =3D "[%n@%m]%c04%# "
> + =A0 =A0 =A0 set promptchars =3D "%#"
> =A0endif
>

In the same line that Wojciech on the PR ".cshrc should be updated for
modern hardware" I always set this ones on /usr/share/skel/dot.cshrc

bindkey "\e[1~" beginning-of-line #make Home key work;
bindkey "\e[2~" overwrite-mode #make Ins key work;
bindkey "\e[3~" delete-char #make Delete key work;
bindkey "\e[4~" end-of-line #make End key work;

Besides that I add an "if [ -d $HOME/bin ]" and add it to $PATH if it
exists, but that has nothing to do with ".cshrc should be updated for
modern hardware" ... it jsut comes in really handy.

my 2 cents



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAH8WUyucVk7V%2Bm9rzY6_Pq9z2jd8iNESZ8DCV5PGyGW_H1yACw>