Skip to content

Instantly share code, notes, and snippets.

@angstbear
Last active January 30, 2023 02:48
Show Gist options
  • Select an option

  • Save angstbear/a0499e955ecf282c06c4a7dd9cb8bd35 to your computer and use it in GitHub Desktop.

Select an option

Save angstbear/a0499e955ecf282c06c4a7dd9cb8bd35 to your computer and use it in GitHub Desktop.

Revisions

  1. angstbear revised this gist Apr 30, 2019. No changes.
  2. angstbear revised this gist Apr 30, 2019. 1 changed file with 12 additions and 12 deletions.
    24 changes: 12 additions & 12 deletions fish_greeting.fish
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,10 @@
    function fish_greeting
    if not which fortune > /dev/null ^ /dev/null
    switch (uname)
    if not which fortune > /dev/null ^ /dev/null
    switch (uname)
    case Darwin
    echo Installing fortune and cowsay
    brew install fortune
    sudo gem install lolcat
    sudo gem install lolcat
    case Linux
    echo Installing fortune and cowsay
    if which apt-get > /dev/null ^ /dev/null
    @@ -14,15 +14,15 @@ function fish_greeting
    end
    case '*'
    echo Wait ... where are we\? (uname), eh
    end
    end
    end

    set -l toon (random choice {default,bud-frogs,dragon,dragon-and-cow,elephant,moose,stegosaurus,tux,vader})
    if which lolcat > /dev/null ^ /dev/null
    fortune -s | cowsay -f $toon | lolcat
    else if which fortune > /dev/null ^ /dev/null
    fortune -s | cowsay -f $toon
    else
    echo Something fishy going on around here ...
    end
    set -l toon (random choice {default,bud-frogs,dragon,dragon-and-cow,elephant,moose,stegosaurus,tux,vader})
    if which lolcat > /dev/null ^ /dev/null
    fortune -s | cowsay -f $toon | lolcat
    else if which fortune > /dev/null ^ /dev/null
    fortune -s | cowsay -f $toon
    else
    echo Something fishy going on around here ...
    end
    end
  3. angstbear revised this gist Apr 30, 2019. 1 changed file with 24 additions and 22 deletions.
    46 changes: 24 additions & 22 deletions fish_greeting.fish
    Original file line number Diff line number Diff line change
    @@ -1,26 +1,28 @@
    function fish_greeting
    if not which fortune > /dev/null ^ /dev/null
    switch (uname)
    case Darwin
    echo Installing fortune and cowsay
    brew install fortune cowsay
    case Linux
    echo Installing fortune and cowsay
    if which apt-get > /dev/null ^ /dev/null
    sudo apt-get install fortune cowsay
    else
    sudo yum install fortune cowsay
    if not which fortune > /dev/null ^ /dev/null
    switch (uname)
    case Darwin
    echo Installing fortune and cowsay
    brew install fortune
    sudo gem install lolcat
    case Linux
    echo Installing fortune and cowsay
    if which apt-get > /dev/null ^ /dev/null
    sudo apt-get install fortune cowsay
    else
    sudo yum install fortune cowsay
    end
    case '*'
    echo Wait ... where are we\? (uname), eh
    end
    case '*'
    echo Wait ... where are we\? (uname), eh
    end
    end
    set -l toon bud-frogs
    if which lolcat > /dev/null ^ /dev/null
    fortune -s | cowsay -f $toon | lolcat
    else if which fortune > /dev/null ^ /dev/null
    fortune -s | cowsay -f $toon
    else
    echo Something fishy going on around here ...
    end

    set -l toon (random choice {default,bud-frogs,dragon,dragon-and-cow,elephant,moose,stegosaurus,tux,vader})
    if which lolcat > /dev/null ^ /dev/null
    fortune -s | cowsay -f $toon | lolcat
    else if which fortune > /dev/null ^ /dev/null
    fortune -s | cowsay -f $toon
    else
    echo Something fishy going on around here ...
    end
    end
  4. angstbear revised this gist May 12, 2016. No changes.
  5. angstbear created this gist May 12, 2016.
    26 changes: 26 additions & 0 deletions fish_greeting.fish
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    function fish_greeting
    if not which fortune > /dev/null ^ /dev/null
    switch (uname)
    case Darwin
    echo Installing fortune and cowsay
    brew install fortune cowsay
    case Linux
    echo Installing fortune and cowsay
    if which apt-get > /dev/null ^ /dev/null
    sudo apt-get install fortune cowsay
    else
    sudo yum install fortune cowsay
    end
    case '*'
    echo Wait ... where are we\? (uname), eh
    end
    end
    set -l toon bud-frogs
    if which lolcat > /dev/null ^ /dev/null
    fortune -s | cowsay -f $toon | lolcat
    else if which fortune > /dev/null ^ /dev/null
    fortune -s | cowsay -f $toon
    else
    echo Something fishy going on around here ...
    end
    end