bash: add t function
authorAmin Bandali <bandali@gnu.org>
Wed, 4 Dec 2019 03:11:52 +0000 (22:11 -0500)
committerAmin Bandali <bandali@gnu.org>
Wed, 4 Dec 2019 03:11:52 +0000 (22:11 -0500)
.bashrc

diff --git a/.bashrc b/.bashrc
index 6b4d476..b38f7ea 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -87,6 +87,10 @@ aur() {
    cd ${1}
 }
 
    cd ${1}
 }
 
+function t {
+  cd $(mktemp -d /tmp/$1.XXXX)
+}
+
 # separate alias definitions file, if exists
 if [ -f ~/.bash_aliases ]; then
     . ~/.bash_aliases
 # separate alias definitions file, if exists
 if [ -f ~/.bash_aliases ]; then
     . ~/.bash_aliases