From 14d653cd09c1fe44732f7e5a3e3b068d47c07ed4 Mon Sep 17 00:00:00 2001 From: Tony Duckles Date: Tue, 1 Nov 2011 21:27:06 -0500 Subject: [PATCH] .bashrc: Ack pager, ppush, MOTD --- .bashrc | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/.bashrc b/.bashrc index 2bc377c..82c8247 100644 --- a/.bashrc +++ b/.bashrc @@ -96,7 +96,11 @@ export LANG LANGUAGE LC_CTYPE LC_ALL # ignore backups, CVS directories, python bytecode, vim swap files FIGNORE="~:CVS:#:.pyc:.swp:.swa:apache-solr-*" + +# history stuff HISTCONTROL=ignoreboth +HISTFILESIZE=10000 +HISTSIZE=10000 # ---------------------------------------------------------------------- # PAGER / EDITOR @@ -121,6 +125,10 @@ else fi export PAGER MANPAGER +# Ack +ACK_PAGER="$PAGER" +ACK_PAGER_COLOR="$PAGER" + # ---------------------------------------------------------------------- # PROMPT # ---------------------------------------------------------------------- @@ -233,8 +241,7 @@ test -z "$BASH_COMPLETION" && { } # override and disable tilde expansion -_expand() -{ +_expand() { return 0 } @@ -340,6 +347,9 @@ prm () { eval "${2:-PATH}='$(pls $2 |grep -v "^$1\$" |tr '\n' :)'"; } # Shift onto the beginning of PATH or environment variable . punshift () { eval "${2:-PATH}='$1:$(eval echo \$${2:-PATH})'"; } +# Usage: ppush [] +ppush () { eval "${2:-PATH}='$(eval echo \$${2:-PATH})':$1"; } + # Usage: puniq [] # Remove duplicate entries from a PATH style value while retaining # the original order. Use PATH if no is given. @@ -368,4 +378,15 @@ MANPATH=$(puniq $MANPATH) test -n "$PS1" && prompt_color +# ------------------------------------------------------------------- +# MOTD / FORTUNE +# ------------------------------------------------------------------- + +test -n "$INTERACTIVE" -a -n "$LOGIN" && { + echo " --" + uname -npsr + uptime + echo " --" +} + # vim: ts=4 sts=4 shiftwidth=4 expandtab -- 2.45.2