From f59178d111333bbb7a496e433b9f9946ce5963d5 Mon Sep 17 00:00:00 2001 From: Rico Ullmann Date: Sat, 5 Jan 2019 19:24:11 +0100 Subject: [PATCH] add ssgep for current systems --- functions/ssgrep.fish | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 functions/ssgrep.fish 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