fish: add envsource function for exporting environment variables

This commit is contained in:
Leonardo Eugênio 2025-11-23 02:56:59 -03:00
parent 510c5d9f05
commit 6892829a35

View file

@ -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";