Compare commits

..

1 Commits

Author SHA1 Message Date
Adolfo Perez Alvarez 25a2f15ada Rename to kpick
I'm no longer using this, preferring miscutils/pick instead. Keeping
around as `kpick` just in case.
2023-09-12 17:06:32 +02:00
2 changed files with 2 additions and 4 deletions

View File

@ -1,5 +1,5 @@
BINDIR?=${HOME}/.local/bin
cmds=g kpick
cmds=g pick
fns=diralias j jmod nsalias
install:
install ${fns} $${FPATH:?FPATH not defined}

4
g
View File

@ -1,15 +1,13 @@
#!/usr/bin/env ksh
if [[ $1 = "pc" || ( $1 = "pr" && $2 = "create" ) ]]
then
remote=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null | cut -d/ -f1)
git push --set-upstream ${remote:-origin} $(git branch --show-current)
tmp=$(mktemp /tmp/g.XXXXXXXXXXX.md)
if [[ -f ~/.g.template ]]
then
lps=$(git show --pretty='format:%s' --no-patch | cut -d' ' -f1)
if [[ ! -z $lps ]]
then
url="https://liferay.atlassian.net/browse/"$lps
url="https://issues.liferay.com/browse/"$lps
sed -e "s/{lps}/$lps/g" -e "s,{url},$url," <~/.g.template >$tmp
fi
fi