From 835b1b6a47ffa17878d6729856e60ab08c409a1f Mon Sep 17 00:00:00 2001 From: "flyingscorpio@arch-desktop" Date: Tue, 5 Oct 2021 22:52:45 +0200 Subject: [PATCH] bash: use files sourcing destination instead of symlinks this enables editing local file and not the symlink --- configs.yml | 18 ++++++------------ dotfiles/bash/bashrc | 4 +--- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/configs.yml b/configs.yml index f477320..2ee8453 100644 --- a/configs.yml +++ b/configs.yml @@ -115,18 +115,12 @@ kitty: bash: - install: - bash-completion - - symlink: - - dotfiles/bash/bashrc - - ~/.bashrc - - symlink: - - dotfiles/shell/aliases - - ~/.bash_aliases - - symlink: - - dotfiles/bash/bash_profile - - ~/.bash_profile - - symlink: - - dotfiles/bash/inputrc - - ~/.inputrc + - run: + - content='. "$HOME"/setup-cockpit/dotfiles/bash/bash_profile'; grep "$content" "$HOME"/.bash_profile >/dev/null 2>&1 || echo "$content" >> "$HOME"/.bash_profile + - run: + - content='. "$HOME"/setup-cockpit/dotfiles/bash/bashrc'; grep "$content" "$HOME"/.bashrc >/dev/null 2>&1 || echo "$content" >> "$HOME"/.bashrc + - run: + - content='. "$HOME"/setup-cockpit/dotfiles/bash/inputrc'; grep "$content" "$HOME"/.inputrc >/dev/null 2>&1 || echo "$content" >> "$HOME"/.inputrc - clone: - https://github.com/magicmonty/bash-git-prompt.git - ~/.bash-git-prompt diff --git a/dotfiles/bash/bashrc b/dotfiles/bash/bashrc index ec83bf4..cc5dc35 100644 --- a/dotfiles/bash/bashrc +++ b/dotfiles/bash/bashrc @@ -10,9 +10,7 @@ shopt -s histappend # append to the history file, don't overwrite it HISTSIZE=10000 HISTFILESIZE=10000 -if [ -f ~/.bash_aliases ]; then - . ~/.bash_aliases -fi +. "$HOME"/setup-cockpit/dotfiles/shell/aliases if [ -f /usr/share/bash-completion/bash_completion ]; then . /usr/share/bash-completion/bash_completion