From 56598af58cc225cabe2df21e15347738b76fe930 Mon Sep 17 00:00:00 2001 From: embr Date: Thu, 2 Jan 2020 21:20:16 +0000 Subject: [PATCH] Exclude empty lines in output --- ambient | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ambient b/ambient index 3bd1254..d9e1a01 100755 --- a/ambient +++ b/ambient @@ -5,7 +5,12 @@ set -l ambient_path (dirname (status --current-filename)) cd $ambient_path # Accumulate non-empty KEY=VALUE pairs output from subscripts. -set -l environment (./lib/_dispatch_ambient.fish) +for kv in (./lib/_dispatch_ambient.fish) + if test -z "$kv" + continue + end + set -a environment $kv +end # If arguments are given, call it as a command, with ambient data in the environment. if [ (count $argv) -gt 0 ]