Fossil SCM

Honor the NO_COLOR environment variable for the "fossil sys ls" command.

drh 2026-05-04 10:22 UTC trunk
Commit 471f4d00c87722db52c057e780adac34069789da075140401547330823f60d50
1 file changed +1 -1
+1 -1
--- src/xsystem.c
+++ src/xsystem.c
@@ -415,11 +415,11 @@
415415
xsystem_ls_insert(pStmt, z, mFlags);
416416
}
417417
}
418418
}
419419
if( fossil_isatty(1) ){
420
- if( bAutoColor ) mFlags |= LS_COLOR;
420
+ if( bAutoColor && terminal_is_vt100() ) mFlags |= LS_COLOR;
421421
mFlags |= LS_COLUMNS;
422422
}
423423
if( nFile>0 ){
424424
xsystem_ls_render(db, mFlags);
425425
needBlankLine = 1;
426426
--- src/xsystem.c
+++ src/xsystem.c
@@ -415,11 +415,11 @@
415 xsystem_ls_insert(pStmt, z, mFlags);
416 }
417 }
418 }
419 if( fossil_isatty(1) ){
420 if( bAutoColor ) mFlags |= LS_COLOR;
421 mFlags |= LS_COLUMNS;
422 }
423 if( nFile>0 ){
424 xsystem_ls_render(db, mFlags);
425 needBlankLine = 1;
426
--- src/xsystem.c
+++ src/xsystem.c
@@ -415,11 +415,11 @@
415 xsystem_ls_insert(pStmt, z, mFlags);
416 }
417 }
418 }
419 if( fossil_isatty(1) ){
420 if( bAutoColor && terminal_is_vt100() ) mFlags |= LS_COLOR;
421 mFlags |= LS_COLUMNS;
422 }
423 if( nFile>0 ){
424 xsystem_ls_render(db, mFlags);
425 needBlankLine = 1;
426

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button