From 50808a9ecf34d0580db17c7a1e89520c09c0eaa4 Mon Sep 17 00:00:00 2001 From: imbytecat Date: Mon, 13 Apr 2026 15:29:13 +0800 Subject: [PATCH] fix: use type -q and stdin for op inject to support WSL interop alias --- home/shell/fish.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home/shell/fish.nix b/home/shell/fish.nix index 4d56387..581c00c 100644 --- a/home/shell/fish.nix +++ b/home/shell/fish.nix @@ -61,8 +61,8 @@ end # 1Password → env vars (single op call, silent if locked) - if command -q op - for line in (op inject -i ~/.config/op/env.tpl 2>/dev/null) + if type -q op; and test -f ~/.config/op/env.tpl + for line in (op inject < ~/.config/op/env.tpl 2>/dev/null) set -l kv (string split -m 1 '=' $line) if test (count $kv) -ge 2 set -gx $kv[1] $kv[2]