Edit config bash

This commit is contained in:
2025-03-23 11:44:29 +04:00
parent e1fd8f6718
commit 9a7661010b
3 changed files with 16 additions and 5 deletions

14
.bashrc
View File

@@ -68,6 +68,20 @@ _lori_completion() {
}
complete -F _lori_completion lori
myalias() {
local RED=$(tput setaf 1)
local GREEN=$(tput setaf 2)
local normal=$(tput sgr0)
echo "My custom aliases:"
printf "%-20s %s\n" "Alias" "Command"
echo "------------------------------"
for key in $(cat ~/.dotfiles/alias/bash_aliases | awk '{print $2}' | awk -F"=" '{print $1}'); do
command=$(cat ~/.dotfiles/alias/bash_aliases | grep "${key}" | awk -F"=" '{print $2}')
printf "%-20s %s\n" "${RED}$key${normal}" "${GREEN}$command${normal}"
done | sort
return 0
}
complete -F myalias
# load bash alias
if [ -f ~/.dotfiles/bash_aliases ]; then
. ~/.dotfiles/.bash_aliases

View File

@@ -1,13 +1,10 @@
alias af="cd /home/h0lik/dev/ansible"
# Start/Stop VM ansible
alias agup="sudo virsh start ansible"
alias agdown="sudo virsh shutdown ansible"
#Connect SSH ansible-gateway
alias assh="ssh ansible"
alias devsrv="ssh worksrv"
alias grep="grep --color=auto"
alias host-ssh="/home/h0lik/.bin/./ssh-host.sh"
# Git Alias bash
alias ga="git add"
alias gc="git commit -m"
alias gp="git push -u"