Code Snippets fish

Short texts fish 🧑‍💻 Code snippets fish ✍️ Reading lists fish 👀

fish fn to delete multiple keys in a redis at once

function redis-del set cmd (status current-command) set _flag_host ‘localhost’ set _flag_port ‘6379’ set _flag_db ‘0’ argparse ‘help’ ‘h/host=’ ‘p/port=’ ‘n/db=’ — $argv if test -n “$_flag_help” -o -z “$argv” test -z “$argv”; and echo -e “missing key!\n” echo “delete multiple keys in a redis at once” echo echo “syntax: $cmd [–options] key” echo echo “+—options—+—alternative—+–default—-+” […]

fish function syntax error

function brew –description “catch common misspelling & add some goodies” if test -f /usr/local/bin/brew # REF: # thank you @faho switch “$argv[1]” case echo “the $argv[2] tap provides the following formula”; echo “=================================” # echo “$argv[2]” # DEBUG if type -q jq # TODO: split line across multiple lines more gracefully command brew […]