toolbox: capture_output durch stdout=PIPE ersetzt (fzf-Kompatibilitaet)
fzf zeichnet die UI ueber stderr. capture_output=True piped auch stderr, wodurch fzf auf aelteren Versionen (0.44, Debian) haengt. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
831fe62de7
commit
7d35a2cd7a
1 changed files with 2 additions and 2 deletions
|
|
@ -775,7 +775,7 @@ def fzf_run(items: list[str], extra_args: list[str]) -> str | None:
|
||||||
_FZF_BASE + extra_args,
|
_FZF_BASE + extra_args,
|
||||||
input="\n".join(items),
|
input="\n".join(items),
|
||||||
text=True,
|
text=True,
|
||||||
capture_output=True,
|
stdout=subprocess.PIPE,
|
||||||
)
|
)
|
||||||
return result.stdout.strip() if result.returncode == 0 and result.stdout.strip() else None
|
return result.stdout.strip() if result.returncode == 0 and result.stdout.strip() else None
|
||||||
|
|
||||||
|
|
@ -787,7 +787,7 @@ def fzf_run_keyed(items: list[str], extra_args: list[str],
|
||||||
_FZF_BASE + [f"--expect={expect}"] + extra_args,
|
_FZF_BASE + [f"--expect={expect}"] + extra_args,
|
||||||
input="\n".join(items),
|
input="\n".join(items),
|
||||||
text=True,
|
text=True,
|
||||||
capture_output=True,
|
stdout=subprocess.PIPE,
|
||||||
)
|
)
|
||||||
if result.returncode != 0 or not result.stdout.strip():
|
if result.returncode != 0 or not result.stdout.strip():
|
||||||
return ("", None)
|
return ("", None)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue