mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
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.
This commit is contained in:
parent
a36ff7d143
commit
4f3e7ddef0
1 changed files with 4 additions and 4 deletions
|
@ -16,25 +16,25 @@ end
|
||||||
function __blender_list_scenes
|
function __blender_list_scenes
|
||||||
blender --background (__blender_echo_input_file_name) --python-expr 'import bpy
|
blender --background (__blender_echo_input_file_name) --python-expr 'import bpy
|
||||||
for scene in bpy.data.scenes:
|
for scene in bpy.data.scenes:
|
||||||
print(f"\t{scene.name}")' |
|
print(f"\t{scene.name}")' 2>/dev/null |
|
||||||
string replace -r -f '^\t' ''
|
string replace -r -f '^\t' ''
|
||||||
end
|
end
|
||||||
|
|
||||||
function __blender_list_texts
|
function __blender_list_texts
|
||||||
blender --background (__blender_echo_input_file_name) --python-expr 'import bpy
|
blender --background (__blender_echo_input_file_name) --python-expr 'import bpy
|
||||||
for text in bpy.data.texts:
|
for text in bpy.data.texts:
|
||||||
print(f"\t{text.name}")' |
|
print(f"\t{text.name}")' 2>/dev/null |
|
||||||
string replace -r -f '^\t' ''
|
string replace -r -f '^\t' ''
|
||||||
end
|
end
|
||||||
|
|
||||||
function __blender_list_engines
|
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
|
end
|
||||||
|
|
||||||
function __blender_list_addons
|
function __blender_list_addons
|
||||||
blender --background --python-expr 'import addon_utils
|
blender --background --python-expr 'import addon_utils
|
||||||
for mod in addon_utils.modules():
|
for mod in addon_utils.modules():
|
||||||
print(f"\t{mod.__name__}")' |
|
print(f"\t{mod.__name__}")' 2>/dev/null |
|
||||||
string replace -r -f '^\t' ''
|
string replace -r -f '^\t' ''
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue