mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-06-14 21:51:42 +00:00
Standardized error messages.
This commit is contained in:
@ -30,11 +30,11 @@ if [[ -n "$url" ]]; then
|
||||
"$BROWSER" "$url"
|
||||
return 0
|
||||
else
|
||||
print "fatal: Browser not set or set to a non-existent browser." >&2
|
||||
print "$0: browser not set or set to a non-existent browser" >&2
|
||||
return 1
|
||||
fi
|
||||
else
|
||||
print "fatal: Not a Git repository or origin remote not set." >&2
|
||||
print "$0: not a Git repository or remote origin not set" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
@ -64,7 +64,7 @@ function _git-info-abort() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
cat > /dev/stderr <<END
|
||||
cat >&2 <<EOF
|
||||
|
||||
|
||||
Gathering status for certain repositories is time intensive.
|
||||
@ -74,7 +74,7 @@ for this repository.
|
||||
To revert, execute:
|
||||
git-info on
|
||||
|
||||
END
|
||||
EOF
|
||||
|
||||
unset _git_info_executing
|
||||
git config --bool prompt.showinfo false
|
||||
@ -156,7 +156,7 @@ function git-info() {
|
||||
elif [[ "$1" == [Oo][Ff][Ff] ]]; then
|
||||
git config --bool prompt.showinfo false
|
||||
else
|
||||
print "Usage: $0 [ on | off ]"
|
||||
print "usage: $0 [ on | off ]" >&2
|
||||
fi
|
||||
return 0
|
||||
fi
|
||||
|
Reference in New Issue
Block a user