Skip to content

ujiro99/docker-selector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-selector Build Status

Docker container selector using peco.

demo

Requirements

  • docker
  • peco

Installation

You can get binary from github release page.

-> Release Page

or, use go get:

$ go get -u github.com/ujiro99/docker-selector

Usage

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)