Add bin/back

This commit is contained in:
Henrik Lissner 2016-02-26 00:09:39 -05:00
parent 72e389fce7
commit edb1173995

10
bin/back Executable file
View file

@ -0,0 +1,10 @@
#!/usr/bin/env bash
# Jump to a parent directory
dir=$({
_path=$PWD
while [[ -n "$_path" && "$_path" != "/" ]]; do
_path=$(dirname "$_path")
echo "$_path"
done
} | grep -i "$*" | tail -1) && cd "$dir"