Skip to content

Commit 73b91d7

Browse files
keelan542desyncr
authored andcommitted
Redirected error messages to stderr (#149)
1 parent a06a4c7 commit 73b91d7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/plugin.zsh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,21 @@ geometry_plugin_setup() {
2020
# Registers a plugin
2121
geometry_plugin_register() {
2222
if [[ $# -eq 0 ]]; then
23-
echo "Error: Missing argument."
23+
>&2 echo "Error: Missing argument."
2424
return 1
2525
fi
2626

2727
local plugin=$1
2828
# Check plugin wasn't registered before
2929
if [[ ! $_GEOMETRY_PROMPT_PLUGINS[(r)$plugin] == "" ]]; then
30-
echo "Warning: Plugin $plugin already registered."
30+
>&2 echo "Warning: Plugin $plugin already registered."
3131
return 1
3232
fi
3333

3434
# Check plugin has been sourced
3535
local plugin_setup_function="geometry_prompt_${plugin}_setup"
3636
if [[ $+functions[$plugin_setup_function] == 0 ]]; then
37-
echo "Error: Plugin $plugin not available."
37+
>&2 echo "Error: Plugin $plugin not available."
3838
return 1
3939
fi
4040

@@ -48,7 +48,7 @@ geometry_plugin_unregister() {
4848
local plugin=$1
4949
# Check plugin is registered
5050
if [[ $_GEOMETRY_PROMPT_PLUGINS[(r)$plugin] == "" ]]; then
51-
echo "Error: Plugin $plugin not registered."
51+
>&2 echo "Error: Plugin $plugin not registered."
5252
return 1
5353
fi
5454

0 commit comments

Comments
 (0)