mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +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
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue