mirror of
https://github.com/wfxr/forgit.git
synced 2026-09-10 15:26:16 -04:00
fix(fish): clean up variables (#350)
* use `status dirname` builtin to save 1 dirname call * use builtin test function instead of [ command * use local scoping for INSTALL_DIR variable (and make it lowercase to indicate such change) Ref: https://fishshell.com/docs/current/cmds/test.html
This commit is contained in:
parent
cf447a64aa
commit
2b58a2e6a7
|
|
@ -1,10 +1,10 @@
|
|||
# MIT (c) Chris Apple
|
||||
|
||||
set INSTALL_DIR (dirname (dirname (status -f)))
|
||||
set -x FORGIT_INSTALL_DIR "$INSTALL_DIR/conf.d"
|
||||
set -l install_dir (dirname (status dirname))
|
||||
set -x FORGIT_INSTALL_DIR "$install_dir/conf.d"
|
||||
set -x FORGIT "$FORGIT_INSTALL_DIR/bin/git-forgit"
|
||||
if [ ! -e "$FORGIT" ]
|
||||
set -x FORGIT_INSTALL_DIR "$INSTALL_DIR/vendor_conf.d"
|
||||
if not test -e "$FORGIT"
|
||||
set -x FORGIT_INSTALL_DIR "$install_dir/vendor_conf.d"
|
||||
set -x FORGIT "$FORGIT_INSTALL_DIR/bin/git-forgit"
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue