Skip to content

Instantly share code, notes, and snippets.

@Fishrock123
Last active February 19, 2024 05:54
Show Gist options
  • Save Fishrock123/c9274955cb0ead6a2d2c2b0717170e21 to your computer and use it in GitHub Desktop.
Save Fishrock123/c9274955cb0ead6a2d2c2b0717170e21 to your computer and use it in GitHub Desktop.
from_bash_env.nu
def from_bash_env [$input] { $input | str replace -amr '(&&)|(\r\n)|\n|;' "\n" | lines -s | str trim | parse "export {name}='{value}'" | transpose -ird }
# from_bash-env (your commands) | load-env
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment