mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-29 17:32:43 +00:00
When "-c" is specified, don't pad the command with spaces if it is
the last field on the line. "ps -axlc" was needlessly wrapping around on 80-character windows.
This commit is contained in:
parent
eff7ae0f7b
commit
3cc273e0be
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=24983
@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
* $Id: print.c,v 1.19 1997/02/22 14:05:05 peter Exp $
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@ -103,6 +103,9 @@ command(k, ve)
|
||||
v = ve->var;
|
||||
|
||||
if (cflag) {
|
||||
if (ve->next == NULL) /* last field, don't pad */
|
||||
(void)printf("%s", KI_PROC(k)->p_comm);
|
||||
else
|
||||
(void)printf("%-*s", v->width, KI_PROC(k)->p_comm);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user