bundles/users: some more bash config
This commit is contained in:
parent
7738736120
commit
12c04cf3be
1 changed files with 30 additions and 5 deletions
|
@ -24,16 +24,41 @@ esac
|
||||||
uptime
|
uptime
|
||||||
last | grep 'still logged in'
|
last | grep 'still logged in'
|
||||||
|
|
||||||
alias v='vim -p'
|
export HISTCONTROL=ignoredups
|
||||||
alias l='ls -lAh'
|
export HISTSIZE=50000
|
||||||
alias ipb='ip -brief'
|
export HISTTIMEFORMAT="%d/%m/%y %T "
|
||||||
alias s='sudo -i'
|
export SAVEHIST=50000
|
||||||
</%text>
|
shopt -s checkjobs
|
||||||
|
shopt -s checkwinsize
|
||||||
|
shopt -s globstar
|
||||||
|
shopt -s histreedit
|
||||||
|
|
||||||
|
export LESS="-iRS -# 2"
|
||||||
|
|
||||||
|
export EDITOR=vim
|
||||||
|
export VISUAL=vim
|
||||||
|
|
||||||
|
alias ipb='ip -brief'
|
||||||
|
alias l='ls -lAh'
|
||||||
|
alias s='sudo -i'
|
||||||
|
alias v='vim -p'
|
||||||
|
</%text>
|
||||||
% for k, v in sorted(node.metadata.get('bash_aliases', {}).items()):
|
% for k, v in sorted(node.metadata.get('bash_aliases', {}).items()):
|
||||||
alias ${k}='${v}'
|
alias ${k}='${v}'
|
||||||
% endfor
|
% endfor
|
||||||
|
|
||||||
|
rsback()
|
||||||
|
{
|
||||||
|
for i
|
||||||
|
do
|
||||||
|
[ -e "$i" ] || { echo "ERROR: $i does not exist" >&2; continue; }
|
||||||
|
printf 'rsync -zaP -e ssh %q ' '--rsync-path=sudo rsync'
|
||||||
|
printf '%q:%q .' "${node.hostname}" "$(printf '%q' "$(readlink -e -- "$i")")"
|
||||||
|
printf '\n'
|
||||||
|
done
|
||||||
|
}
|
||||||
% for k, v in sorted(node.metadata.get('bash_functions', {}).items()):
|
% for k, v in sorted(node.metadata.get('bash_functions', {}).items()):
|
||||||
|
|
||||||
${k}() {
|
${k}() {
|
||||||
${v}
|
${v}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue