oh-my-fish / plugin-foreign-env

Run foreign bash scripts and capture exported environment variables
MIT License
221 stars 15 forks source link

fix: ignore BASH internal variables #30

Closed gagbo closed 1 year ago

gagbo commented 1 year ago

Bash uses BASH_... internals that aren't valid variables, like BASH_FUNC_module%% for guix related functions.

gagbo commented 1 year ago

Without the fix, I get errors like

set: BASH_FUNC_ml%%: invalid variable name. See `help identifiers`

~/.config/fish/fisher/functions/fenv.main.fish (ligne 34) :
      set -gx $kv
      ^
in function 'fenv.main' with arguments 'source /home/gagbo/.guix-profile/etc/profile'
        appelé à la ligne 27 du fichier '~/.config/fish/fisher/functions/fenv.fish'
in function 'fenv' with arguments 'source /home/gagbo/.guix-profile/etc/profile'
...