Skip to content

Commit

Permalink
fix path bug, working now
Browse files Browse the repository at this point in the history
  • Loading branch information
Kai Chen committed Sep 24, 2024
1 parent 3985ab3 commit c51f401
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ln -sf "$REPO_DIR/config/.tmux.conf" "$HOME/.tmux.conf"
ln -sf "$REPO_DIR/config/.bash_aliases" "$HOME/.bash_aliases"

# User defined custom config folder
ZSH_CUSTOM="ZSH_CUSTOM=$REPO_DIR/config"
ZSH_CUSTOM="$REPO_DIR/config"

# Install zsh-history-substring-search plugin
if [ ! -d "$ZSH_CUSTOM/plugins/zsh-history-substring-search" ]; then
Expand All @@ -49,7 +49,8 @@ fi

# Replace the ZSH_CUSTOM line with the correct path
ZSHRC="$REPO_DIR/config/.zshrc"
sed -i "/^ZSH_CUSTOM=/c\\$ZSH_CUSTOM" "$ZSHRC" || echo "$ZSH_CUSTOM" >> "$ZSHRC"
ZSH_CUSTOM_LINE="ZSH_CUSTOM=$REPO_DIR/config"
sed -i "/^ZSH_CUSTOM=/c\\$ZSH_CUSTOM_LINE" "$ZSHRC" || echo "$ZSH_CUSTOM_LINE" >> "$ZSHRC"

# Create a symbolic link for .zshrc
ln -sf "$ZSHRC" "$HOME/.zshrc"
Expand Down

0 comments on commit c51f401

Please sign in to comment.