https://github.com/ujiro99/docker-selector
Docker container selector using peco.
https://github.com/ujiro99/docker-selector
bash docker golang nyagos peco
Last synced: 3 months ago
JSON representation
Docker container selector using peco.
- Host: GitHub
- URL: https://github.com/ujiro99/docker-selector
- Owner: ujiro99
- License: mit
- Created: 2017-12-17T05:28:28.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-01T15:52:36.000Z (about 8 years ago)
- Last Synced: 2024-06-20T11:15:10.488Z (about 2 years ago)
- Topics: bash, docker, golang, nyagos, peco
- Language: Go
- Homepage:
- Size: 46.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docker-selector [](https://travis-ci.org/ujiro99/docker-selector)
Docker container selector using peco.

# Requirements
* docker
* peco
# Installation
You can get binary from github release page.
[-> Release Page](https://github.com/ujiro99/docker-selector/releases)
or, use `go get`:
```bash
$ go get -u github.com/ujiro99/docker-selector
```
# Usage
Use this with key bindings.
An example of calling with `Ctrl + d`.
* bash
```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
```lua
-- add this .nyagos
nyagos.bindkey("C_D", function(this)
local result = nyagos.eval('docker-selector.exe -a')
this:call("CLEAR_SCREEN")
return result
end)
```