bash: aliases
This commit is contained in:
parent
6bbb3da2b6
commit
39f988fc44
1 changed files with 24 additions and 30 deletions
18
.bash_extra
18
.bash_extra
|
@ -125,21 +125,21 @@ function gc {
|
|||
--help | -h)
|
||||
cat <<EOF
|
||||
|
||||
Description:
|
||||
Description:
|
||||
"git checkout" on steroids
|
||||
|
||||
Usage:
|
||||
Usage:
|
||||
gc [--help|--new-branch] [branch]
|
||||
|
||||
Options:
|
||||
Options:
|
||||
-h, --help Print this help.
|
||||
-b, --new-branch Create a new Branch instead changing to an existing branch.
|
||||
|
||||
Author:
|
||||
Author:
|
||||
michael.grote@posteo.de - git.mgrote.net
|
||||
EOF
|
||||
;;
|
||||
--new-branch | -b)
|
||||
;;
|
||||
--new-branch | -b)
|
||||
(git checkout --quiet -b "$2" && git push --set-upstream "$(git remote | head -n 1)" "$2" && echo '>>> Create new branch "'"$2"'"') ||
|
||||
(git checkout --quiet "$2" > /dev/null 2>&1 && echo '>>> Branch already exists, checking out... ')
|
||||
;;
|
||||
|
@ -250,9 +250,3 @@ alias dcr="docker-compose down && docker-compose up -d"
|
|||
alias mv="mv -i "
|
||||
alias cp="cp -i "
|
||||
alias rm="rm -i "
|
||||
# rest
|
||||
alias suspend="~/dotfiles/scripts/pwr.sh -sd"
|
||||
alias hibernate="~/dotfiles/scripts/pwr.sh -hb"
|
||||
alias restart="~/dotfiles/scripts/pwr.sh -r"
|
||||
alias shutdown="~/dotfiles/scripts/pwr.sh -s"
|
||||
alias reboot="~/dotfiles/scripts/pwr.sh -r"
|
||||
|
|
Loading…
Reference in a new issue