add custom aliases

This commit is contained in:
Blacky 2025-02-08 16:53:08 +01:00
parent 7928a352be
commit 002e0354ab
Signed by: gaschz
GPG Key ID: EFEB8B80EB571D07
4 changed files with 63 additions and 0 deletions

45
copy-root.sls Normal file
View 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
View File

@ -0,0 +1,9 @@
{#
SPDX-FileCopyrightText: 2024 Blacky <blacky@blackies.de>
SPDX-License-Identifier: AGPL-3.0-or-later
#}
base:
'*':
- dotfiles.copy-root

View 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 /'

View File

@ -340,6 +340,10 @@ _fzf_comprun() {
esac
}
alias l='ls -al'
alias ..='cd ..'
alias ...='cd ../..'
## }}}
## {{{ End
## Source local shell configuration file.