From 8bb53d1e0ea2dc09945618ef3af5da09f7fd7e8d Mon Sep 17 00:00:00 2001 From: kappa Date: Sat, 2 May 2026 08:30:56 +0900 Subject: [PATCH] =?UTF-8?q?fish:=20GITEA=5FTOKEN=20=EB=A1=9C=EB=93=9C?= =?UTF-8?q?=EB=A5=BC=20interactive=20shell=EB=A1=9C=20=ED=95=9C=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit statusline 등 non-interactive fish가 매 호출마다 security CLI를 실행해 macOS 키체인 권한 다이얼로그가 반복적으로 뜨던 문제 수정. Linux 분기와 동일한 set -q 가드로 통일. --- fish/.config/fish/config.fish | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/fish/.config/fish/config.fish b/fish/.config/fish/config.fish index 167c8f2..78f426e 100644 --- a/fish/.config/fish/config.fish +++ b/fish/.config/fish/config.fish @@ -80,20 +80,27 @@ set -Ux EDITOR nvim # ══════════════════════════════════════════════════════════════════ if test "$__os" = Darwin - # macOS: keychain에서 Gitea 토큰 로드 - set -gx GITEA_TOKEN (security find-internet-password -s gitea.inouter.com -a kaffa -w 2>/dev/null) # macOS: Lima 기반 컨테이너 alias docker "limactl shell docker -- docker" alias podman "limactl shell podman -- podman" alias ss='netstat -an' else if test "$__os" = Linux - # Linux: 환경변수 또는 vault에서 Gitea 토큰 로드 - if not set -q GITEA_TOKEN - set -gx GITEA_TOKEN (vault kv get -field=api_token secret/apps/gitea 2>/dev/null || echo "") - end alias ss='ss -tulnp' end +# Gitea 토큰: interactive shell에서만 로드. +# (statusline/script 등 non-interactive fish가 매번 키체인을 두드려 +# macOS에서 권한 다이얼로그가 뜨는 문제 방지) +if status is-interactive + if not set -q GITEA_TOKEN + if test "$__os" = Darwin + set -gx GITEA_TOKEN (security find-internet-password -s gitea.inouter.com -a kaffa -w 2>/dev/null) + else if test "$__os" = Linux + set -gx GITEA_TOKEN (vault kv get -field=api_token secret/apps/gitea 2>/dev/null || echo "") + end + end +end + # ══════════════════════════════════════════════════════════════════ # Claude Code tmux 단축키 # ══════════════════════════════════════════════════════════════════