From 62829ef9956e18e261cdef3a4acaf44eb78ddec9 Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Mon, 21 Feb 2022 09:12:37 +0800 Subject: [PATCH] fix: auto-loading .env is not ideal --- cli/fish/config.fish | 17 ++++++++++------- cli/vim/coc-settings.json | 1 - 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/cli/fish/config.fish b/cli/fish/config.fish index 71a6f47..7ddae7e 100644 --- a/cli/fish/config.fish +++ b/cli/fish/config.fish @@ -92,16 +92,19 @@ if status is-interactive if string match -q "'*" $pair[2]; or string match -q '"*' $pair[2] eval "set -gx $pair[1] $pair[2]" else - eval "set -gx $pair[1] \"$pair[2]\"" + if not eval "export $pair[1]=\"$pair[2]\"" + echo failed to export pair $pair + return + end end end < $argv[1] end - function readenv --on-variable PWD - if test -r .env - loadenv .env - end - end - readenv + #function readenv --on-variable PWD + #if test -r .env + #loadenv .env + #end + #end + #readenv end diff --git a/cli/vim/coc-settings.json b/cli/vim/coc-settings.json index 5b82291..b4831ac 100644 --- a/cli/vim/coc-settings.json +++ b/cli/vim/coc-settings.json @@ -8,7 +8,6 @@ }, "coc.preferences.formatOnSaveFiletypes": [ "rust", - "json", "go" ] }