projects
/
scripts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3b92216
)
Added the ua (unarchive) shortcut + an option in selector-history.
author
Francois Fleuret
<francois@fleuret.org>
Tue, 14 Jun 2011 06:51:45 +0000
(08:51 +0200)
committer
Francois Fleuret
<francois@fleuret.org>
Tue, 14 Jun 2011 06:51:45 +0000
(08:51 +0200)
bashrc
patch
|
blob
|
history
diff --git
a/bashrc
b/bashrc
index
6b4d7bb
..
2d0f111
100644
(file)
--- a/
bashrc
+++ b/
bashrc
@@
-159,6
+159,33
@@
function bak () {
done
}
done
}
+function ua () {
+ while [[ "$1" ]]; do
+
+ case "$1" in
+
+ *.tgz|*.tar.gz)
+ tar zxvf "$1"
+ ;;
+
+ *.rar)
+ unrar x "$1"
+ ;;
+
+ *.zip)
+ unzip "$1"
+ ;;
+
+ *)
+ echo "Unknown file extension $1"
+ ;;
+ esac
+
+ shift
+
+ done
+}
+
# Create a dir and cd there
function mcd () {
# Create a dir and cd there
function mcd () {
@@
-801,7
+828,7
@@
alias finddup='finddup -p'
# git clone http://fleuret.org/git/selector/
function selector-history () {
# git clone http://fleuret.org/git/selector/
function selector-history () {
- selector --bash -c 7,4,0,3 -q <(history)
+ selector --bash -
u -
c 7,4,0,3 -q <(history)
}
# M-r puts the selected history line in place of the current one
}
# M-r puts the selected history line in place of the current one