GithubHelp home page GithubHelp logo

renovate-bot / z-shell-_-zsh-diff-so-fancy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from z-shell/zsh-diff-so-fancy

0.0 0.0 0.0 3.84 MB

The wrapper around so-fancy/diff-so-fancy to use with Zsh helps to improve code quality and spot defects faster.

Home Page: https://wiki.zshell.dev/ecosystem/plugins/diff-so-fancy

License: GNU General Public License v3.0

Shell 100.00%

z-shell-_-zsh-diff-so-fancy's Introduction

Logo ❮ Zi ❯ Plugin - zsh-diff-so-fancy

zsh-diff-so-fancy


The diff-so-fancy

The so-fancy/diff-so-fancy as Github submodule.

The plugin has bin/git-dsf script which adds subcommand dsf to git, and bin/fancy-diff to pipe the diff output to diff-so-fancy.

Manual configuration

diff-so-fancy --colors        # View the commands to set the recommended colors
diff-so-fancy --set-defaults  # Configure git-diff to use diff-so-fancy and suggested colors
diff-so-fancy --patch         # Use diff-so-fancy in patch mode (interoperable with `git add --patch`)
# Configure git to use d-s-f for *all* diff operations
git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX"
# Configure git to use d-s-f for `git add --patch`
git config --global interactive.diffFilter "diff-so-fancy --patch"

Options

markEmptyLines

Should the first block of an empty line be colored. (Default: true)

git config --bool --global diff-so-fancy.markEmptyLines false

changeHunkIndicators

Simplify git header chunks to a more human readable format. (Default: true)

git config --bool --global diff-so-fancy.changeHunkIndicators false

stripLeadingSymbols

Should the pesky + or - at line-start be removed. (Default: true)

git config --bool --global diff-so-fancy.stripLeadingSymbols false

useUnicodeRuler

By default, the separator for the file header uses Unicode line-drawing characters. If this is causing output errors on your terminal, set this to false to use ASCII characters instead. (Default: true)

git config --bool --global diff-so-fancy.useUnicodeRuler false

rulerWidth

By default, the separator for the file header spans the full width of the terminal. Use this setting to set the width of the file header manually.

git config --global diff-so-fancy.rulerWidth 47    # git log's commit header width

Install with Zi

The project so-fancy/diff-so-fancy integration with Zi.

Simply add two lines to .zshrc:

Using bin-gem-node annex (recommended):

zi ice as'null' sbin'bin/*'
zi light z-shell/zsh-diff-so-fancy

Default:

zi ice as'program' pick'bin/*'
zi light z-shell/zsh-diff-so-fancy

This will add diff-so-fancy, fancy-diff, git-dsf to $PATH and automatically equip git with subcommand dsf.

No need to use the system package manager or manually configure git, however, if you have the following standard line in your .gitconfig, it will still work as expected:

[core]
	pager = diff-so-fancy | less --tabs=4 -RFX
[interactive]
	diffFilter = diff-so-fancy --patch

Other plugin managers

Zplug

zplug "z-shell/zsh-diff-so-fancy", as:command, use:"bin/"

Zgen

zgen load z-shell/zsh-diff-so-fancy

Without as"program"-like functionality the .plugin.zsh file picks up setup and simulates adding a command to the system, so Zgen and others can work.

z-shell-_-zsh-diff-so-fancy's People

Contributors

ss-o avatar dependabot[bot] avatar imgbotapp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.