Merge pull request #532 from fish-shell/config-template

Extracting template to a file and improving it
pull/2/head
Jorge Bucaran 9 years ago
commit 251a77afc0

@ -92,10 +92,8 @@ omf_install() {
touch ${fish_config_file} >/dev/null 2>&1
test ! -w ${fish_config_file} && die "Fish configuration file is not writable, aborting."
echo "set -g OMF_PATH $(echo "${OMF_PATH}" | sed -e "s|$HOME|\$HOME|")" > ${fish_config_file}
echo "set -g OMF_CONFIG $(echo "${OMF_CONFIG}" | sed -e "s|$HOME|\$HOME|")" >> ${fish_config_file}
echo "source \$OMF_PATH/init.fish" >> ${fish_config_file}
sed "s|{{OMF_PATH}}|$OMF_PATH|;s|{{OMF_CONFIG}}|$OMF_CONFIG|" \
"${OMF_PATH}/templates/config.fish" > "${fish_config_file}"
if [ ! -d "${OMF_CONFIG}" ]; then
echo "Writing Oh My Fish configuration → ${OMF_CONFIG}"

@ -0,0 +1,13 @@
# Path to your oh-my-fish.
set -g OMF_PATH {{OMF_PATH}}
# Path to your oh-my-fish configuration.
set -g OMF_CONFIG {{OMF_CONFIG}}
### Configuration required to load oh-my-fish ###
# Note: Only add configurations that are required to be set before oh-my-fish is loaded.
# For common configurations, we advise you to add them to your $OMF_CONFIG/init.fish file or
# to create a custom plugin instead.
# Load oh-my-fish configuration.
source $OMF_PATH/init.fish
Loading…
Cancel
Save