Create a Makefile for installation
This commit is contained in:
parent
826c5db8e4
commit
6a3e7e7936
20 changed files with 33 additions and 8 deletions
41
functions
Normal file
41
functions
Normal file
|
@ -0,0 +1,41 @@
|
|||
function g {
|
||||
if [[ $# > 0 ]]; then
|
||||
git $@
|
||||
else
|
||||
git status
|
||||
fi
|
||||
}
|
||||
compdef g=git
|
||||
|
||||
insert-sudo() {
|
||||
zle beginning-of-line
|
||||
zle -U "sudo "
|
||||
}
|
||||
|
||||
function port-forward {
|
||||
if [ $# -lt 2 ]; then
|
||||
echo Usage: port-forward HOST LOCAL_PORT \[REMOTE_PORT\]
|
||||
else
|
||||
ssh $1 -R ${3:-$2}":localhost:"$2 -g
|
||||
fi
|
||||
}
|
||||
|
||||
function map-sshfs {
|
||||
if [ $# -eq 0 ]; then
|
||||
echo Usage: map-sshfs HOST DIRECTORY MOUNT
|
||||
else
|
||||
sshfs -o idmap=user -o workaround=rename $USER'@'$1':'$2 $HOME'/Mounts/'$3
|
||||
fi
|
||||
}
|
||||
|
||||
function gitignore-io {
|
||||
curl https://www.gitignore.io/api/$@
|
||||
}
|
||||
|
||||
function git-date-added {
|
||||
if [ $# -eq 0 ]; then
|
||||
echo Usage: git-date-added FILENAME
|
||||
else
|
||||
git log --format=%aD $1 | tail -1
|
||||
fi
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue