mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Colourise diff(1) output, if supported (#7308)
This commit is contained in:
parent
4817f97823
commit
fc13dd362c
2 changed files with 7 additions and 0 deletions
|
@ -103,6 +103,7 @@ Interactive improvements
|
|||
revealed.
|
||||
- The output of ``time`` is now properly aligned in all cases (#6726).
|
||||
- The ``pwd`` command supports the long options ``--logical`` and ``--physical``, matching other implementations (#6787).
|
||||
- ``diff`` will now colourise output, if supported (#7308).
|
||||
|
||||
|
||||
New or improved bindings
|
||||
|
|
6
share/functions/diff.fish
Normal file
6
share/functions/diff.fish
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Use colours in diff output, if supported
|
||||
if command -vq diff; and command diff --color=auto /dev/null{,} >/dev/null 2>&1
|
||||
function diff
|
||||
command diff --color=auto $argv
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue