Created
March 20, 2015 09:55
-
-
Save chanux/5c7da348e7aeda9f471d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fish port of Marcin Kulik's newscratch script | |
# Read more and fin \d bash/zsh scripts here: | |
# http://www.ku1ik.com/2012/05/04/scratch-dir.html | |
function new-scratch | |
set cur_dir "$HOME/scratch" | |
set dir_suffix (date +'%s') | |
set new_dir "$HOME/tmp/scratch-$dir_suffix" | |
mkdir -p $new_dir | |
ln -nfs $new_dir $cur_dir | |
cd $cur_dir | |
echo "New scratch dir ready for grinding ;>" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment