Evaluate OMF_PATH at init time to fix #136 (#348)

This commit is contained in:
Stephen M. Coakley 2016-06-15 13:20:49 -05:00 committed by Derek Willian Stavis
parent 6c373d89ec
commit 228ef9aafe
2 changed files with 4 additions and 2 deletions

View File

@ -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|"

View File

@ -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}}"