helm/bin/back
Henrik Lissner edb1173995 Add bin/back
2016-02-26 00:09:39 -05:00

11 lines
220 B
Bash
Executable file

#!/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"