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 Personal='cd ~/Documents/synchronisatie/Personal/_PERSOONLIJK/'
alias UGent='cd ~/Documents/synchronisatie/UGent/Informatica\ J1\ 2021-2022/'
alias vol='~/.scripts/vol.sh'
vol () {
sshgit () {
if [[ $# == 0 ]] ; then
echo "Volume: $(pamixer --get-volume-human)"
elif [[ "$1" =~ ^[0-9]*$ ]] ; then
pamixer --set-volume "${1}"
vol
elif [[ "$1" =~ ^[+] ]] ; then
pamixer -i "${1#\+}"
vol
elif [[ "$1" =~ ^- ]] ; then
pamixer -d "${1#-}"
vol
elif [[ "$1" =~ m ]] ; then
pamixer --toggle
vol
# Check arguments
if [[ $# -lt 2 ]] ; then
echo "Requires at least two arguments"
exit 1
fi
ssh_key="$1"
shift
GIT_SSH_COMMAND="ssh -i ${ssh_key}" git $@
}
cpdir () {