aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/scr.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2014-06-16 10:30:42 +1200
committerTom Ryder <tom@sanctum.geek.nz>2014-06-16 10:30:42 +1200
commite6ebc4616c07c40e8add2064016f7809cef18a02 (patch)
treec002039a2a69e0c0e2a5394dfc07680fb50400b4 /bash/bashrc.d/scr.bash
parentHTTPS version of site (diff)
downloaddotfiles-e6ebc4616c07c40e8add2064016f7809cef18a02.tar.gz
dotfiles-e6ebc4616c07c40e8add2064016f7809cef18a02.zip
Function for easy scratch tempdirs
Diffstat (limited to 'bash/bashrc.d/scr.bash')
-rw-r--r--bash/bashrc.d/scr.bash6
1 files changed, 6 insertions, 0 deletions
diff --git a/bash/bashrc.d/scr.bash b/bash/bashrc.d/scr.bash
new file mode 100644
index 00000000..e8b6b58a
--- /dev/null
+++ b/bash/bashrc.d/scr.bash
@@ -0,0 +1,6 @@
+# Create a temporary directory and change into it, to stop me putting stray
+# files into $HOME, and making the system do cleanup for me
+scr() {
+ pushd -- "$(mktemp -d)"
+}
+