Docker container selector using peco.
- docker
- peco
You can get binary from github release page.
or, use go get
:
$ go get -u github.com/ujiro99/docker-selector
Use this with key bindings.
An example of calling with Ctrl + d
.
- bash
# add this .bashrc
peco-docker-selector() {
local l=$(\docker-selector -a)
READLINE_LINE="${READLINE_LINE:0:$READLINE_POINT}${l}${READLINE_LINE:$READLINE_POINT}"
READLINE_POINT=$(($READLINE_POINT + ${#l}))
}
bind -x '"\C-d": peco-docker-selector'
- nyagos
-- add this .nyagos
nyagos.bindkey("C_D", function(this)
local result = nyagos.eval('docker-selector.exe -a')
this:call("CLEAR_SCREEN")
return result
end)