mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-11-20 12:01:12 +00:00
19 lines
297 B
Plaintext
19 lines
297 B
Plaintext
#
|
|
# Displays the path to the Ruby application root directory.
|
|
#
|
|
# Authors:
|
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
|
#
|
|
|
|
local root_dir="$PWD"
|
|
|
|
while [[ "$root_dir" != '/' ]]; do
|
|
if [[ -f "$root_dir/Gemfile" ]]; then
|
|
print "$root_dir"
|
|
break
|
|
fi
|
|
root_dir="$root_dir:h"
|
|
done
|
|
|
|
return 1
|