···28282929If you've installed auto completion for `docker-compose` ([here's how to do that](https://docs.docker.com/compose/completion/)), you can enable auto completion for `d-c` by adding `complete -F _docker_compose d-c` to your `.bash-profile`.
30303131+## copy
3232+Run a command and copy the output to the clipboard. For example, run `copy pwd` to copy the current path.
3333+```
3434+Usage:
3535+ copy <command> [args...]
3636+```
3737+3138## md5compare
3239Compares md5s of two files.
3340```
+31
bin/copy
···11+#! /bin/bash
22+33+color() {
44+ echo -n "`tput setaf $1`${@:2}"
55+ # reset color if there are arguments:
66+ if [[ "$#" > 1 ]]; then echo -n "`tput sgr0`"; fi
77+}
88+red() { color 1 "$@"; }
99+green() { color 2 "$@"; }
1010+cyan() { color 6 "$@"; }
1111+reset() { color 7 "$@"; echo -n `tput sgr0`; }
1212+1313+ARG1="$1"
1414+if [[ $ARG1 ]]; then
1515+ output=$(eval "$@")
1616+1717+ echo "$output"
1818+ echo "$output" | pbcopy -selection clipboard
1919+else
2020+ FILENAME=${0##*/}
2121+ echo ""
2222+ echo "`green $FILENAME:`"
2323+ echo " Run a command and copy the output to the clipboard."
2424+ echo " For example, run `cyan copy pwd` to copy the current path."
2525+ echo ""
2626+ echo "`green Usage:`"
2727+ echo " $FILENAME <command> [args...]"
2828+ echo ""
2929+# Example: copy pwd"
3030+3131+fi