mirror of
https://github.com/gaschz/dotfiles.git
synced 2025-03-01 14:22:33 +01:00
add custom aliases
This commit is contained in:
parent
7928a352be
commit
002e0354ab
45
copy-root.sls
Normal file
45
copy-root.sls
Normal file
@ -0,0 +1,45 @@
|
||||
{#
|
||||
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
{%- import "dom0/gui-user.jinja" as gui_user -%}
|
||||
|
||||
"{{ slsdotpath }}-copy-root":
|
||||
file.managed:
|
||||
- name: /etc/profile.d/zzz-alias.sh
|
||||
- source: salt://{{ slsdotpath }}/files/aliases/zzz-alias.sh
|
||||
- mode: '0644'
|
||||
- user: root
|
||||
- group: root
|
||||
|
||||
{% if grains['nodename'] != 'dom0' -%}
|
||||
|
||||
"{{ slsdotpath }}-root-bashrc-dircolors":
|
||||
file.replace:
|
||||
- name: /root/.bashrc
|
||||
- pattern: '^# eval '
|
||||
- repl: 'eval '
|
||||
|
||||
"{{ slsdotpath }}-root-bashrc-alias-ls":
|
||||
file.replace:
|
||||
- name: /root/.bashrc
|
||||
- pattern: '^# alias ls='
|
||||
- repl: 'alias ls='
|
||||
|
||||
"{{ slsdotpath }}-root-bashrc-append":
|
||||
file.append:
|
||||
- require:
|
||||
- file: "{{ slsdotpath }}-copy-root"
|
||||
- name: /root/.bashrc
|
||||
- text: "source /etc/profile.d/zzz-alias.sh"
|
||||
|
||||
"{{ slsdotpath }}-user-bashrc-append":
|
||||
file.append:
|
||||
- require:
|
||||
- file: "{{ slsdotpath }}-copy-root"
|
||||
- name: /home/user/.bashrc
|
||||
- text: "source /etc/profile.d/zzz-alias.sh"
|
||||
|
||||
{% endif -%}
|
9
copy-root.top
Normal file
9
copy-root.top
Normal file
@ -0,0 +1,9 @@
|
||||
{#
|
||||
SPDX-FileCopyrightText: 2024 Blacky <blacky@blackies.de>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
base:
|
||||
'*':
|
||||
- dotfiles.copy-root
|
5
files/aliases/zzz-alias.sh
Normal file
5
files/aliases/zzz-alias.sh
Normal file
@ -0,0 +1,5 @@
|
||||
alias l='ls --color=auto -al'
|
||||
alias ..='cd ..'
|
||||
alias ...='cd ../..'
|
||||
alias qusaltar='tar cvzf /Daten/donner0/qusal.tar.gz /srv/salt/qusal /root/*salt /etc/salt/minion.d/qusal.conf'
|
||||
alias qusaluntar='tar xvzf /Daten/donner0/qusal.tar.gz -C /'
|
@ -340,6 +340,10 @@ _fzf_comprun() {
|
||||
esac
|
||||
}
|
||||
|
||||
alias l='ls -al'
|
||||
alias ..='cd ..'
|
||||
alias ...='cd ../..'
|
||||
|
||||
## }}}
|
||||
## {{{ End
|
||||
## Source local shell configuration file.
|
||||
|
Loading…
x
Reference in New Issue
Block a user