From 02764558f586f7e55dcd5626eb7679099ea66352 Mon Sep 17 00:00:00 2001 From: Name Date: Thu, 27 Feb 2025 04:38:01 +0000 Subject: [PATCH 1/2] Clarify README build instructions, Improve formatting --- README.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 3a644f8541f..ba81f5852c4 100644 --- a/README.md +++ b/README.md @@ -237,13 +237,13 @@ Normally the lazygit formula can be found in the Homebrew core but we suggest yo Tap: -``` +```sh brew install jesseduffield/lazygit/lazygit ``` Core: -``` +```sh brew install lazygit ``` @@ -432,23 +432,25 @@ You can install `lazygit` using the `winget` command in the Windows Terminal wit winget install -e --id=JesseDuffield.lazygit ``` -### Manual +### Install Lazygit From Source -You'll need to [install Go](https://golang.org/doc/install) +First, [install Go](https://golang.org/doc/install) -``` +```sh git clone https://github.com/jesseduffield/lazygit.git cd lazygit go install ``` -You can also use `go run main.go` to compile and run in one go (pun definitely intended) +#### Compile Emphemeral Binary + +Alternatively use `go run main.go` to compile and run in one go (pun definitely intended) ## Usage -Call `lazygit` in your terminal inside a git repository. +Call `lazygit` in your terminal, while inside a git repository. -```sh +```shell $ lazygit ``` @@ -464,7 +466,7 @@ You can check out the list of keybindings [here](/docs/keybindings). If you change repos in lazygit and want your shell to change directory into that repo on exiting lazygit, add this to your `~/.zshrc` (or other rc file): -``` +```sh lg() { export LAZYGIT_NEW_DIR_FILE=~/.lazygit/newdir From 742c3c64d584adc96e165f322de26b2c943a73cc Mon Sep 17 00:00:00 2001 From: Name Date: Fri, 14 Feb 2025 18:11:27 +0000 Subject: [PATCH 2/2] Automate alias target-file specification --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ba81f5852c4..d52ad21f743 100644 --- a/README.md +++ b/README.md @@ -454,9 +454,13 @@ Call `lazygit` in your terminal, while inside a git repository. $ lazygit ``` -If you want, you can -also add an alias for this with `echo "alias lg='lazygit'" >> ~/.zshrc` (or -whichever rc file you're using). +### Add ZSH/Bash Alias + +Create a shortcut for lazygit by adding an alias to the shell configuration file. + +```sh +echo "alias lg='lazygit'" >> "$HOME/.$(basename $SHELL)rc" +``` ### Keybindings