mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2024-11-22 12:43:23 +08:00
~ expansion and always setup config in multiple installs (#381)
This commit is contained in:
parent
9fa56cf1a2
commit
9aae289714
|
@ -26,7 +26,7 @@ This will download the installer script and start the installation. Alternativel
|
||||||
|
|
||||||
```fish
|
```fish
|
||||||
curl -L http://get.oh-my.fish > install
|
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]:
|
You can also install Oh My Fish with Git or with an offline source tarball downloaded from the [releases page][releases]:
|
||||||
|
|
15
bin/install
15
bin/install
|
@ -44,7 +44,7 @@ Options:
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
case '--config=*'
|
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
|
case --noninteractive
|
||||||
set -g NONINTERACTIVE
|
set -g NONINTERACTIVE
|
||||||
|
@ -54,10 +54,10 @@ Options:
|
||||||
|
|
||||||
case '--offline=*'
|
case '--offline=*'
|
||||||
set -g 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=*'
|
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
|
case --uninstall
|
||||||
set -g UNINSTALL
|
set -g UNINSTALL
|
||||||
|
@ -131,8 +131,9 @@ function install_omf
|
||||||
install_from_github
|
install_from_github
|
||||||
end
|
end
|
||||||
|
|
||||||
# Bootstrap step
|
# Config step
|
||||||
install_bootstrap
|
install_bootstrap
|
||||||
|
install_config
|
||||||
end
|
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 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"
|
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.
|
# Set up the Oh My Fish configuration directory.
|
||||||
if not test -d "$OMF_CONFIG"
|
if not test -d "$OMF_CONFIG"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user