Why doesn't “history | vim” work?

前端 未结 3 1304
说谎
说谎 2020-12-15 10:01

I want to use the Vim to see the result of history (not in the shell). I think history | vim will work (use the result of history as t

3条回答
  •  生来不讨喜
    2020-12-15 10:45

    Apart of vim -, you may try bash command substitution like:

    vim <(history)
    

    See also:

    • How to write whole buffer to standard output from the command line? at Vim SE
    • How to edit files non-interactively (e.g. in pipeline)? at Vim SE

提交回复
热议问题