Closed agzam closed 1 year ago
It is done. I used insert, but the signature and the arguments that they accept are basically the same. You can have difficulty inserting into a completely empty group, but this shouldn't stop you from doing anything practically.
Doesn't look what I had in mind. Sometimes you want to add new keys to existing transients, for example:
(defun +magit-log-orig_head--head (args files)
"Compare log since the last pull. i.e.: show only commits between last pull the head."
(interactive (magit-log-arguments))
(magit-log-other
(list "ORIG_HEAD..HEAD")
(car (magit-log-arguments)) files))
(transient-append-suffix 'magit-log "l"
'("p" "orig_head..head" +magit-log-orig_head--head))
This adds a new thing to the magit-log
transient
I did it dynamically, using user input to fill out the argument list. The magit example you have shown is the same thing, but the arguments are hard-coded and the LOC argument is a letter instead of a coordinate. That should help you read the example.
Would be nice to have examples of
transient-append-suffix
. Thanks.