From d85c40ca3aa6cec8d88a5914913fe2f8f319db21 Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Sun, 26 Jan 2014 15:42:50 -0500 Subject: [PATCH] Aliases imported and cleansed. --- tcshrc | 28 +++++++++++++++++--- tcshrc.alias | 0 tcshrc.aliases | 69 +++++++++++++++++++++++++++++++++++++++++++++++++ tcshrc.bindkeys | 17 ++++++++++++ 4 files changed, 111 insertions(+), 3 deletions(-) delete mode 100644 tcshrc.alias create mode 100644 tcshrc.aliases create mode 100644 tcshrc.bindkeys diff --git a/tcshrc b/tcshrc index 83bdfbe..4bda0ad 100644 --- a/tcshrc +++ b/tcshrc @@ -35,7 +35,7 @@ if( $?CSHENV_DEBUG ) then endif - +bindkey -v #The history size for your shell can be set globally now @@ -53,6 +53,9 @@ if( $?CSHENV_DEBUG ) then echo "Tcsh safe-source alias constructed..." endif + +safe_source ${CSHENV_DIR}/tcshrc.conf + # Dispatch to find out what our OS is and any fixups # This will figure out what system we're on and setup all # system specific notions. From the sourced file, @@ -63,15 +66,34 @@ endif source ${CSHENV_DIR}/tcshrc.system if( $?CSHENV_DEBUG ) then - echo "Trying to source tcshrc.alias" + echo "Trying to source tcshrc.aliases" endif -source ${CSHENV_DIR}/tcshrc.alias +source ${CSHENV_DIR}/tcshrc.aliases if( $?CSHENV_DEBUG ) then echo "Trying to source tcshrc.prompt" endif source ${CSHENV_DIR}/tcshrc.prompt +if( $?CSHENV_DEBUG ) then + echo "Trying to source tcshrc.bindkeys" +endif +source ${CSHENV_DIR}/tcshrc.bindkeys + +if( $?CSHENV_DEBUG ) then + echo "Trying to source tcshrc.${CSHENV_SYSTEM}" +endif +safe_source ${CSHENV_DIR}/tcshrc.${CSHENV_SYSTEM} + +if( $?CSHENV_DEBUG ) then + echo "Trying to source tcshrc.${CSHENV_HOSTNAME}" +endif +safe_source ${CSHENV_DIR}/tcshrc.${CSHENV_HOSTNAME} + +if( $?CSHENV_ORGANIZATION ) then + safe_source ${CSHENV_DIR}/tcshrc.${CSHENV_ORGANIZATION} +endif + ########################### # vim: ft=tcsh ########################### diff --git a/tcshrc.alias b/tcshrc.alias deleted file mode 100644 index e69de29..0000000 diff --git a/tcshrc.aliases b/tcshrc.aliases new file mode 100644 index 0000000..d87fdb5 --- /dev/null +++ b/tcshrc.aliases @@ -0,0 +1,69 @@ +#Classic UNIXy aliases + +#Dir motion +alias pd pushd +alias pu pushd +alias po popd + +#Standard ls aliases that I use: +alias ll l -l +alias la l -a +alias li l -i + +#standard long ls aliases that I use +alias llh l -lh +alias lli ll -i +alias llhi llh -i +alias llih llhi + +#{I derive lla from ll, not la, because it's a long ls, similarly for llA} +alias lla ll -a +alias lla ll -A + +alias llha llh -a +alias llah llha + +alias llhia llhi -a +alias llahi llhia +alias lliah llahi +alias lliha llahi +alias llaih llahi +alias llhai llahi + +alias lt l -t +alias llt ll -t + +#alias mkdir mkdir -p +alias md mkdir +alias rd rmdir + +alias . pwd + +#Job control aliases TODO: Update these for arguments + +alias , jobs +alias = "%&" +alias + "%%" +alias - stop + + +#More specific aliases + +alias show set + +alias lh l -sh + +# Detect and activate vim, if present +if( -f `which vim` ) then + alias vi vim + setenv EDITOR vim + setenv VISUAL vim +endif + +safe_source ${CSHENV_DIR}/tcshrc.aliases.${CSHENV_SYSTEM} +safe_source ${CSHENV_DIR}/tcshrc.aliases.${CSHENV_HOSTNAME} +safe_source ${CSHENV_DIR}/tcshrc.aliases.user + +########################### +# vim:filetype=tcsh +########################### diff --git a/tcshrc.bindkeys b/tcshrc.bindkeys new file mode 100644 index 0000000..f047f9c --- /dev/null +++ b/tcshrc.bindkeys @@ -0,0 +1,17 @@ +############################ +### TCSH Bindkey scripts ### +############################ + +## Vi keybindings by default +bindkey -v + +if( $?CSHENV_BINDKEY_CHOICE ) then + bindkey $CSHENV_BINDKEY_CHOICE +endif + + +bindkey ^G list-choices + +########################### +# vim:filetype=tcsh +###########################