提交 241be2d2 编写于 作者: R Robin Daugherty

Fix rand-quote failure when site is unreachable

This plugin was designed so that if there is any failure, it will simply call itself recursively. Which means that if you were working offline, if `quote` was called in your `.zshrc`, you would be unable to open a new terminal session.

I fixed this by allowing the plugin to output nothing if a quote could not be fetched.
上级 192de6bc
......@@ -18,8 +18,8 @@ if [[ -x `which curl` ]]; then
W=$(echo "$Q" | sed -e 's/.*\/quotes\///g' -e 's/<.*//g' -e 's/.*">//g')
if [ "$W" -a "$TXT" ]; then
echo "${WHO_COLOR}${W}${COLON_COLOR}: ${TEXT_COLOR}${TXT}${END_COLOR}"
else
quote
# else
# quote
fi
}
#quote
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册