Catalogue
peco Tips Series — Multi-hop ssh + peco, ghq + peco + atom

peco Tips Series — Multi-hop ssh + peco, ghq + peco + atom

🌐 日本語で読む

Overview

These really are just small tips.
But after using them I got feedback that they shorten work time quite a bit and are handy,
so I put together an article on the peco-related tricks I use most often.

Installing peco

1
macOS %$ brew install peco

Search for an ssh login Host and select it

As a prerequisite, I manage my connection hosts in ~/.ssh/config.

Paste the above into something like ~/.bashrc, run source ~/.bashrc, and you’re good to go ♪

1
2
3
4
5
6
7
macOS %$ git clone https://gist.github.com/kenzo0107/06b3b1e202f36b70815cfe0207292a66
macOS %$ cd 06b3b1e202f36b70815cfe0207292a66
macOS %$ cat peco-sshconfig-ssh.sh >> ~/.bashrc
macOS %$ source ~/.bashrc

// Run sshc!
macOS %$ sshc

When things go smoothly as shown above, the candidates are listed.
Sorry that it’s all mosaic (>_<)

Search for a repository managed by ghq, select it, and open it in atom

Same as before,

1
2
3
4
5
6
7
macOS %$ git clone https://gist.github.com/kenzo0107/e460e31ae2478341cc7a39859ad7fefd
macOS %$ cd e460e31ae2478341cc7a39859ad7fefd
macOS %$ cat peco-git-atom.sh >> ~/.bashrc
macOS %$ source ~/.bashrc

// Run opg!
macOS %$ opg

I use peco in many other places as well.
If you have a “here’s a great use for peco” tip, please let me know ♪

References

It’s zsh, but I’ve collected my dotfiles here.

peco Tips Series — Multi-hop ssh + peco, ghq + peco + atom

https://kenzo0107.github.io/en/2017/04/27/peco/

Author

Kenzo Tanaka

Posted on

2017-04-27

Licensed under