Tcsh: Difference between revisions
From Leo's Notes
This page was last edited on 29 April 2013, at 08:13.
Created page with "An alternative c-shell == Configuration == The .tcshrc file defines the tcsh configuration. An example file follows: # .tcshrc # User specific aliases and functions ..." |
mNo edit summary |
||
| Line 45: | Line 45: | ||
bindkey "\e[4~" end-of-line # End | bindkey "\e[4~" end-of-line # End | ||
bindkey "\e[8~" end-of-line # End rxvt | bindkey "\e[8~" end-of-line # End rxvt | ||
[[Category:Linux]] | |||
Revision as of 08:13, 29 April 2013
An alternative c-shell
Configuration
The .tcshrc file defines the tcsh configuration. An example file follows:
# .tcshrc # User specific aliases and functions alias rm 'rm -i' alias cp 'cp -i' alias mv 'mv -i' set prompt = "%m:%~ %h# " set histfile = ~/.tcsh_history set autolist bindkey "\e[1~" beginning-of-line # Home bindkey "\e[7~" beginning-of-line # Home rxvt bindkey "\e[2~" overwrite-mode # Ins bindkey "\e[3~" delete-char # Delete bindkey "\e[4~" end-of-line # End bindkey "\e[8~" end-of-line # End rxvt
Issues
The following things are covered by the example file above, but are covered in a little more detail.
Auto Completion
The tab key will by default not do anything, unless the following line is in your tcshrc file:
set autolist
History Logging
Similar to the .bash_history file in bash, you can tell tcsh to log your commands in a file by adding the following to your tcshrc file:
set histfile = ~/.tcsh_history
Remapping Home,End,Delete Keys in tcsh
Add the following to your tcshrc file:
bindkey "\e[1~" beginning-of-line # Home bindkey "\e[7~" beginning-of-line # Home rxvt bindkey "\e[2~" overwrite-mode # Ins bindkey "\e[3~" delete-char # Delete bindkey "\e[4~" end-of-line # End bindkey "\e[8~" end-of-line # End rxvt