Joined June 2012
·

Michel Pavan Macedo

Brazil
·
·

Posted to `rbenv shell` and fish over 1 year ago

@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.

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