~ expansion and always setup config in multiple installs (#381)

This commit is contained in:
Stephen M. Coakley 2016-08-08 12:11:18 -05:00 committed by GitHub
parent 9fa56cf1a2
commit 9aae289714
2 changed files with 11 additions and 6 deletions

View File

@ -26,7 +26,7 @@ This will download the installer script and start the installation. Alternativel
```fish
curl -L http://get.oh-my.fish > install
fish install --path=$HOME/.local/share/omf --config=$HOME/.config/omf
fish install --path=~/.local/share/omf --config=~/.config/omf
```
You can also install Oh My Fish with Git or with an offline source tarball downloaded from the [releases page][releases]:

View File

@ -44,7 +44,7 @@ Options:
return 0
case '--config=*'
echo "$argv[1]" | command cut -d= -f2 | read -g OMF_CONFIG
echo "$argv[1]" | command cut -d= -f2 | command sed -e "s#~#$HOME#" | read -g OMF_CONFIG
case --noninteractive
set -g NONINTERACTIVE
@ -54,10 +54,10 @@ Options:
case '--offline=*'
set -g OFFLINE
echo "$argv[1]" | command cut -d= -f2 | read -g OFFLINE_PATH
echo "$argv[1]" | command cut -d= -f2 | command sed -e "s#~#$HOME#" | read -g OFFLINE_PATH
case '--path=*'
echo "$argv[1]" | command cut -d= -f2 | read -g OMF_PATH
echo "$argv[1]" | command cut -d= -f2 | command sed -e "s#~#$HOME#" | read -g OMF_PATH
case --uninstall
set -g UNINSTALL
@ -131,8 +131,9 @@ function install_omf
install_from_github
end
# Bootstrap step
# Config step
install_bootstrap
install_config
end
@ -260,8 +261,12 @@ function install_bootstrap
# Backup the user's theme settings. This can be removed when OMF no longer touches this file to switch themes.
backup_file "$FISH_CONFIG/functions/fish_prompt.fish"
end
say "Building Oh My Fish configuration..."
# Sets up the configuration directory.
function install_config
say "Setting up Oh My Fish configuration..."
# Set up the Oh My Fish configuration directory.
if not test -d "$OMF_CONFIG"