From 17364c70ca45c5bb7f97d3ef18486b03cae7d774 Mon Sep 17 00:00:00 2001 From: lautaro Date: Fri, 10 Mar 2023 18:25:46 -0300 Subject: [PATCH 1/2] use ZSH_CUSTOM environment variable --- git.plugin.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/git.plugin.zsh b/git.plugin.zsh index b9a3520..096df57 100644 --- a/git.plugin.zsh +++ b/git.plugin.zsh @@ -261,7 +261,11 @@ function git_count_all() { # List all git aliases from the README: function git_list_aliases() { - filename=~/.oh-my-zsh/custom/plugins/git/README.md + # if ZSH_CUSTOM is not set, use the default location: + if [[ -z $ZSH_CUSTOM ]]; then + ZSH_CUSTOM=~/.oh-my-zsh/custom + fi + filename=${ZSH_CUSTOM}/plugins/git/README.md from=$(grep -Fno '| **g** ' ${filename} | cut -f1 -d:) stop=$(grep -no ' ' ${filename} | cut -f1 -d:) to=$((stop - 2)) From 47f094b68cf0ca898ea3a5b2d140aebfb353a2d0 Mon Sep 17 00:00:00 2001 From: lautaro Date: Fri, 10 Mar 2023 18:28:56 -0300 Subject: [PATCH 2/2] use ZSH env variable --- git.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git.plugin.zsh b/git.plugin.zsh index 096df57..dc7707d 100644 --- a/git.plugin.zsh +++ b/git.plugin.zsh @@ -263,7 +263,7 @@ function git_count_all() { function git_list_aliases() { # if ZSH_CUSTOM is not set, use the default location: if [[ -z $ZSH_CUSTOM ]]; then - ZSH_CUSTOM=~/.oh-my-zsh/custom + ZSH_CUSTOM=${ZSH}/custom fi filename=${ZSH_CUSTOM}/plugins/git/README.md from=$(grep -Fno '| **g** ' ${filename} | cut -f1 -d:)