mirror of
https://github.com/liclac/ambient
synced 2024-11-22 03:43:19 +00:00
Exclude empty lines in output
This commit is contained in:
parent
24f1ccd0ea
commit
56598af58c
1 changed files with 6 additions and 1 deletions
7
ambient
7
ambient
|
@ -5,7 +5,12 @@ set -l ambient_path (dirname (status --current-filename))
|
||||||
cd $ambient_path
|
cd $ambient_path
|
||||||
|
|
||||||
# Accumulate non-empty KEY=VALUE pairs output from subscripts.
|
# 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 arguments are given, call it as a command, with ambient data in the environment.
|
||||||
if [ (count $argv) -gt 0 ]
|
if [ (count $argv) -gt 0 ]
|
||||||
|
|
Loading…
Reference in a new issue