From: xf0r3m Date: Thu, 28 May 2026 13:08:30 +0000 (+0200) Subject: Próba wdrożenia bash-completion dla narzędzi autorskich immudex cz.4. X-Git-Url: https://gitweb.morketsmerke.org/?a=commitdiff_plain;h=7681d99c58729cb06f51b42745e112de74f373fa;p=immudex.git Próba wdrożenia bash-completion dla narzędzi autorskich immudex cz.4. --- diff --git a/tools/bin/immudex-version b/tools/bin/immudex-commit similarity index 92% rename from tools/bin/immudex-version rename to tools/bin/immudex-commit index 2e7d497..b3e4e4b 100755 --- a/tools/bin/immudex-version +++ b/tools/bin/immudex-commit @@ -3,7 +3,7 @@ function help() { echo "Script returns first 7 signs of immudex commit ID."; echo; - echo "Usage: immudex-version [-h] [-v]"; + echo "Usage: immudex-commit [-h] [-v]"; echo; echo "Options:"; echo " -h Print this message."; @@ -16,7 +16,7 @@ function help() { } function version(){ - echo "immudex-version 1.1"; + echo "immudex-commit 1.0"; echo; echo "Copyright (C) 2026 morketsmerke.org"; echo "This is free software; see the source for copying conditions. There is NO"; diff --git a/tools/bin/immudex-ytplay b/tools/bin/immudex-ytplay index 29901e2..a1fb8f2 100755 --- a/tools/bin/immudex-ytplay +++ b/tools/bin/immudex-ytplay @@ -63,7 +63,7 @@ def ytSearch(keywords, maxResults=15): def getFormat(videoID): subprocess.run(['yt-dlp', '--list-formats', 'https://youtube.com/watch?v=' + videoID]) f = input("Please choose youtube video format, you need put video+audio ID of quality in this format or type anything else to quit:") - if not re.search("[0-9]{3}\+[0-9]{3}|[0-9]{2}", f): + if not re.search(r"[0-9]{3}\\+[0-9]{3}|[0-9]{2}", f): sys.exit(0) else: return f @@ -84,14 +84,14 @@ option=sys.argv[1] if option == '-s': if len(sys.argv) > 2: - if sys.argv[2] == '-v': + if sys.argv[3] == '-v': mode = "video" elif sys.argv[2] == '-a': mode = "audio" else: usage() sys.exit(2) - keywords = sys.argv[1] + keywords = sys.argv[2] video = ytSearch(keywords) subprocess.run('clear') diff --git a/tools/completions/immudex-pl b/tools/completions/immudex-pl index 62cd61c..d356c87 100644 --- a/tools/completions/immudex-pl +++ b/tools/completions/immudex-pl @@ -10,6 +10,8 @@ idx_pl_complete() { COMPREPLY=( $(compgen -W '-h -i -v' -- $cur) ); elif [ $COMP_CWORD -eq 2 ]; then return 0; + else + _comp_compgen_filedir fi return 0; diff --git a/tools/man/immudex-commit.1.gz b/tools/man/immudex-commit.1.gz new file mode 100644 index 0000000..4878f60 Binary files /dev/null and b/tools/man/immudex-commit.1.gz differ diff --git a/tools/man/immudex-version.1.gz b/tools/man/immudex-version.1.gz deleted file mode 100644 index 281a77a..0000000 Binary files a/tools/man/immudex-version.1.gz and /dev/null differ diff --git a/tools/sbin/immudex-install b/tools/sbin/immudex-install index 18139c1..fa39ced 100755 --- a/tools/sbin/immudex-install +++ b/tools/sbin/immudex-install @@ -54,7 +54,7 @@ if [ "$1" ]; then fi fi if [ "$1" ]; then - if $(echo $1 | grep -q '-p'); then + if $(echo $1 | grep -q "\-p"); then if [ "$2" ]; then idxPartSize=$2; else