万年素人からHackerへの道

万年素人がHackerになれるまで殴り書きするぜ。

  • ・資産運用おすすめ
    10万円は1000円くらい利益
    資産運用ブログ アセマネ
    • ・寄付お願いします
      YENTEN:YYzNPzdsZWqr5THWAdMrKDj7GT8ietDc2W
      BitZenny:ZfpUbVya8MWQkjjGJMjA7P9pPkqaLnwPWH
      c0ban:8KG95GXdEquNpPW8xJAJf7nn5kbimQ5wj1
      Skycoin:KMqcn7x8REwwzMHPi9fV9fbNwdofYAWKRo

    fishでhistoryで数字出す

    history | nl | less

    これで出る。

    https://github.com/fish-shell/fish-shell/issues/2200

    標準コマンドをオーバーライド

    .config/fish/config.fishをいじる。

    function history
        builtin history | nl | less
    end

    builtinを書くのはデフォルトのhistoryコマンドを呼ばない仕組みだと思う。 さもないと再帰的に自分を呼び続ける。

    zsh から fish にした。 - yoshiori.github.io

    fzfの場合

    ~/.config/fish/functions/__fish_history.fishをいじる

    eval $QUERY_CMD ~/.local/share/fish/fish_history | grep "^\- cmd: " | sed 's/\- cmd: //'

    | nlを挟んで

    eval $QUERY_CMD ~/.local/share/fish/fish_history | grep "^\- cmd: " | nl | sed 's/\- cmd: //'

    にした。