Compare commits

...

2 Commits

Author SHA1 Message Date
Adolfo Perez Alvarez 2340af8c9d Push branch; update ticket urls 2024-02-13 16:27:01 +01:00
Adolfo Perez Alvarez 517a2bd6ca Rename to kpick
I'm no longer using this, preferring miscutils/pick instead. Keeping
around as `kpick` just in case.
2024-02-13 16:26:36 +01:00
3 changed files with 4 additions and 2 deletions

View File

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

4
g
View File

@ -1,13 +1,15 @@
#!/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://issues.liferay.com/browse/"$lps
url="https://liferay.atlassian.net/browse/"$lps
sed -e "s/{lps}/$lps/g" -e "s,{url},$url," <~/.g.template >$tmp
fi
fi

View File