X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=dot%2Fbashrc;fp=dot%2Fbashrc;h=a173c4b6fb8ac8b9a989e4e4d2db02fc153fa410;hb=301b097027d4f4a6ae99782bada75587db5d299b;hp=0000000000000000000000000000000000000000;hpb=bfecc94125841b9f04e8321974d5c2eaa5032d54;p=ian-dotfiles.git diff --git a/dot/bashrc b/dot/bashrc new file mode 100644 index 0000000..a173c4b --- /dev/null +++ b/dot/bashrc @@ -0,0 +1,33 @@ +# Ian Jackson's shell rc + +if [ "x$TRNINIT" = x ]; then + . $HOME/.configs/setenvir +fi + +hostname_completion_file=~/.hosts + +export PWD + +# My own functions +ls() { /bin/ls -FC "$@"; } +ll() { /bin/ls -FCla "$@"; } +setprompt() { + if [ "x$SCHROOT_SESSION_ID" = x ]; then + PS1=`autotitle`; export PS1; + fi + } +rs() { eval `/usr/openwin/bin/resize` ; setprompt ; } +cd() { builtin cd "$@"; setprompt; } +pu() { builtin pushd "$@"; setprompt; } +po() { builtin popd "$@"; setprompt; } + +# Set up history and prompt +if [ "$PS1" ] +then + HISTFILE=$HOME/.history/$HOST~$$~ + AUTOTITLE_STDOUT="%?u%U%!%?g(%G)%!%?u@%!%h:%d1~.> " + AUTOTITLE_WINDOW="%h - %d~. %Y.[U..[M..[D./..%X.L]..M]..R]./.. %U%?G(%G)%!" + AUTOTITLE_ICON="%h: %d3~. %Y.[U..[M..[D./..%X.L]..M]..R]./.." + export AUTOTITLE_STDOUT AUTOTITLE_WINDOW AUTOTITLE_ICON + setprompt +fi