From 6c6e493b94aa3915bd2262f5d424a38a92829133 Mon Sep 17 00:00:00 2001 From: Wenxuan Zhang Date: Fri, 11 Sep 2020 17:11:58 +0800 Subject: [PATCH] refactor: prefer using .cache directory --- forgit.plugin.fish | 8 ++++---- forgit.plugin.zsh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/forgit.plugin.fish b/forgit.plugin.fish index 9ea44a6..4c26215 100755 --- a/forgit.plugin.fish +++ b/forgit.plugin.fish @@ -228,9 +228,9 @@ end if test -z "$FORGIT_GI_REPO_LOCAL" if test "XDG_CACHE_HOME" - set -x FORGIT_GI_REPO_LOCAL $XDG_CACHE_HOME/.forgit/gi/repos/dvcs/gitignore + set -x FORGIT_GI_REPO_LOCAL $XDG_CACHE_HOME/forgit/gi/repos/dvcs/gitignore else - set -x FORGIT_GI_REPO_LOCAL ~/.forgit/gi/repos/dvcs/gitignore + set -x FORGIT_GI_REPO_LOCAL $HOME/.cache/forgit/gi/repos/dvcs/gitignore end end @@ -268,7 +268,7 @@ function forgit::ignore end if type -q bat > /dev/null 2>&1 - forgit::ignore::get $args | $FORGIT_IGNORE_PAGER + forgit::ignore::get $args | $FORGIT_IGNORE_PAGER else forgit::ignore::get $args end @@ -370,7 +370,7 @@ if test -z "$FORGIT_NO_ALIASES" else alias gss 'forgit::stash::show' end - + if test -n "$forgit_cherry_pick" alias $forgit_cherry_pick 'forgit::cherry::pick' else diff --git a/forgit.plugin.zsh b/forgit.plugin.zsh index b4ce687..c65581a 100755 --- a/forgit.plugin.zsh +++ b/forgit.plugin.zsh @@ -165,7 +165,7 @@ forgit::cherry::pick() { # git ignore generator export FORGIT_GI_REPO_REMOTE=${FORGIT_GI_REPO_REMOTE:-https://github.com/dvcs/gitignore} -export FORGIT_GI_REPO_LOCAL="${FORGIT_GI_REPO_LOCAL:-${XDG_CACHE_HOME:-$HOME}/.forgit/gi/repos/dvcs/gitignore}" +export FORGIT_GI_REPO_LOCAL="${FORGIT_GI_REPO_LOCAL:-${XDG_CACHE_HOME:-$HOME/.cache}/forgit/gi/repos/dvcs/gitignore}" export FORGIT_GI_TEMPLATES=${FORGIT_GI_TEMPLATES:-$FORGIT_GI_REPO_LOCAL/templates} forgit::ignore() {