toansible: Make shell dependency work with and and sources to bash and zsh

This commit is contained in:
tfranken@laurier 2022-02-25 10:07:59 +01:00
parent e0c66c982f
commit f676442f86
7 changed files with 10 additions and 4 deletions

View file

@ -6,4 +6,4 @@ export PATH="$HOME/.local/bin:$PATH"
[[ -f ~/.bashrc ]] && . ~/.bashrc
# Load items that are common to bash and zsh
[[ -f ~/setup-cockpit/dotfiles/shell/profile ]] && . ~/setup-cockpit/dotfiles/shell/profile
[[ -f ~/.shell_profile ]] && . ~/.shell_profile

View file

@ -10,7 +10,7 @@ shopt -s histappend # append to the history file, don't overwrite it
HISTSIZE=10000
HISTFILESIZE=10000
. "$HOME"/setup-cockpit/dotfiles/shell/aliases
. "$HOME"/.shell_aliases
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion

View file

@ -0,0 +1,6 @@
---
- name: Copy common shell rc files
copy: src={{ item.src }} dest={{ item.dest }} backup=true
with_items:
- { src: 'shell_aliases', dest: '~/.shell_aliases' }
- { src: 'shell_profile', dest: '~/.shell_profile' }

View file

@ -2,4 +2,4 @@
#
# Load items that are common to bash and zsh
[[ -f ~/setup-cockpit/dotfiles/shell/profile ]] && source ~/setup-cockpit/dotfiles/shell/profile
[[ -f ~/.shell_profile ]] && source ~/.shell_profile

View file

@ -15,7 +15,7 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]
fi
# ALIASES
source ~/setup-cockpit/dotfiles/shell/aliases
source ~/.shell_aliases
# On Arch Linux, source pkgfile "command not found" hook
[[ -e /usr/share/doc/pkgfile/command-not-found.zsh ]] && source /usr/share/doc/pkgfile/command-not-found.zsh