Problem
The built-in shortcodes (gh:, gl:, bb:) are convenient, but users often work with other Git hosts or custom organizations and want their own shorthand. Currently there is no way to add new ones without modifying the code.
Proposed feature
Allow users to define custom shortcodes in their config:
[shortcodes]
gh = \"github.com\"
gl = \"gitlab.com\"
bb = \"bitbucket.org\"
work = \"git.company.com\"
upstream = \"github.com/upstream-org\"
These would work like the built-ins:
diecut new gh:user/project
diecut new work:team/scaffold
diecut new upstream:shared/template
CLI helpers
diecut shortcode add gh --host=github.com
diecut shortcode add work https://git.company.com
diecut shortcode remove gh
diecut shortcode list
Design notes
- User shortcodes coexist with built-in shortcodes
- Cannot shadow built-in shortcodes (reject at
shortcode add time)
- Built-in shortcodes take precedence if names conflict
- Shortcode can be a simple host or a full URL prefix
Acceptance criteria
Problem
The built-in shortcodes (
gh:,gl:,bb:) are convenient, but users often work with other Git hosts or custom organizations and want their own shorthand. Currently there is no way to add new ones without modifying the code.Proposed feature
Allow users to define custom shortcodes in their config:
These would work like the built-ins:
CLI helpers
Design notes
shortcode addtime)Acceptance criteria
[shortcodes]config section parseddiecut newpipelinediecut shortcode {add, remove, list}subcommands