mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-22 04:51:12 +02:00
fix: Useing 'type' instad of 'which', which is more robust
For reference, see: https://stackoverflow.com/questions/592620/check-if-a-program-exists-from-a-bash-script.
This commit is contained in:
parent
accdcb2f1c
commit
6eb836dd44
1 changed files with 1 additions and 1 deletions
|
|
@ -10,7 +10,7 @@ TEXT_COLOR="\e[0;35m"
|
||||||
COLON_COLOR="\e[0;35m"
|
COLON_COLOR="\e[0;35m"
|
||||||
END_COLOR="\e[m"
|
END_COLOR="\e[m"
|
||||||
|
|
||||||
if [[ -x `which curl` ]]; then
|
if $(type curl > /dev/null); then
|
||||||
function quote()
|
function quote()
|
||||||
{
|
{
|
||||||
Q=$(curl -s --connect-timeout 2 "http://www.quotationspage.com/random.php3" | iconv -c -f ISO-8859-1 -t UTF-8 | grep -m 1 "dt ")
|
Q=$(curl -s --connect-timeout 2 "http://www.quotationspage.com/random.php3" | iconv -c -f ISO-8859-1 -t UTF-8 | grep -m 1 "dt ")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue