Dynamically build completion for podman.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sun, 10 Dec 2023 19:15:17 +0200
changeset 1032 9cf008356bdf
parent 1031 bfec97f86dc3
child 1033 8d13ffe12bd6
Dynamically build completion for podman.
.local/share/bash-completion/completions/podman
Makefile
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.local/share/bash-completion/completions/podman	Sun Dec 10 19:15:17 2023 +0200
@@ -0,0 +1,10 @@
+eval "$(podman completion bash)"
+
+# Strips .exe for Cygwin with BASHOPTS=completion_strip_exe.
+__podman_win_fix() {
+  local -a cmd=( $(complete -p podman.exe) )
+  [[ $? = 0 ]] || return
+  cmd[-1]=podman
+  eval "${cmd[@]}"
+}
+__podman_win_fix
--- a/Makefile	Mon Dec 04 14:38:39 2023 +0200
+++ b/Makefile	Sun Dec 10 19:15:17 2023 +0200
@@ -60,7 +60,7 @@
     .inputrc .Xdefaults .xinitrc .xserverrc \
     .screenrc .tmux.conf \
     .dircolors .colordiffrc \
-  .bashrc .env.bash .bash_completion .bash_completion.d .zshrc \
+  .bashrc .env.bash .bash_completion .bash_completion.d .local/share/bash-completion/completions .zshrc \
   .vimrc .ssh \
     .pylintrc .pystartup .tclshrc .guile \
     .gradle/init.d/springColorLogging.gradle \