From 37fa08b2ad17cdb6d8abfcba8c3c8aa48ecb0f63 Mon Sep 17 00:00:00 2001 From: thek4n Date: Sun, 14 Nov 2021 18:49:06 +0300 Subject: [PATCH] ref: setup.sh --- .zshrc | 20 +++++++------------- README.md | 1 - setup.sh | 6 +++--- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/.zshrc b/.zshrc index 9de2c9b..ff63052 100644 --- a/.zshrc +++ b/.zshrc @@ -261,17 +261,11 @@ if [ -f /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh ]; then ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=#999' fi +so () { + [ -f "$1" ] && source "$1" +} -# enable command-not-found if installed -if [ -f /etc/zsh_command_not_found ]; then - . /etc/zsh_command_not_found -fi - -if [ -f $HOME/.bash_aliases ]; then - source $HOME/.bash_aliases -fi - -if [ -f $HOME/.bash_functions ]; then - source $HOME/.bash_functions -fi - +so /etc/zsh_command_not_found +so "$HOME"/.subbash/aliases +so "$HOME"/.subbash/functions +so "$HOME"/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh diff --git a/README.md b/README.md index 6d86767..4c41875 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,6 @@ Bash config files git clone https://github.com/TheK4n/dotfiles chmod u+x dotfiles/setup.sh dotfiles/setup.sh -rm -rf dotfiles . ~/.bashrc ``` diff --git a/setup.sh b/setup.sh index 661d2dc..fdebd32 100644 --- a/setup.sh +++ b/setup.sh @@ -1,5 +1,5 @@ #!/usr/bin/bash -cp -r dotfiles/.subbash ~ -cp dotfiles/.bashrc ~ -cp dotfiles/.vimrc ~ +ln -s "$PWD"/dotfiles/.subbash ~ +ln -s "$PWD"/dotfiles/.bashrc ~ +ln -s "$PWD"/dotfiles/.vimrc ~