ls,ps,watch: measure terminal width on fd 0, not 1
This commit is contained in:
@@ -811,7 +811,7 @@ int ls_main(int argc, char **argv)
|
||||
|
||||
#if ENABLE_FEATURE_AUTOWIDTH
|
||||
/* Obtain the terminal width */
|
||||
get_terminal_width_height(STDOUT_FILENO, &terminal_width, NULL);
|
||||
get_terminal_width_height(STDIN_FILENO, &terminal_width, NULL);
|
||||
/* Go one less... */
|
||||
terminal_width--;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user