From 4712d8bb300e60dc6fb89c59a8f4f3aedba10988 Mon Sep 17 00:00:00 2001 From: Alison Watson Date: Mon, 5 Aug 2019 19:20:51 -0400 Subject: [PATCH] fish: check for dict and shuf before doing fish_greeting --- scripts/fish/prompt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/fish/prompt b/scripts/fish/prompt index 0177ef2..5db1f6a 100644 --- a/scripts/fish/prompt +++ b/scripts/fish/prompt @@ -13,12 +13,14 @@ function fish_right_prompt end function fish_greeting - set_color c50ed2 + if test -f /usr/share/dict/words && test (what shuf) + set_color c50ed2 - echo "Word of the moment: "(shuf -n1 /usr/share/dict/words) | - awk -f $_agw_dir_scripts/text/mid.awk col=$COLUMNS + echo "Word of the moment: "(shuf -n1 /usr/share/dict/words) | + awk -f $_agw_dir_scripts/text/mid.awk col=$COLUMNS - set_color normal + set_color normal + end end ## EOF