plugin-foreign-env icon indicating copy to clipboard operation
plugin-foreign-env copied to clipboard

feature: print output instead of executing

Open kevingriffin opened this issue 5 years ago • 1 comments

This pull requests adds a -p/--print flag to fenv which allows for outputting the set commands generated instead of executing them.

The motivation for this way to move the calls to fenv from shell start time to configuration generation time in nix.

It's a bit expensive to call fenv on every shell launch, but it would be possible to translate the bash environment file once and cache the result as native fish set commands.

kevingriffin avatar Dec 27 '20 02:12 kevingriffin

It occurs to me after some more testing that it's not valid to do interpolation eagerly when computing for use later, so some sort of approach where keys with values that have interpolation in them needs to be implemented in order to insert a transformed interpolation call later. I'll see if I can get that in.

kevingriffin avatar Dec 27 '20 06:12 kevingriffin