Compare commits
1
Commits
dafbfef5cd
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ad0f8291b7
|
@@ -0,0 +1 @@
|
|||||||
|
skip_global_compinit=1
|
||||||
+3
-2
@@ -18,6 +18,8 @@ fi
|
|||||||
# Path to your oh-my-zsh installation.
|
# Path to your oh-my-zsh installation.
|
||||||
export ZSH=~/.oh-my-zsh
|
export ZSH=~/.oh-my-zsh
|
||||||
|
|
||||||
|
source $ZSH/custom/plugins/zsh-autocomplete/zsh-autocomplete.plugin.zsh
|
||||||
|
|
||||||
# Set the name of the theme to load. If you set this to "random"
|
# Set the name of the theme to load. If you set this to "random"
|
||||||
# It'll load a random theme each time that oh-my-zsh is loaded.
|
# It'll load a random theme each time that oh-my-zsh is loaded.
|
||||||
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
|
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
|
||||||
@@ -79,11 +81,10 @@ plugins=(
|
|||||||
git
|
git
|
||||||
zsh-history-substring-search
|
zsh-history-substring-search
|
||||||
zsh-autosuggestions
|
zsh-autosuggestions
|
||||||
zsh-autocomplete
|
|
||||||
# zsh-eza
|
# zsh-eza
|
||||||
fzf-zsh-plugin
|
fzf-zsh-plugin
|
||||||
zsh-syntax-highlighting
|
zsh-syntax-highlighting
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|||||||
@@ -80,16 +80,19 @@ fi
|
|||||||
# Do not print commands
|
# Do not print commands
|
||||||
set +x
|
set +x
|
||||||
|
|
||||||
# Backup the user's current config before oh-my-zsh overwrites it.
|
# Backup the user's current configs before oh-my-zsh / our downloads overwrite them.
|
||||||
# Timestamped so re-running the script never overwrites the previous backup.
|
# Timestamped so re-running the script never overwrites the previous backup.
|
||||||
if [ -f "$HOME/.zshrc" ]; then
|
BACKUP_STAMP="$(date +%Y%m%d-%H%M%S)"
|
||||||
ZSHRC_BACKUP="$HOME/.zshrc.bak-$(date +%Y%m%d-%H%M%S)"
|
for cfg in .zshrc .zshenv; do
|
||||||
if ! cp "$HOME/.zshrc" "$ZSHRC_BACKUP"; then
|
if [ -f "$HOME/$cfg" ]; then
|
||||||
echo "error: failed to back up $HOME/.zshrc to $ZSHRC_BACKUP" >&2
|
cfg_backup="$HOME/$cfg.bak-$BACKUP_STAMP"
|
||||||
exit 1
|
if ! cp "$HOME/$cfg" "$cfg_backup"; then
|
||||||
|
echo "error: failed to back up $HOME/$cfg to $cfg_backup" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "Backed up $HOME/$cfg to $cfg_backup"
|
||||||
fi
|
fi
|
||||||
echo "Backed up $HOME/.zshrc to $ZSHRC_BACKUP"
|
done
|
||||||
fi
|
|
||||||
|
|
||||||
# Install oh-my-zsh without entering zsh
|
# Install oh-my-zsh without entering zsh
|
||||||
if ! omz_installer=$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh); then
|
if ! omz_installer=$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh); then
|
||||||
@@ -121,10 +124,12 @@ clone_plugin "$ZSH_CUSTOM_DIR/plugins/zsh-autocomplete" --depth=1 https://github
|
|||||||
|
|
||||||
|
|
||||||
# Download and replace config file
|
# Download and replace config file
|
||||||
curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs/.zshrc -o ~/.zshrc
|
CONFIG_BASE_URL="https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs"
|
||||||
|
curl -fsSL "$CONFIG_BASE_URL/.zshrc" -o ~/.zshrc
|
||||||
|
curl -fsSL "$CONFIG_BASE_URL/.zshenv" -o ~/.zshenv
|
||||||
|
|
||||||
# Download generic fzf configuration
|
# Download generic fzf configuration
|
||||||
curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs/.fzf.zsh -o ~/.fzf.zsh
|
curl -fsSL "$CONFIG_BASE_URL/.fzf.zsh" -o ~/.fzf.zsh
|
||||||
|
|
||||||
# Setup fzf: the oh-my-zsh fzf-zsh-plugin provides the integration.
|
# Setup fzf: the oh-my-zsh fzf-zsh-plugin provides the integration.
|
||||||
# (Previously an empty ~/.fzf/shell/key-bindings.zsh placeholder was created
|
# (Previously an empty ~/.fzf/shell/key-bindings.zsh placeholder was created
|
||||||
|
|||||||
Reference in New Issue
Block a user