LoginSignup
0
1

More than 5 years have passed since last update.

fisherman/zの出力をpecoに渡せなくなった

Last updated at Posted at 2018-01-31

fisherman/zpecoを組み合わせて使っていたのですが、このPRz -lの結果を標準出力に渡さなくなった模様。あまりお行儀よくないかもしれませんがfisherman/zがためている履歴を直接見るようにしてみました。

function __peco_z
  set -l query (commandline)

  if test -n $query
    set flags --query "$query"
  end

  cat $Z_DATA | awk 'BEGIN{FS="|"} { print $3,$1 }' | sort -nr | awk '{ print $2 }' | peco $flags | read foo
  if [ $foo ]
      cd $foo
      commandline -r ''
      commandline -f repaint
  end
end

function fish_user_key_bindings
  # お好みのキーバインドで
  bind \cq '__peco_z'
end

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