mirror of
https://github.com/wfxr/forgit.git
synced 2026-09-10 07:16:23 -04:00
refactor: prefer using .cache directory
This commit is contained in:
parent
56ece45973
commit
6c6e493b94
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue