diff --git a/functions/ssgrep.fish b/functions/ssgrep.fish new file mode 100644 index 0000000..791ff7a --- /dev/null +++ b/functions/ssgrep.fish @@ -0,0 +1,16 @@ +function ssgrep --description 'show open ports for $argv' + switch (count $argv) + + case 0 + echo -e "No argument given!\nDo you expect me to guess what you're looking for?" + return 1 + + case 1 + ss -tlpn | grep $argv + + case \* + echo "Only 1 argument is valid!" + return 1 + + end +end