Quantcast
Channel: Bashタグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 2914

diffコマンドのエイリアス

$
0
0

自分が使っているコマンドのエイリアスを紹介するシリーズです。
今回は、diffコマンドを紹介します。

エイリアス

alias diff='colordiff -u'

詳細

  • colordiff:before,afterに色がつく。
  • オプション-u:差分表記<>-+に変更。

追加前
スクリーンショット 2020-02-20 0.34.32.png

追加後
スクリーンショット 2020-02-20 0.34.22.png

コードが悪かったですね、、見辛い、、、(いずれ変更)
こちらのItemにgolangのdiffを載せているので良かったら見てください。
https://qiita.com/konekato/items/834f4f0e011670dec44d

ソースコード

使用した(見にくい)コードはこちらです。

b(before)
t
te
tes
test
tes
te
t
a(after)
t
t
tes

ts
te
t

余談

マークダウン コード挿入の際 ```diff ってやるとちゃんと色が出る。

ターミナル
% diff b a

 t
-te
-tes
-test
+t
 tes
+
+ts
 te
 t

Viewing all articles
Browse latest Browse all 2914

Trending Articles