Skip to content

Commit

Permalink
Merge pull request #1 from matthewess/master
Browse files Browse the repository at this point in the history
Get array index more better
  • Loading branch information
dgrant authored Feb 5, 2020
2 parents 46664d9 + 7712fa2 commit b1ddfa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion init.fish
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function autovenv --on-variable PWD -d "Automatic activation of Python virtual e
set -l _tree "$PWD/."
set -l _done false
while true
set _tree (string split -r -m 1 -n '/' "$_tree" | select 1)
set _tree (string split -r -m 1 -n '/' "$_tree")[1]
if ! string match -q -- "/*" $_tree
# This is a hack to stop when we have ascended all the way up to the top of the tree.
# The string split command above eventually returns something like "home" when it tries
Expand Down

0 comments on commit b1ddfa3

Please sign in to comment.