From 4c745b6de00284bd598da3edd1c51b153b207e68 Mon Sep 17 00:00:00 2001 From: xf0r3m Date: Tue, 8 Aug 2023 19:54:09 +0200 Subject: [PATCH] =?utf8?q?Rozpocz=C4=99cie=20tworzenia=20funkcji=20dla=20o?= =?utf8?q?pcji=20pkgsearch=20-=20skypt=20odbioru=20CLI=20idle-clis?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- idle-clis | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/idle-clis b/idle-clis index eabd850..887cdba 100755 --- a/idle-clis +++ b/idle-clis @@ -42,6 +42,16 @@ function ckapropos() { idle-exec-command $containerName apropos $keywords; } +function ckpackage() { + containerName=$1; + package=$2; + case $containerName in + 'alpine') idle-exec-command $containerName "apk search $package"; break;; + 'archlinux') idle-exec-command $containerName "pacman -Ss $package"; break;; + 'debian|kali|ubuntu') idle-exec-command $containerName "apt search $package"; break;; + esac +} + if [ $# -gt 0 ]; then source /usr/local/bin/idle; command=$1; -- 2.39.5