diff options
author | ache <ache@FreeBSD.org> | 2000-06-06 12:44:29 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2000-06-06 12:44:29 +0000 |
commit | 21eb10009f66492192b39ddbfb8d444669237149 (patch) | |
tree | b18ce0601e4d1da959134b805e937a55bdb0d2fb /bin/ls/ls.c | |
parent | 1bb87dcd8c54dc505c30179881663e59d80c69d4 (diff) | |
download | FreeBSD-src-21eb10009f66492192b39ddbfb8d444669237149.zip FreeBSD-src-21eb10009f66492192b39ddbfb8d444669237149.tar.gz |
Greately simplify oxtabs fix by simple setting f_notabs for f_color
Diffstat (limited to 'bin/ls/ls.c')
-rw-r--r-- | bin/ls/ls.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/bin/ls/ls.c b/bin/ls/ls.c index 84bc730..ac63133 100644 --- a/bin/ls/ls.c +++ b/bin/ls/ls.c @@ -298,6 +298,12 @@ main(argc, argv) #ifdef COLORLS if (f_color) { + /* + * We can't put tabs and color sequences together: + * column number will be incremented incorrectly + * for "stty oxtabs" mode. + */ + f_notabs = 1; (void) signal(SIGINT, colorquit); (void) signal(SIGQUIT, colorquit); parsecolors(getenv("LSCOLORS")); @@ -521,7 +527,10 @@ display(p, list) case 4: maxgroup = 0; case 5: maxflags = 0; case 6: maxsize = 0; - case 7: maxlen = 0, f_notabs = 0; + case 7: maxlen = 0; +#ifndef COLORLS + f_notabs = 0; +#endif } maxinode = makenines(maxinode); maxblock = makenines(maxblock); |