#!/usr/bin/env bash # TODO: Use aerc instead # Stubbornly translates ~/.exportenvs to ~/.exportenvs.fish echo "" > ~/.exportenvs.fish # clear the file while read fileline; do line=$(echo "$fileline" | sed 's/#. sed 's/export //' | sed 's/#\.\+//') if [ -z "$line" ]; then echo "Adding '$fileline' as-is" echo "$fileline" >> ~/.exportenvs.fish continue fi tline=$(echo "$line" | sed 's/=/ /') echo Adding "$tline" echo "set -x $tline" >> ~/.exportenvs.fish done < ~/.exportenvs