Compare commits
1 Commits
2e5b8aef8a
...
7b549f01e5
Author | SHA1 | Date | |
---|---|---|---|
7b549f01e5 |
@ -66,8 +66,8 @@ _autoenv_exit() {
|
||||
_autoenv_entered[${_autoenv_entered[(i)$entered]}]=()
|
||||
}
|
||||
|
||||
# Find a directory containing a .enter file by searching up the directory tree
|
||||
# starting in the current directory.
|
||||
# Find all directories containing a .enter file by searching up the directory
|
||||
# tree starting in the current directory.
|
||||
_autoenv_find_enter_directories() {
|
||||
local current=$PWD
|
||||
# If an enter script is found in the current directory, return it.
|
||||
@ -78,7 +78,8 @@ _autoenv_find_enter_directories() {
|
||||
local next=$current/..; local next=${next:A}
|
||||
# If an enter script is found in the current directory, return it.
|
||||
[ -f $next/.enter ] && echo $next
|
||||
# If the current directory equals the next directory, return.
|
||||
# If the current directory equals the next directory we are done, otherwise
|
||||
# update the current directory.
|
||||
[[ $current == $next ]] && return || local current=$next
|
||||
done
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user