From 64218e084ebf94365db0b00662c1acfb99248f40 Mon Sep 17 00:00:00 2001 From: FivePixels Date: Sat, 28 Jan 2023 17:53:08 -0600 Subject: Add env file for sourcing, load dots feature --- .config/fish/functions/envsource.fish | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .config/fish/functions/envsource.fish (limited to '.config/fish/functions/envsource.fish') diff --git a/.config/fish/functions/envsource.fish b/.config/fish/functions/envsource.fish new file mode 100644 index 0000000..dbcce39 --- /dev/null +++ b/.config/fish/functions/envsource.fish @@ -0,0 +1,7 @@ +function envsource + for line in (cat $argv | grep -v '^#' | grep -v '^\s*$') + set item (string split -m 1 '=' $line) + set -gx $item[1] (string trim --chars=\'\" $item[2]) + echo $item[1] + end +end -- cgit v1.2.3