toansible: Make shell dependency work with and and sources to bash and zsh
This commit is contained in:
parent
e0c66c982f
commit
f676442f86
7 changed files with 10 additions and 4 deletions
|
@ -6,4 +6,4 @@ export PATH="$HOME/.local/bin:$PATH"
|
||||||
[[ -f ~/.bashrc ]] && . ~/.bashrc
|
[[ -f ~/.bashrc ]] && . ~/.bashrc
|
||||||
|
|
||||||
# Load items that are common to bash and zsh
|
# 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
|
||||||
|
|
|
@ -10,7 +10,7 @@ shopt -s histappend # append to the history file, don't overwrite it
|
||||||
HISTSIZE=10000
|
HISTSIZE=10000
|
||||||
HISTFILESIZE=10000
|
HISTFILESIZE=10000
|
||||||
|
|
||||||
. "$HOME"/setup-cockpit/dotfiles/shell/aliases
|
. "$HOME"/.shell_aliases
|
||||||
|
|
||||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||||
. /usr/share/bash-completion/bash_completion
|
. /usr/share/bash-completion/bash_completion
|
||||||
|
|
6
roles/shell/tasks/main.yml
Normal file
6
roles/shell/tasks/main.yml
Normal 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' }
|
|
@ -2,4 +2,4 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
# Load items that are common to bash and zsh
|
# 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
|
||||||
|
|
|
@ -15,7 +15,7 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ALIASES
|
# ALIASES
|
||||||
source ~/setup-cockpit/dotfiles/shell/aliases
|
source ~/.shell_aliases
|
||||||
|
|
||||||
# On Arch Linux, source pkgfile "command not found" hook
|
# 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
|
[[ -e /usr/share/doc/pkgfile/command-not-found.zsh ]] && source /usr/share/doc/pkgfile/command-not-found.zsh
|
||||||
|
|
Loading…
Add table
Reference in a new issue