Git Product home page Git Product logo

zsh-diff-so-fancy's Introduction

Zsh-Diff-So-Fancy

The project so-fancy/diff-so-fancy is very interesting, however I find it difficult to a) install it, b) hook it up to git.

For the a), I just like to install things as user, in home directory, not system-wide via package manager. So even if the package exists (like it is in e.g. Homebrew for OS X, it has diff-so-fancy), I try to not use it. Think about remote shell accounts, is it good to ask every system administrator to install your favorite packages?

With this Zsh plugin, you simply add two lines to .zshrc:

zplugin ice as"program" pick"bin/git-dsf"
zplugin light zdharma/zsh-diff-so-fancy

This will install diff-so-fancy on every account where you use Zshell, and automatically equip git with subcommand dsf. No need to use system package manager and to configure git. Of course, if you have the following standard line in your .gitconfig, it will still work normally:

[core]
        pager = diff-so-fancy | less -FXRi

(because this plugin adds diff-so-fancy to $PATH).

Think about Puppet or Chef, i.e. about declarative approach to system configuration. In this case .zshrc is like a declarative setup guarding you will have diff-so-fancy on your accounts.

A Few Details

so-fancy/diff-so-fancy is cloned from Github as submodule. The plugin has bin/git-dsf script which adds subcommand dsf to git. That's basically everything needed: convenient way of installing (single Zsh plugin manager invocation), updating (Zsh plugin managers can easily update) and integrating with git.

Other plugin managers

# Zplug
zplug "zdharma/zsh-diff-so-fancy", as:command, use:"bin/"

# Zgen
zgen load zdharma/zsh-diff-so-fancy

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

zsh-diff-so-fancy's People

Contributors

psprint avatar inickt avatar simeg avatar

Stargazers

FishingHacks avatar

Watchers

James Cloos avatar  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.