dotcloud/docker — pull request #1538 by KSid (2013-08-14 01:49:00+00:00)
Title: Bash Completion: Limit commands to containers of a relevant state

Some commands can only work with containers in a particular state. e.g. 'docker attach' only works with running containers. This commit lists only the containers of an appropriate state for the given command.