diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2014-06-16 10:30:42 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2014-06-16 10:30:42 +1200 |
commit | e6ebc4616c07c40e8add2064016f7809cef18a02 (patch) | |
tree | c002039a2a69e0c0e2a5394dfc07680fb50400b4 /bash/bashrc.d/scr.bash | |
parent | HTTPS version of site (diff) | |
download | dotfiles-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.bash | 6 |
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)" +} + |