Don't run onefetch if you don't have it
This commit is contained in:
parent
a429445a09
commit
d1c4433dda
|
@ -12,7 +12,11 @@ fi
|
||||||
# If directory was just changed to the root of a git repository, print onefetch
|
# If directory was just changed to the root of a git repository, print onefetch
|
||||||
if [ -n "$DIRCHANGED" ]; then
|
if [ -n "$DIRCHANGED" ]; then
|
||||||
if [ -d "$PWD/.git" ]; then
|
if [ -d "$PWD/.git" ]; then
|
||||||
${HOME}/bin/onefetch
|
if [[ "$(which onefetch)" == "" ]]; then
|
||||||
|
echo "This is a git directory, but you don't have 'onefetch' in your PATH"
|
||||||
|
else
|
||||||
|
onefetch
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
unset DIRCHANGED
|
unset DIRCHANGED
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue