From 6cb42d6b8d889a832c19b6e0f58d29af78009d99 Mon Sep 17 00:00:00 2001 From: xiubuzhe Date: Sun, 15 Oct 2023 23:51:49 +0800 Subject: add bash-complete scripts --- bin/sunhpc | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'bin') diff --git a/bin/sunhpc b/bin/sunhpc index de4dac7..840f538 100755 --- a/bin/sunhpc +++ b/bin/sunhpc @@ -13,14 +13,7 @@ if sys.getdefaultencoding() != 'utf-8': reload(sys) sys.setdefaultencoding('utf-8') -def ttySize(): - try: - (width, heigh) = shutil.get_terminal_size() - except: - width = 80 - return width - -os.environ['COLUMNS'] = str(ttySize()) +os.environ['COLUMNS'] = str(sunhpc.commands.get_help_width()) syslog.openlog('SunhpcCMD', syslog.LOG_PID, syslog.LOG_LOCAL0) try: -- cgit v1.2.3