summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.bashrc25
1 files changed, 20 insertions, 5 deletions
diff --git a/.bashrc b/.bashrc
index 653efa2..942a38b 100644
--- a/.bashrc
+++ b/.bashrc
@@ -15,12 +15,29 @@ HISTCONTROL=ignoreboth
PROMPT_COMMAND='(history -a)'
PS1='\[\033[01;34m\]\u@\h\[\033[00m\]:\[\033[01;36m\]\w\[\033[00m\]\$ '
+# op(t)inioned commands
alias mc='LESS="-RSX" mc'
alias tmux='tmux -2'
+# debug, etc.
+alias hist-del-last='history -d $(history 1 | cut -d" " -f2)' # historical NOOP
+
+# proper aliases
alias gmy="pushd ~/wrkspc/gmy >/dev/null"
alias gwork="pushd ~/wrkspc/gwork >/dev/null"
+
+# debug, etc.
+
+debug-argsep () {
+ while [ $# -ne 0 ]; do
+ echo $1;
+ shift
+ done
+}
+
+# proper functions
+
cdup () {
local up="."
for i in $(seq 1 $1); do up+="/.."; done
@@ -45,9 +62,7 @@ ack-intersection () {
comm <(ack -al --follow "Topic" | sort) <(ack -al --follow "news" | sort) -12
}
-debug-argsep () {
- while [ $# -ne 0 ]; do
- echo $1;
- shift
- done
+hist-grep () {
+ hist-del-last # omit hist-grep invocation
+ grep $* -- ~/.bash_history
}