Skip to content

Instantly share code, notes, and snippets.

@dullage
Last active December 5, 2023 13:14
Show Gist options
  • Save dullage/09905072df9f948f61cad10e9d8183c6 to your computer and use it in GitHub Desktop.
Save dullage/09905072df9f948f61cad10e9d8183c6 to your computer and use it in GitHub Desktop.
Bash completion script for dockr Gist.
#!/usr/bin/env bash
# Add "source /path/to/dockr-completion.bash" to your .bashrc file.
_dockr_completions()
{
COMPREPLY=($(docker ps --format "{{.Names}}" --filter "name=${COMP_WORDS[1]}"))
}
complete -F _dockr_completions dockr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment