File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -167,10 +167,12 @@ fn main() -> Result<()> {
167167 }
168168
169169 // Resolve the build command: explicit > saved > stdin
170+ let mut using_saved = false ;
170171 let cmd: Vec < String > = if !args. cmd . is_empty ( ) {
171172 args. cmd . clone ( )
172173 } else if let Some ( saved) = load_command ( ) ? {
173174 eprintln ! ( "bx: using saved command: {}" , saved. join( " " ) ) ;
175+ using_saved = true ;
174176 saved
175177 } else {
176178 Vec :: new ( ) // will fall through to stdin check below
@@ -202,7 +204,10 @@ fn main() -> Result<()> {
202204
203205 let blocks = collect_blocks ( & raw , context_limit, & patterns) ;
204206
205- if args. tui {
207+ // Default to TUI when running a saved command with no explicit mode flag.
208+ // If the user passed --tui explicitly, or is using a saved command, open TUI.
209+ let use_tui = args. tui || using_saved;
210+ if use_tui {
206211 let shown: Vec < _ > = blocks. into_iter ( ) . filter ( |b| {
207212 b. severity . is_error ( ) || ( args. warnings && !b. severity . is_error ( ) )
208213 } ) . collect ( ) ;
You can’t perform that action at this time.
0 commit comments