LoginSignup
3
1

More than 5 years have passed since last update.

設定したalias名を忘れるのでpecoで探して実行する

Posted at

タイトルどおりです。

aliasを設定したはいいんですが、たまにしか使わないものってよく忘れませんか?
gitのブランチ削除、sshのknow_hostsファイルからec2インスタンスを削除、とか作ったはいいんですがほぼ毎回aliasの設定を確認している気がします。
なので、pecoで簡単に実行してみました。

$ eval $(alias | sort | peco | sed -e 's/=.*$//')

自分の環境はzshです。
今回は単純にaliasで読み込ませていますが、pecoの一覧に出てきてほしいものに予め分けておいたほうが良さそうです。

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1