From e21cd3a9803de167cfff2e57c34edb5961032e57 Mon Sep 17 00:00:00 2001 From: andre Date: Sat, 29 Nov 2025 22:36:35 +0100 Subject: [PATCH] =?UTF-8?q?rootfs/etc/bash=5Fcompletion.d/openlo-completio?= =?UTF-8?q?n.bash=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rootfs/etc/bash_completion.d/openlo-completion.bash | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 rootfs/etc/bash_completion.d/openlo-completion.bash diff --git a/rootfs/etc/bash_completion.d/openlo-completion.bash b/rootfs/etc/bash_completion.d/openlo-completion.bash new file mode 100644 index 0000000..181b1ef --- /dev/null +++ b/rootfs/etc/bash_completion.d/openlo-completion.bash @@ -0,0 +1,10 @@ +_devices_loopback() { + local curw + COMPREPLY=() + curw=${COMP_WORDS[COMP_CWORD]} + prev="${COMP_WORDS[COMP_CWORD-1]}" + + COMPREPLY=($(compgen -W "$(cat ~/.bashrc | grep -A 50 "openlo(" | grep ')' | grep -v '{' | awk '{print $1}' | tr -d ')')" -- $curw)) + return 0 +} +complete -F _devices_loopback -o dirnames openlo \ No newline at end of file