From 61a7b27867e7724a97ccd50ecc7a31cd6a7dd190 Mon Sep 17 00:00:00 2001 From: xylous Date: Sun, 8 Aug 2021 18:46:33 +0300 Subject: [PATCH] Update installation instructions in README.md --- README.md | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 02d00e6..adc4392 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# gitstatus.zsh +# gitstatus -`gitstatus.zsh` is a plugin made for prompts - it tells you how many things have +`gitstatus` is a plugin made for prompts - it tells you how many things have changed since the last git commit in a repository. ## Why such a thing? @@ -20,10 +20,24 @@ Is it useful? For me and probably a handful other people, yes. ### Installation +#### Manual + Clone this repository locally, on your machine, for example: ``` -git clone "https://github.com/xylous/gitstatus.zsh.git" gitstatus +git clone "https://github.com/xylous/gitstatus.git" gitstatus +``` + +```zsh +source path/to/installation/gitstatus.plugin.zsh +``` + +#### With a plugin manager + +You could also use a plugin manager, such as zpm: + +``` +zpm load xylous/gitstatus ``` ## Usage @@ -31,8 +45,6 @@ git clone "https://github.com/xylous/gitstatus.zsh.git" gitstatus Add the following lines to your zshrc: ```zsh -source path/to/installation/gitstatus.plugin.zsh - function precmd() { local gitstatus="$(gitstatus)" @@ -42,7 +54,7 @@ function precmd() `precmd()` is a zsh builtin function that executes a series of commands right before the prompt is drawn. In this example, it updates the output of the -`gitstatus` script and then uses it in a prompt. +`gitstatus` script and then uses it in a sample prompt. And of course, remember to replace `path/to/installation` with the actual path to the program.