Skip to content

Commit ba93e0e

Browse files
committed
On Windows update lazygit pager (jesseduffield/lazygit#4941)
1 parent 9cb45db commit ba93e0e

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

.config/lazygit/pager.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env sh
2+
3+
old=$(echo "$2" | sed 's|\\|/|g')
4+
new=$(echo "$5" | sed 's|\\|/|g')
5+
path="$1"
6+
git diff --no-index --no-ext-diff "$old" "$new" |
7+
sed -e "s|$old|$path|g" -e "s|$new|$path|g" |
8+
delta --width="${LAZYGIT_COLUMNS}" --no-gitconfig --line-numbers --tabs=4 --dark --paging=never --hyperlinks --hyperlinks-file-link-format="lazygit-edit://{path}:{line}"

check_consistency.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,14 @@ $ideavimrc = @{
5050
}
5151
$lazygit = @{
5252
name = "lazygit config.yml"
53-
remote = "$DIR\.config\lazygit\config.yml"
53+
remote = "$DIR\windows\lazygit\config.yml"
5454
local = "$HOME\AppData\Roaming\lazygit\config.yml"
5555
}
56+
$lazygit_pager_sh = @{
57+
name = "lazygit pager.sh"
58+
remote = "$DIR\.config\lazygit\pager.sh"
59+
local = "$HOME\AppData\Roaming\lazygit\pager.sh"
60+
}
5661
$git_config = @{
5762
name = "Globle git config"
5863
remote = "$DIR\dot_files\.gitconfig"
@@ -125,6 +130,7 @@ $extra_file_list = @(
125130
$ptpython
126131
$ideavimrc
127132
$lazygit
133+
$lazygit_pager_sh
128134
$git_config
129135
$vifmrc
130136
$clangd

windows/lazygit/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/jesseduffield/lazygit/master/schema/config.json
2+
3+
gui:
4+
# language: "en"
5+
nerdFontsVersion: "3"
6+
git:
7+
pagers:
8+
- externalDiffCommand: "~/AppData/Roaming/lazygit/pager.sh"
9+
os:
10+
editPreset: nvim
11+
promptToReturnFromSubprocess: false

0 commit comments

Comments
 (0)