Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use "diff-so-fancy" without Git #90

Merged
merged 1 commit into from
Nov 29, 2017

Conversation

arcticicestudio
Copy link
Owner

Closes #61

"diff-so-fancy" (1) has been designed to work within Git controlled
directories. To allow to use it to compare files that are not controlled
by Git the "--no-index" (2) option of "git-diff" has been used.

The script pipes the output to "less" using the options

* "-R, --RAW-CONTROL-CHARS" to only display ANSI "color" escape
  sequences in "raw" form
* "-F, --quit-if-one-screen" to automatically exit if the entire file
  can be displayed on the first screen.
* "-X, --no-init" to disable sending the termcap (de)initialization
  strings to the terminal to avoid unnecessary operations like clearing the screen.
* "-x2, --tabs=2" to use two tab stops.

References:

  * so-fancy/diff-so-fancy#220 (comment)
  (1) https://github.com/so-fancy/diff-so-fancy
  (2) https://git-scm.com/docs/git-diff#git-diff-emgitdiffem--no-index--options--ltpathgt823082

GH-61
@arcticicestudio arcticicestudio added this to the 0.1.0 milestone Nov 29, 2017
@arcticicestudio arcticicestudio merged commit 08cbbc4 into develop Nov 29, 2017
@arcticicestudio arcticicestudio deleted the feature/gh-61-diff-so-fancy-without-git branch November 29, 2017 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant