Skip to content

Commit

Permalink
Fix outputting commands longer than 100 characters
Browse files Browse the repository at this point in the history
  • Loading branch information
peci1 committed May 16, 2021
1 parent 5971c18 commit f6a843d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.0.3

- Fixed outputting commands longer than 100 characters.

## 1.0.2

- No change, just re-release.
Expand All @@ -11,4 +15,4 @@

## 1.0

- Basic functionality, supports reading nvidia-smi from stdin, or calling it internally if not stdin is provided.
- Basic functionality, supports reading nvidia-smi from stdin, or calling it internally if not stdin is provided.
2 changes: 1 addition & 1 deletion nvidia-htop.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def colorize(_lines):
cpu[idx] = parts[2]
mem[idx] = parts[3]
time[idx] = parts[4] if "-" not in parts[4] else parts[4].split("-")[0] + " days"
command[idx] = parts[5][0:100]
command[idx] = parts[5]

format = ("| %3s %5s %8s %8s %5s %5s %9s %-" + str(command_length) + "." + str(command_length) + "s |")

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
long_description = (here / 'README.md').read_text(encoding='utf-8')

setup(name='nvidia-htop',
version='1.0.2',
version='1.0.3',
description='A tool for enriching the output of nvidia-smi',
long_description=long_description,
long_description_content_type='text/markdown',
Expand Down

0 comments on commit f6a843d

Please sign in to comment.