jonas / tig

Text-mode interface for git
https://jonas.github.io/tig/
GNU General Public License v2.0
12.41k stars 606 forks source link

RFE: external command modifier to pause on error (rc != 0) #1339

Open intelfx opened 4 months ago

intelfx commented 4 months ago

It is sometimes convenient to have an external command return to Tig instantly in case of success, but display the output (and wait for the user to understand the output) in case of an error (e.g. in particular any actions involving a merge).

Consider implementing an additional external command modifier (e.g. #) that would:

This modifier could then be combined with !, @ or + for different behavior on success:

koutcher commented 3 months ago

Looks to me that > already acts like ! if there is an error and since 2.5.10, + also reports errors (the first line) in the status window. It is not possible with the current io framework to change a bg command to a fg command in case of error.