mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-11-25 12:49:26 +01:00
bashrc & zshrc: Add gitio function.
Like the name says, it shortens URLs with git.io.
This commit is contained in:
parent
47d53949cf
commit
0bd04767ac
6
bashrc
6
bashrc
@ -407,6 +407,12 @@ case "$1" in
|
||||
fi
|
||||
}
|
||||
|
||||
# Given by nyuszika7h. Shortens GitHub URLs with git.io
|
||||
gitio () {
|
||||
curl -s -i http://git.io -F "url=$1" | grep
|
||||
--color=never -P '^Location: ' | awk '{ print $2 }'
|
||||
}
|
||||
|
||||
##### Tmux (example) 4G2W9C #####
|
||||
|
||||
# This should be put in .custom or .bash_custom
|
||||
|
6
zshrc
6
zshrc
@ -350,6 +350,12 @@ case "$1" in
|
||||
fi
|
||||
}
|
||||
|
||||
# Given by nyuszika7h. Shortens GitHub URLs with git.io
|
||||
gitio () {
|
||||
curl -s -i http://git.io -F "url=$1" | grep
|
||||
--color=never -P '^Location: ' | awk '{ print $2 }'
|
||||
}
|
||||
|
||||
##### Tmux (example) 4G2W9C #####
|
||||
|
||||
# This should be put in .custom or .zsh_custom
|
||||
|
Loading…
Reference in New Issue
Block a user