12
13

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.

コマンドの標準出力を Emacs で見る

Posted at

はじめに

Emacs 使いなら、長ーいコマンドの出力とか Emacs で見たいですよね?
そんなときのための設定です。

設定

~/.zshrc
function emacsview(){
    emacsclient -n =(<&0)
}

プロセス置換を使うことで、一時ファイルの名前や後始末など面倒なことを考える必要がなくなります。

使い方

例えば diff の出力を Emacs で見るときは

diff -uw FILE1 FILE2 | emacsview

とか。よく使う場合はグローバルエイリアスにしておくと良いです。

12
13
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
12
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?