From 228ef9aafe3e1d4333daf7f78e6e2602f5cc6125 Mon Sep 17 00:00:00 2001 From: "Stephen M. Coakley" Date: Wed, 15 Jun 2016 13:20:49 -0500 Subject: [PATCH] Evaluate OMF_PATH at init time to fix #136 (#348) --- bin/install | 2 +- templates/config.fish | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/install b/bin/install index dd1773a..04b4ad4 100755 --- a/bin/install +++ b/bin/install @@ -109,7 +109,7 @@ function install_omf report progress "Adding startup code to fish config file..." set template "templates/config.fish" - set replacements "s|{{OMF_PATH}}|$OMF_PATH|;s|{{OMF_CONFIG}}|$OMF_CONFIG|" + set replacements "s|{{OMF_CONFIG}}|$OMF_CONFIG|" if test "$OMF_CONFIG" != "$XDG_CONFIG_HOME/omf" set replacements "$replacements;s|#set|set|" diff --git a/templates/config.fish b/templates/config.fish index 28fea01..04c20e6 100644 --- a/templates/config.fish +++ b/templates/config.fish @@ -1,5 +1,7 @@ # Path to Oh My Fish install. -set -gx OMF_PATH "{{OMF_PATH}}" +set -q XDG_DATA_HOME + and set -gx OMF_PATH "$XDG_DATA_HOME/omf" + or set -gx OMF_PATH "$HOME/.local/share/omf" # Customize Oh My Fish configuration path. #set -gx OMF_CONFIG "{{OMF_CONFIG}}"