Would you consider an 'alias' style support similar to what git has
Especially the part about supporting ! execution of scripts.
I could create a wt alias for clone, that runs a basic script that sets up a bare repo, does a switch for the default branch, fixes up heads etc.
Folks could create a wt alias for ls=list
Thanks for the suggestion! This is a feature request rather than a bug, so I'll leave it for a maintainer to evaluate and prioritize.
Worth noting that #406 tracks a related request for built-in shorthand support (wt ls, wt rm). This issue goes further by proposing user-configurable aliases with ! script execution, similar to git's [alias] config section. A maintainer can decide whether these should be addressed together or separately.
yes I think this could work, and would be a solution to #406
let me think of a good design. I think we could use templating like we do in the other areas to provide a nice interface.
I wasn't looking to expand wt into a general task runner / etc, so we should think about how to keep it relatively focused!
The combination of git alias and the auto resolution of “git xyz” to git-xyz are incredibly powerful extension capabilities. 2 simple ideas that brought forth tons of little customizations and scripts.
Yes there are some complexities with cli completion in these scenarios but once you have them I think you solve 90% of customization scenarios.
+1. I would personally create something like wt new for wt switch -c. Alias support would be very nice.
I created #1369 for this very purpose with default visible alias for switch (s), list (ls), and remove (rm). IMO s makes sense for switch given that its likely the most commonly used command, but ls and rm are objectively good UX given that they're unix convention. Would love to hear any feedback though!
this is done https://github.com/max-sixty/worktrunk/pull/1348, at least to the extent we can experiment with it. Currently it's at wt step to keep the top level clean, we could consider promoting to top level depending on how it goes.
thank you for the suggestion @cavanaug !
will release soon, expect there to be some sharp corners for a couple of releases
im looking forward to trying it out this week!! thanks!!
@max-sixty Chiming in to say that supporting aliases at the new level would be most appreciated.
wt sw = wt switch
wt ls = wt list
wt new = wt switch -c
etc