Skip to content

Commit

Permalink
fix(completions): add newline before error message
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Mar 16, 2024
1 parent 6cca2bb commit bbbafad
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/complete/bash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ pub fn complete_bash(bin: &str, usage_cmd: &str) -> String {
r#"
_{bin}() {{
if ! command -v usage &> /dev/null; then
echo "Error: usage not found. This is required for completions to work in {bin}. https://usage.jdx.dev" >&2
echo >&2
echo "Error: usage CLI not found. This is required for completions to work in {bin}." >&2
echo "See https://usage.jdx.dev for more information." >&2
return 1
fi
Expand Down
4 changes: 3 additions & 1 deletion src/complete/fish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ pub fn complete_fish(bin: &str, usage_cmd: &str) -> String {
r#"
# if "usage" is not installed show an error
if ! command -v usage &> /dev/null
echo "Error: usage not found. This is required for completions to work in {bin}. https://usage.jdx.dev" >&2
echo >&2
echo "Error: usage CLI not found. This is required for completions to work in {bin}." >&2
echo "See https://usage.jdx.dev for more information." >&2
return 1
end
Expand Down
4 changes: 3 additions & 1 deletion src/complete/zsh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ _{bin}() {{
local curcontext="$curcontext" spec cache_policy
if ! command -v usage &> /dev/null; then
echo "Error: usage not found. This is required for completions to work in {bin}. https://usage.jdx.dev" >&2
echo >&2
echo "Error: usage CLI not found. This is required for completions to work in {bin}." >&2
echo "See https://usage.jdx.dev for more information." >&2
return 1
fi
Expand Down

0 comments on commit bbbafad

Please sign in to comment.