From 8ff4031047a2b0cf5550a5d7609bd479de19c59c Mon Sep 17 00:00:00 2001 From: Oleksii Shevchuk Date: Thu, 16 Mar 2017 21:40:53 +0200 Subject: [PATCH] Truncate 'what' field in w output --- pupy/modules/w.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pupy/modules/w.py b/pupy/modules/w.py index 4650ac45..03fdcdb3 100644 --- a/pupy/modules/w.py +++ b/pupy/modules/w.py @@ -63,7 +63,7 @@ class WModule(PupyModule): object.update({ 'IDLE': colorize(str(timedelta(seconds=session['idle'])), color), 'PID': colorize(str(session.get('pid', '')), color), - 'WHAT': colorize(what, color) + 'WHAT': colorize(what[:30]+'…' if len(what) > 30 else what, color) }) tablein.append(object)