From: xf0r3m Date: Tue, 26 May 2026 11:55:03 +0000 (+0200) Subject: Próba wdrożenia bash-completion dla narzędzi autorskich immudex cz.2 X-Git-Url: https://gitweb.morketsmerke.org/?a=commitdiff_plain;h=107a94c1d15fee62bf26439288f6b9d2a5bcc3fc;p=immudex.git Próba wdrożenia bash-completion dla narzędzi autorskich immudex cz.2 --- diff --git a/tools/completions/immudex-branch b/tools/completions/immudex-branch index 23eeafa..05104b9 100644 --- a/tools/completions/immudex-branch +++ b/tools/completions/immudex-branch @@ -1,4 +1,4 @@ -# immudex-branch completion -*- shell-script -*- +#!/bin/bash idx_simple_options_complete() { @@ -13,7 +13,7 @@ idx_simple_options_complete() return 0; fi return 0; -} && - complete -F idx_simple_options_complete immudex-branch +} + +complete -F idx_simple_options_complete immudex-branch -# ex: filetype=sh diff --git a/tools/completions/immudex-cdrip b/tools/completions/immudex-cdrip index 811bf6d..c2666d7 100644 --- a/tools/completions/immudex-cdrip +++ b/tools/completions/immudex-cdrip @@ -1,4 +1,5 @@ -# immudex-cdrip completion -*- shell-script -*- +#!/bin/bash + idx_cdrip_complete() { local cur; @@ -11,7 +12,6 @@ idx_cdrip_complete() { return 0; fi return 0; -} && - complete -F idx_cdrip_complete immudex-cdrip +} -# ex: filetype=sh +complete -F idx_cdrip_complete immudex-cdrip diff --git a/tools/completions/immudex-create-media b/tools/completions/immudex-create-media index 5e7be89..7e8e13e 100644 --- a/tools/completions/immudex-create-media +++ b/tools/completions/immudex-create-media @@ -1,4 +1,4 @@ -# immudex-create-media completion -*- shell-script -*- +#!/bin/bash disk_list() { i=0; @@ -32,7 +32,6 @@ idx_create_media_complete() { esac fi return 0 -} && - complete -F idx_create_media_complete immudex-create-media +} -# ex: filetype=sh +complete -F idx_create_media_complete immudex-create-media diff --git a/tools/completions/immudex-crypt b/tools/completions/immudex-crypt index a4f5de9..e1b2d62 100644 --- a/tools/completions/immudex-crypt +++ b/tools/completions/immudex-crypt @@ -1,4 +1,4 @@ -# immudex-crypt completion -*- shell-script -*- +#!/bin/bash return_ic_index() { echo -n "$(ls /dev/mapper | grep 'immudex-crypt[0-9]*' | grep -o '[0-9]*' | awk '{printf $1" " }')"; @@ -36,7 +36,6 @@ idx_crypt_complete() { esac fi return 0; -} && - complete -F idx_crypt_complete immudex-crypt +} -# ex: filetype=sh +complete -F idx_crypt_complete immudex-crypt diff --git a/tools/completions/immudex-hostname b/tools/completions/immudex-hostname index 7cedad2..36eb476 100644 --- a/tools/completions/immudex-hostname +++ b/tools/completions/immudex-hostname @@ -1,4 +1,4 @@ -# immudex-hostname completion -*- shell-script -*- +#!/bin/bash idx_simple_options_complete() { @@ -13,7 +13,6 @@ idx_simple_options_complete() return 0; fi return 0; -} && - complete -F idx_simple_options_complete immudex-hostname +} -# ex: filetype=sh +complete -F idx_simple_options_complete immudex-hostname diff --git a/tools/completions/immudex-import-gpgkeys b/tools/completions/immudex-import-gpgkeys index 36382a6..3e9da78 100644 --- a/tools/completions/immudex-import-gpgkeys +++ b/tools/completions/immudex-import-gpgkeys @@ -1,4 +1,4 @@ -# immudex-import-gpgkeys completion -*- shell-script -*- +#!/bin/bash idx_simple_options_complete() { @@ -13,7 +13,6 @@ idx_simple_options_complete() return 0; fi return 0; -} && - complete -F idx_simple_options_complete immudex-import-gpgkeys +} -# ex: filetype=sh +complete -F idx_simple_options_complete immudex-import-gpgkeys diff --git a/tools/completions/immudex-import-sshkeys b/tools/completions/immudex-import-sshkeys index 4d11be0..e5d4128 100644 --- a/tools/completions/immudex-import-sshkeys +++ b/tools/completions/immudex-import-sshkeys @@ -1,4 +1,5 @@ -# immudex-import-sshkeys completion -*- shell-script -*- +#!/bin/bash + idx_import_sshkeys_complete() { local cur; @@ -12,7 +13,6 @@ idx_import_sshkeys_complete() { fi return 0; -} && - complete -F idx_import_sshkeys_complete immudex-import-sshkeys +} -# ex: filetype=sh +complete -F idx_import_sshkeys_complete immudex-import-sshkeys diff --git a/tools/completions/immudex-install b/tools/completions/immudex-install index dc8769c..d7fc810 100644 --- a/tools/completions/immudex-install +++ b/tools/completions/immudex-install @@ -1,4 +1,5 @@ -# immudex-install completion -*- shell-script -*- +#!/bin/bash + idx_install_complete() { local cur; @@ -12,7 +13,7 @@ idx_install_complete() { fi return 0; -} && - complete -F idx_install_complete immudex-install +} + +complete -F idx_install_complete immudex-install -# ex: filetype=sh diff --git a/tools/completions/immudex-meteo b/tools/completions/immudex-meteo index 9f85a96..2c2b16f 100644 --- a/tools/completions/immudex-meteo +++ b/tools/completions/immudex-meteo @@ -1,4 +1,4 @@ -# immudex-meteo completion -*- shell-script -*- +#!/bin/bash idx_meteo_complete() { local cur prev @@ -23,7 +23,7 @@ local cur prev esac fi return 0; -} && - complete -F idx_meteo_complete immudex-meteo +} + +complete -F idx_meteo_complete immudex-meteo -# ex: filetype=sh diff --git a/tools/completions/immudex-morketsmerke b/tools/completions/immudex-morketsmerke index 76fcb29..f8a4cc4 100644 --- a/tools/completions/immudex-morketsmerke +++ b/tools/completions/immudex-morketsmerke @@ -1,4 +1,4 @@ -# immudex-morketsmerke completion -*- shell-script -*- +#!/bin/bash idx_morketsmerke_complete() { local cur; @@ -13,7 +13,7 @@ idx_morketsmerke_complete() { fi return 0; -} && - complete -F idx_morketsmerke_complete immudex-morketsmerke +} + +complete -F idx_morketsmerke_complete immudex-morketsmerke -# ex: filetype=sh diff --git a/tools/completions/immudex-motd b/tools/completions/immudex-motd index f7d31e0..1b61a5d 100644 --- a/tools/completions/immudex-motd +++ b/tools/completions/immudex-motd @@ -1,4 +1,4 @@ -# immudex-motd completion -*- shell-script -*- +#!/bin/bash idx_simple_options_complete() { @@ -13,7 +13,7 @@ idx_simple_options_complete() return 0; fi return 0; -} && - complete -F idx_simple_options_complete immudex-motd +} + +complete -F idx_simple_options_complete immudex-motd -# ex: filetype=sh diff --git a/tools/completions/immudex-padlock b/tools/completions/immudex-padlock index 0b1b402..6f414c4 100644 --- a/tools/completions/immudex-padlock +++ b/tools/completions/immudex-padlock @@ -1,4 +1,4 @@ -# immudex-padlock completion -*- shell-script -*- +#!/bin/bash idx_simple_options_complete() { @@ -13,7 +13,6 @@ idx_simple_options_complete() return 0; fi return 0; -} && - complete -F idx_simple_options_complete immudex-padlock +} -# ex: filetype=sh +complete -F idx_simple_options_complete immudex-padlock diff --git a/tools/completions/immudex-pl b/tools/completions/immudex-pl index 899c95c..62cd61c 100644 --- a/tools/completions/immudex-pl +++ b/tools/completions/immudex-pl @@ -1,4 +1,5 @@ -# immudex-pl completion -*- shell-script -*- +#!/bin/bash + idx_pl_complete() { local cur; @@ -12,7 +13,6 @@ idx_pl_complete() { fi return 0; -} && - complete -F idx_pl_complete immudex-pl +} -# ex: filetype=sh +complete -F idx_pl_complete immudex-pl diff --git a/tools/completions/immudex-run b/tools/completions/immudex-run index 5b18a05..45fd18f 100644 --- a/tools/completions/immudex-run +++ b/tools/completions/immudex-run @@ -1,4 +1,4 @@ -# immudex-run completion -*- shell-script -*- +#!/bin/bash idx_simple_options_complete() { @@ -13,7 +13,7 @@ idx_simple_options_complete() return 0; fi return 0; -} && - complete -F idx_simple_options_complete immudex-run +} + +complete -F idx_simple_options_complete immudex-run -# ex: filetype=sh diff --git a/tools/completions/immudex-secured-firefox b/tools/completions/immudex-secured-firefox index 11beb37..b3069af 100644 --- a/tools/completions/immudex-secured-firefox +++ b/tools/completions/immudex-secured-firefox @@ -1,4 +1,4 @@ -# immudex-secured-firefox completion -*- shell-script -*- +#!/bin/bash idx_simple_options_complete() { @@ -13,7 +13,7 @@ idx_simple_options_complete() return 0; fi return 0; -} && - complete -F idx_simple_options_complete immudex-secured-firefox +} + +complete -F idx_simple_options_complete immudex-secured-firefox -# ex: filetype=sh diff --git a/tools/completions/immudex-secured-librewolf b/tools/completions/immudex-secured-librewolf index 74ee4b1..87bf0de 100644 --- a/tools/completions/immudex-secured-librewolf +++ b/tools/completions/immudex-secured-librewolf @@ -1,4 +1,4 @@ -# immudex-secured-librewolf completion -*- shell-script -*- +#!/bin/bash idx_simple_options_complete() { @@ -13,7 +13,6 @@ idx_simple_options_complete() return 0; fi return 0; -} && - complete -F idx_simple_options_complete immudex-secured-librewolf +} -# ex: filetype=sh +complete -F idx_simple_options_complete immudex-secured-librewolf diff --git a/tools/completions/immudex-shoutcasts b/tools/completions/immudex-shoutcasts index 67b11cf..a823a2f 100644 --- a/tools/completions/immudex-shoutcasts +++ b/tools/completions/immudex-shoutcasts @@ -1,4 +1,5 @@ -# immudex-shoutcasts completion -*- shell-script -*- +#!/bin/bash + idx_shoutcasts_complete() { local cur prev @@ -17,7 +18,6 @@ idx_shoutcasts_complete() { esac fi return 0; -} && - complete -F idx_shoutcasts_complete immudex-shoutcasts +} -# ex: filetype=sh +complete -F idx_shoutcasts_complete immudex-shoutcasts diff --git a/tools/completions/immudex-upgrade b/tools/completions/immudex-upgrade index 4814015..3394275 100644 --- a/tools/completions/immudex-upgrade +++ b/tools/completions/immudex-upgrade @@ -1,4 +1,5 @@ -# immudex-upgrade completion -*- shell-script -*- +#!/bin/bash + idx_upgrade_complete() { local cur; @@ -12,7 +13,7 @@ idx_upgrade_complete() { fi return 0; -} && - complete -F idx_simple_options_complete immudex-branch +} + +complete -F idx_simple_options_complete immudex-branch -# ex: filetype=sh diff --git a/tools/completions/immudex-version b/tools/completions/immudex-version index a7ed4b7..ded414b 100644 --- a/tools/completions/immudex-version +++ b/tools/completions/immudex-version @@ -1,4 +1,4 @@ -# immudex-version completion -*- shell-script -*- +#!/bin/bash idx_simple_options_complete() { @@ -13,7 +13,6 @@ idx_simple_options_complete() return 0; fi return 0; -} && - complete -F idx_simple_options_complete immudex-version - -# ex: filetype=sh +} + +complete -F idx_simple_options_complete immudex-version diff --git a/tools/completions/immudex-ytplay b/tools/completions/immudex-ytplay index 3da1563..770ff69 100644 --- a/tools/completions/immudex-ytplay +++ b/tools/completions/immudex-ytplay @@ -1,4 +1,4 @@ -# immudex-ytplay completion -*- shell-script -*- +#!/bin/bash idx_ytplay_complete() { local cur; @@ -16,7 +16,6 @@ idx_ytplay_complete() { esac fi return 0; -} && - complete -F idx_ytplay_complete immudex-ytplay +} -# ex: filetype=sh +complete -F idx_ytplay_complete immudex-ytplay