From 424b01c6372b89bd407ec127cbb416a3515560a6 Mon Sep 17 00:00:00 2001 From: Deposite Pirate Date: Wed, 2 Apr 2025 05:54:18 +0200 Subject: Rename shcmds -> lscmd --- functions/lscmd.fish | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++ functions/shcmds.fish | 57 --------------------------------------------------- 2 files changed, 57 insertions(+), 57 deletions(-) create mode 100644 functions/lscmd.fish delete mode 100644 functions/shcmds.fish diff --git a/functions/lscmd.fish b/functions/lscmd.fish new file mode 100644 index 0000000..c75b654 --- /dev/null +++ b/functions/lscmd.fish @@ -0,0 +1,57 @@ +function shcmds --description "View installed useful command line programs" + +if not functions -q is-installed + echo "No is-installed function defined." + return 1 +end + +set -f compress 'libarchive' 'bzip3' 'p7zip' 'unrar' +set -f crypt 'age' +set -f shell 'exa' 'tmux' 'walk' 'moar' 'most' 'fcp' 'b3sum' +set -f editor 'neovim' 'micro' 'nano' +set -f file 'mc' 'nnn' +set -f bin 'hexyl' +set -f text 'bat' 'ripgrep' 'sd' 'ugrep' 'grex' 'since' 'difftastic' 'vbindiff' +set -f sys 'htop' 'btop' 'duf' 'ncdu' 'procs' +set -f sec 'hashcat' +set -f img 'viu' 'timg' +set -f markdown 'glow' 'mdcat' +set -f db 'csview' 'textql' +set -f dev 'strace' 'lurk' +set -f www 'links' +set -f mail 'aerc' +set -f gopher 'ncgopher' +set -f gemini 'clagrange' 'amfora' 'ncgopher' +set -f tox 'toxic' +set -f ftp 'lftp' +set -f http 'curlie' 'xh' 'hurl' +set -f mirror 'wget' 'gemget' 'httrack' 'crawley' +set -f dns 'doggo' 'dog' +set -f netmon 'bandwhich' 'iftop' 'netscanner' 'trippy' +set -f netsec 'nmap' 'ngrep' 'rustscan' +set -f sync 'rsync' +set -f man 'tldr' +set -f sound 'sox' 'mp3gain' +set -f graphics 'graphicsmagick' +set -f xorg 'xdotool' 'yank' + +set -f -a mul $img $sound $graphics +set -f -a net $www $mail $gopher $gemini $tox $ftp $http $mirror $dns $netmon $netsec +set -f -a all $net $mul $compress $crypt $shell $editor $file $bin $text $sys $sec $markdown $db $dev $sync $man $xorg + +for element in (string join0 $all | sort -z | uniq -z | string split0) + if is-installed $element + set_color green + printf $element + set_color normal + else + set_color red + printf $element + set_color normal + end + printf ' ' +end + +printf '\n' + +end diff --git a/functions/shcmds.fish b/functions/shcmds.fish deleted file mode 100644 index c75b654..0000000 --- a/functions/shcmds.fish +++ /dev/null @@ -1,57 +0,0 @@ -function shcmds --description "View installed useful command line programs" - -if not functions -q is-installed - echo "No is-installed function defined." - return 1 -end - -set -f compress 'libarchive' 'bzip3' 'p7zip' 'unrar' -set -f crypt 'age' -set -f shell 'exa' 'tmux' 'walk' 'moar' 'most' 'fcp' 'b3sum' -set -f editor 'neovim' 'micro' 'nano' -set -f file 'mc' 'nnn' -set -f bin 'hexyl' -set -f text 'bat' 'ripgrep' 'sd' 'ugrep' 'grex' 'since' 'difftastic' 'vbindiff' -set -f sys 'htop' 'btop' 'duf' 'ncdu' 'procs' -set -f sec 'hashcat' -set -f img 'viu' 'timg' -set -f markdown 'glow' 'mdcat' -set -f db 'csview' 'textql' -set -f dev 'strace' 'lurk' -set -f www 'links' -set -f mail 'aerc' -set -f gopher 'ncgopher' -set -f gemini 'clagrange' 'amfora' 'ncgopher' -set -f tox 'toxic' -set -f ftp 'lftp' -set -f http 'curlie' 'xh' 'hurl' -set -f mirror 'wget' 'gemget' 'httrack' 'crawley' -set -f dns 'doggo' 'dog' -set -f netmon 'bandwhich' 'iftop' 'netscanner' 'trippy' -set -f netsec 'nmap' 'ngrep' 'rustscan' -set -f sync 'rsync' -set -f man 'tldr' -set -f sound 'sox' 'mp3gain' -set -f graphics 'graphicsmagick' -set -f xorg 'xdotool' 'yank' - -set -f -a mul $img $sound $graphics -set -f -a net $www $mail $gopher $gemini $tox $ftp $http $mirror $dns $netmon $netsec -set -f -a all $net $mul $compress $crypt $shell $editor $file $bin $text $sys $sec $markdown $db $dev $sync $man $xorg - -for element in (string join0 $all | sort -z | uniq -z | string split0) - if is-installed $element - set_color green - printf $element - set_color normal - else - set_color red - printf $element - set_color normal - end - printf ' ' -end - -printf '\n' - -end -- cgit v1.3.1