Added sshgit function

This commit is contained in:
Tibo De Peuter 2022-06-13 11:34:58 +02:00
parent 615ee05309
commit 8fee0aaf97

View file

@ -99,25 +99,20 @@ alias helios='ssh tdpeuter@helios.ugent.be'
alias resblue='systemctl restart bluetooth' alias resblue='systemctl restart bluetooth'
alias Personal='cd ~/Documents/synchronisatie/Personal/_PERSOONLIJK/' alias Personal='cd ~/Documents/synchronisatie/Personal/_PERSOONLIJK/'
alias UGent='cd ~/Documents/synchronisatie/UGent/Informatica\ J1\ 2021-2022/' alias UGent='cd ~/Documents/synchronisatie/UGent/Informatica\ J1\ 2021-2022/'
alias vol='~/.scripts/vol.sh'
vol () { sshgit () {
if [[ $# == 0 ]] ; then # Check arguments
echo "Volume: $(pamixer --get-volume-human)" if [[ $# -lt 2 ]] ; then
elif [[ "$1" =~ ^[0-9]*$ ]] ; then echo "Requires at least two arguments"
pamixer --set-volume "${1}" exit 1
vol
elif [[ "$1" =~ ^[+] ]] ; then
pamixer -i "${1#\+}"
vol
elif [[ "$1" =~ ^- ]] ; then
pamixer -d "${1#-}"
vol
elif [[ "$1" =~ m ]] ; then
pamixer --toggle
vol
fi fi
ssh_key="$1"
shift
GIT_SSH_COMMAND="ssh -i ${ssh_key}" git $@
} }
cpdir () { cpdir () {