diff options
author | Tyler Murphy <tylerm@tylerm.dev> | 2023-04-30 02:18:47 -0400 |
---|---|---|
committer | Tyler Murphy <tylerm@tylerm.dev> | 2023-04-30 02:18:47 -0400 |
commit | 191bf86ef28bc2d91bb22fbbe7057e7f38fc0fe7 (patch) | |
tree | 3f0512ef18753d93390b05562d299855f1406e55 | |
parent | fix ls and add start of ed (diff) | |
download | lazysphere-191bf86ef28bc2d91bb22fbbe7057e7f38fc0fe7.tar.gz lazysphere-191bf86ef28bc2d91bb22fbbe7057e7f38fc0fe7.tar.bz2 lazysphere-191bf86ef28bc2d91bb22fbbe7057e7f38fc0fe7.zip |
fix disable color on single column output
-rw-r--r-- | src/commands/ls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/commands/ls.c b/src/commands/ls.c index 8d64f74..934762d 100644 --- a/src/commands/ls.c +++ b/src/commands/ls.c @@ -261,7 +261,7 @@ static void list_files(struct FileInfo* files, int file_len, struct FileListInfo putchar('\n'); } } else if (flags->one_column) { - printf("%s%s%s\n", color, finfo.name, flags->colored != NO ? "\x1b[0m" : ""); + printf("%s%s%s\n", flags->colored != NO ? color : "", finfo.name, flags->colored != NO ? "\x1b[0m" : ""); } else { if (info.total_len > w.ws_col) { if (i != 0 && i % row_count == 0) putchar('\n'); |