From 4f3e7ddef03671dcdae8db7234f1e80709312e71 Mon Sep 17 00:00:00 2001 From: Damien Picard Date: Wed, 3 Jan 2024 11:49:29 +0100 Subject: [PATCH] Completions: fix Blender completions when it prints to stderr Some of the completions recently introduced called Blender itself to query some arguments, and Blender sometimes prints messages to stderr. This output was not filtered, resulting in the shell printing irrelevant messages during completion. --- share/completions/blender.fish | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/completions/blender.fish b/share/completions/blender.fish index 41d5c373d..1073bd66c 100644 --- a/share/completions/blender.fish +++ b/share/completions/blender.fish @@ -16,25 +16,25 @@ end function __blender_list_scenes blender --background (__blender_echo_input_file_name) --python-expr 'import bpy for scene in bpy.data.scenes: - print(f"\t{scene.name}")' | + print(f"\t{scene.name}")' 2>/dev/null | string replace -r -f '^\t' '' end function __blender_list_texts blender --background (__blender_echo_input_file_name) --python-expr 'import bpy for text in bpy.data.texts: - print(f"\t{text.name}")' | + print(f"\t{text.name}")' 2>/dev/null | string replace -r -f '^\t' '' end function __blender_list_engines - blender --background --engine help | string replace -r -f '^\t' '' + blender --background --engine help 2>/dev/null | string replace -r -f '^\t' '' end function __blender_list_addons blender --background --python-expr 'import addon_utils for mod in addon_utils.modules(): - print(f"\t{mod.__name__}")' | + print(f"\t{mod.__name__}")' 2>/dev/null | string replace -r -f '^\t' '' end