diff --git a/functions/gip.fish b/functions/gip.fish index 19cbd91..cc73b11 100644 --- a/functions/gip.fish +++ b/functions/gip.fish @@ -14,6 +14,8 @@ # EXAMPLE # gip function gip --description 'Show all public IP addresses' + __fish_help_header (status current-function) $argv; and return 0 + echo -n "IPv4: " curl -4 -s --max-time 2 https://icanhazip.com || echo "Not detected" echo -n "IPv6: " diff --git a/functions/gip4.fish b/functions/gip4.fish index 9a71d1f..5431be4 100644 --- a/functions/gip4.fish +++ b/functions/gip4.fish @@ -13,5 +13,7 @@ # EXAMPLE # gip4 function gip4 --wraps='curl' --description 'Get public IPv4 address' + __fish_help_header (status current-function) $argv; and return 0 + curl -4 -s https://icanhazip.com end diff --git a/functions/gip6.fish b/functions/gip6.fish index 735ffc6..52ca05c 100644 --- a/functions/gip6.fish +++ b/functions/gip6.fish @@ -21,6 +21,8 @@ # EXAMPLE # gip6 function gip6 --description 'Get public IPv6 address' + __fish_help_header (status current-function) $argv; and return 0 + # Use -6 to force IPv6 and --fail to catch network errors set -l ip (curl -6 -s --fail https://icanhazip.com 2>/dev/null) diff --git a/functions/ports.fish b/functions/ports.fish index 19c0e57..6836c2c 100644 --- a/functions/ports.fish +++ b/functions/ports.fish @@ -14,5 +14,7 @@ # EXAMPLE # ports function ports --wraps='sudo' --description 'Show active network listeners' + __fish_help_header (status current-function) $argv; and return 0 + sudo lsof -iTCP -sTCP:LISTEN -P -n end diff --git a/functions/sbver.fish b/functions/sbver.fish index b9a807d..87d7965 100644 --- a/functions/sbver.fish +++ b/functions/sbver.fish @@ -24,6 +24,8 @@ # sbver # sbver --brief function sbver --description 'Verifies Secure Boot status of EFI binaries using sbctl' + __fish_help_header (status current-function) $argv; and return 0 + if not type -q sbctl echo "Error: 'sbctl' is not installed." return 1 diff --git a/functions/steam-dl.fish b/functions/steam-dl.fish index 3c4395d..7c7ab1c 100644 --- a/functions/steam-dl.fish +++ b/functions/steam-dl.fish @@ -14,6 +14,8 @@ # EXAMPLE # steam-dl function steam-dl --description 'Run Steam while inhibiting system sleep' + __fish_help_header (status current-function) $argv; and return 0 + echo "Inhibiting sleep while Steam downloads..." systemd-inhibit --why="Active Download" --who="User" --what=idle:sleep steam end diff --git a/functions/swapstat.fish b/functions/swapstat.fish index 55a26fe..f379d4c 100644 --- a/functions/swapstat.fish +++ b/functions/swapstat.fish @@ -15,6 +15,8 @@ # EXAMPLE # swapstat function swapstat --description 'View colorized zRAM and swappiness status' + __fish_help_header (status current-function) $argv; and return 0 + set -l swappiness (sysctl -n vm.swappiness) set -l zdata (zramctl --bytes --noheadings --output DATA,TOTAL /dev/zram0 2>/dev/null)