Skip to content

Instantly share code, notes, and snippets.

@zerosum
Created March 5, 2019 12:39
Show Gist options
  • Save zerosum/0f90c90c15cddb2770c09f8db5c11e19 to your computer and use it in GitHub Desktop.
Save zerosum/0f90c90c15cddb2770c09f8db5c11e19 to your computer and use it in GitHub Desktop.
function peco-docker-container-stop () {
local selected=$(docker container ls | tail -n +2 | peco)
if [ -n "$selected" ]; then
BUFFER=`echo ${selected} | awk '{print $1}' | xargs -I {} docker container stop {}`
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment