You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One potential issue I noticed: Fish complains about areturn from non-function in a translated file containing environment variables that was intended to be sourced by Bash. In Bash return is used for returning from functions and from files being sourced, but in Fish, exit is used. We can't change from return to exit in the sourced Bash file because it exits the shell that's sourcing, unlike fish.
Since source statements are translated by inserting calls to babelfish, maybe a -source option could be introduced indicating the Bash input should have top-level returns converted to exits? Then source statements could be translated by inserting calls to babelfish -source?
What do you think? Thanks!
The text was updated successfully, but these errors were encountered:
Hi, thanks for your work on this project!
One potential issue I noticed: Fish complains about a
return
from non-function in a translated file containing environment variables that was intended to be sourced by Bash. In Bashreturn
is used for returning from functions and from files beingsource
d, but in Fish,exit
is used. We can't change fromreturn
toexit
in the sourced Bash file because it exits the shell that's sourcing, unlikefish
.Since
source
statements are translated by inserting calls tobabelfish
, maybe a-source
option could be introduced indicating the Bash input should have top-levelreturn
s converted toexit
s? Thensource
statements could be translated by inserting calls tobabelfish -source
?What do you think? Thanks!
The text was updated successfully, but these errors were encountered: