From c7cb6f1f196507b8446e9058ecc36a232f2a54a4 Mon Sep 17 00:00:00 2001 From: Niccolo Borgioli Date: Wed, 25 May 2022 16:38:43 +0200 Subject: [PATCH] posix source --- files/fish/functions/posix-source.fish | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 files/fish/functions/posix-source.fish diff --git a/files/fish/functions/posix-source.fish b/files/fish/functions/posix-source.fish new file mode 100644 index 0000000..1830430 --- /dev/null +++ b/files/fish/functions/posix-source.fish @@ -0,0 +1,8 @@ +function posix-source + for i in (cat $argv) + if test (echo $i | sed -E 's/^[[:space:]]*(.).+$/\\1/g') != "#" + set arr (string split -m1 = $i) + set -gx $arr[1] $arr[2] + end + end +end