summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorxiubuzhe <xiubuzhe@sina.com>2023-10-15 23:51:49 +0800
committerxiubuzhe <xiubuzhe@sina.com>2023-10-15 23:51:49 +0800
commit6cb42d6b8d889a832c19b6e0f58d29af78009d99 (patch)
treeffcfd95f189b324cfe149b152612ea64551ecf4e /bin
parent98fae3427e6791003e64572a2a6ca317c72473ef (diff)
downloadsunhpc-6cb42d6b8d889a832c19b6e0f58d29af78009d99.tar.gz
sunhpc-6cb42d6b8d889a832c19b6e0f58d29af78009d99.tar.bz2
sunhpc-6cb42d6b8d889a832c19b6e0f58d29af78009d99.zip
add bash-complete scripts
Diffstat (limited to 'bin')
-rwxr-xr-xbin/sunhpc9
1 files changed, 1 insertions, 8 deletions
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: