Skip to content

Instantly share code, notes, and snippets.

@rahim
Created January 25, 2016 12:42
Show Gist options
  • Save rahim/e378937f72a345267e3b to your computer and use it in GitHub Desktop.
Save rahim/e378937f72a345267e3b to your computer and use it in GitHub Desktop.
Time based default dir smarts
dayofweek=`date +%u` # Monday is 1
hourofday=`date +%H`
if test $dayofweek -lt 6 -a $hourofday -gt 8 -a $hourofday -lt 19
then
(hostname | grep koto > /dev/null 2>&1) && cd ~/working/litmus
fi
# Nice idea, but doesn't play well with my iTerm config for default dirs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment