Skip to content

Instantly share code, notes, and snippets.

@assertnotnull
Last active May 26, 2026 15:46
Show Gist options
  • Select an option

  • Save assertnotnull/d16fbf6439999acb0bcd0718de805ff9 to your computer and use it in GitHub Desktop.

Select an option

Save assertnotnull/d16fbf6439999acb0bcd0718de805ff9 to your computer and use it in GitHub Desktop.
Fish shell: git town propose with PR renamed
function branch-title
set -l branch $argv[1]
if test -z "$branch"
set branch (git branch --show-current)
end
echo $branch | sed -E \
's|^([^/]+)/([a-zA-Z]+)-([0-9]+)-(.*)$|\1(\U\2\E-\3): \L\4|; s|-| |g; s|\(([A-Z]+) ([0-9]+)\)|(\1-\2)|'
end
function gpr
branch-title | xargs -I {} git propose -t {}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment