aboutsummaryrefslogblamecommitdiff
path: root/bash/bash_profile.d/fortune.bash
blob: deb2e79fa5a00e32e33d22ac086a26835f10fdb1 (plain) (tree)
1
2
3
4
5
6
7
8




                                                                       
                                                         

      
# If interactive shell and fortune(6) installed, print a short fortune
if [[ $- == *i* ]] && hash fortune 2>/dev/null ; then (
    if [[ -d "$HOME"/.local/share/games/fortunes ]] ; then
        FORTUNE_PATH=${FORTUNE_PATH:-$HOME/.local/share/games/fortunes}
    fi
    fortune -sn "${FORTUNE_MAXSIZE:-768}" "$FORTUNE_PATH"
) ; fi