Joined June 2012
·
Posted to
`rbenv shell` and fish
over 1 year
ago
@hauleth It is not in the creation that the error happens, but in the switch. It doesn't matter if the variable exists or is empty because the variable is expanded and the result is a switch call without arguments. If you enclose it in quotes, like you did in the rbenv_shell function then you have one argument that happens to be empty. ;D
Thanks for this. It is great. Have you considered submitting it to oh-my-fish?
Achievements
68 Karma
0 Total ProTip Views

Forked
Have a project valued enough to be forked by someone else

Raven
Have at least one original repo where some form of shell script is the dominant language

Charity
Fork and commit to someone's open source project in need

Walrus
The walrus is no stranger to variety. Use at least 4 different languages throughout all your repos

Mongoose 3
Have at least three original repos where Ruby is the dominant language

Mongoose
Have at least one original repo where Ruby is the dominant language

Kona
Have at least one original repo where CoffeeScript is the dominant language
@hauleth Ok, one more problem: You are returning 1 after --unset. Also, unless I am misunderstanding the way return and switch work on fish, empty returns don't seem necessary since they are each the last command of the function.