mirror of
https://github.com/1xtier/.dotfiles.git
synced 2026-03-17 10:57:57 +00:00
Edit config bash
This commit is contained in:
14
.bashrc
14
.bashrc
@@ -68,6 +68,20 @@ _lori_completion() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
complete -F _lori_completion lori
|
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
|
# load bash alias
|
||||||
if [ -f ~/.dotfiles/bash_aliases ]; then
|
if [ -f ~/.dotfiles/bash_aliases ]; then
|
||||||
. ~/.dotfiles/.bash_aliases
|
. ~/.dotfiles/.bash_aliases
|
||||||
|
|||||||
@@ -1,13 +1,10 @@
|
|||||||
alias af="cd /home/h0lik/dev/ansible"
|
alias af="cd /home/h0lik/dev/ansible"
|
||||||
# Start/Stop VM ansible
|
|
||||||
alias agup="sudo virsh start ansible"
|
alias agup="sudo virsh start ansible"
|
||||||
alias agdown="sudo virsh shutdown ansible"
|
alias agdown="sudo virsh shutdown ansible"
|
||||||
#Connect SSH ansible-gateway
|
|
||||||
alias assh="ssh ansible"
|
alias assh="ssh ansible"
|
||||||
alias devsrv="ssh worksrv"
|
alias devsrv="ssh worksrv"
|
||||||
alias grep="grep --color=auto"
|
alias grep="grep --color=auto"
|
||||||
alias host-ssh="/home/h0lik/.bin/./ssh-host.sh"
|
alias host-ssh="/home/h0lik/.bin/./ssh-host.sh"
|
||||||
# Git Alias bash
|
|
||||||
alias ga="git add"
|
alias ga="git add"
|
||||||
alias gc="git commit -m"
|
alias gc="git commit -m"
|
||||||
alias gp="git push -u"
|
alias gp="git push -u"
|
||||||
|
|||||||
Reference in New Issue
Block a user