add bash-complete scripts

This commit is contained in:
2023-10-15 23:51:49 +08:00
parent 98fae3427e
commit 6cb42d6b8d
6 changed files with 173 additions and 198 deletions

View File

@@ -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: