diff --git a/user/fish/default.nix b/user/fish/default.nix index dd28030..2c04ca6 100644 --- a/user/fish/default.nix +++ b/user/fish/default.nix @@ -35,6 +35,14 @@ in set_color normal bind \cy 'commandline | wl-copy -n' + + function envsource + for line in (cat $argv | grep -v '^#' | grep -v '^\s*$' | sed -e 's/=/ /' -e "s/'//g" -e 's/"//g' ) + set export (string split ' ' $line) + set -gx $export[1] $export[2] + echo "Exported key $export[1]" + end + end ''; shellAliases = { rm = "trash";