1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

fishのfunctionをpecoで選択

Posted at

functionsの出力が,区切りで見にくいじゃん?
,を\nに置換して改行表示にするじゃん?
でも調べてから使うにはコピペするか先頭文字打って補完するじゃん?
じゃあpecoでざっつに検索してそのままコマンドラインに出したいじゃん?

とfunctionsを知って数分、勢いで書く。

function penctions
   commandline (functions | tr ',' '\n' | peco)
end
function fish_user_key_bindings
    bind \cq penctions
end

commandlineは2.6.0からの書き方。
fishshell 2.6.0 の変更点ピックアップ - Qiita

引数とか考慮しない手抜きなので、_始まりのfunctionだしたいなら -a をデフォルトでつけるか引数対応に

penctions.gif

functionを自作したはいいが、ちょっと使わないとかなり忘れるので、ましになるかも。

1
2
1

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
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?