aristocratos / aristocratos/bashtop

[BUG] Sort should be numeric

Open
#190 0 comments 0 reactions 1 assignee Claimed by @aristocratos View on GitHub
bug
Dominant language
Shell
Stars
11.1k
Forks
555
PR merge metrics
No merged PRs in 30d

Description

**Sort should be numeric instead of alphabetic**

when sorting by memory, threads or CPU 15 comes after 2 because (apparently) it uses alphabetic sorting.

**To Reproduce**

This happens if you have a number that comes alphabetically before but has a higher absolute value than other. (e.g. 15 and 2 or 25 and three).

**Expected behavior**

should behave like coreutils `sort -n` (numeric sort)

**Screenshots**

![2020-08-24-14:31:37](https://user-images.githubusercontent.com/10230449/91045294-f60df400-e616-11ea-95fe-a8d144898c7a.png)

**Info (please complete the following information):**
- Bashtop version: 0.9.25
- (Linux) Linux distribution and version: Ubuntu 18.04 updated
- Terminal used: Konsole
- Font used: Hack NerdFont Regular
- Bash version, `bash --version` (version 4.4 or above is required): 4.4.20
- Locales: output of `locale -v`
```
LANG=C.UTF-8
LANGUAGE=
LC_CTYPE="C.UTF-8"
LC_NUMERIC=C.UTF-8
LC_TIME=C.UTF-8
LC_COLLATE="C.UTF-8"
LC_MONETARY=C.UTF-8
LC_MESSAGES="C.UTF-8"
LC_PAPER=C.UTF-8
LC_NAME=C.UTF-8
LC_ADDRESS=C.UTF-8
LC_TELEPHONE=C.UTF-8
LC_MEASUREMENT=C.UTF-8
LC_IDENTIFICATION=C.UTF-8
LC_ALL=
```

**Additional context**

contents of `$HOME/.config/bashtop/error.log`
```
New instance of bashtop version: 0.9.25 Pid: 5478
PSUTIL ERROR! Command: get_disks(exclude='squashfs')
not sure how to interpret line ' 7 0 loop0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n'
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.