Skip to content

-p doesn't follow expecations... #29

Description

@fiveangle

One would expect dfc -p <filesystem> to result in either exact string matching, or substring matching, but it seems it does half of both by doing substring matching but only on the first instance it encounters, which is unexpected:

(venv) speedster@hoffman:/mnt$ dfc -p acre
FILESYSTEM              (=) USED      FREE (-)  %USED AVAILABLE  TOTAL MOUNTED ON     
acre1                   [==================--]  86.5%      5.7T  42.0T /farm/acre1    
(venv) speedster@hoffman:/mnt$ df |grep acre
acre1                   45119552512 39009344512  6110208000  87% /farm/acre1
/dev/sdak1              15625875456 15623655424     2220032 100% /farm/acre2
/dev/sdao2               4883638272  4782704640   100933632  98% /farm/acre7
/dev/sdam2               1953463296  1806845952   146617344  93% /farm/acre3
/dev/sdap2                976745472   956641024    20104448  98% /farm/acre6
/dev/sdf2               15625859072  3976003584 11649855488  26% /farm/acre4
/dev/sdan1               5860519936  3721060352  2139459584  64% /farm/acre8
/dev/sdar1               5860519936  1806887296  4053632640  31% /farm/acre5
/dev/sdas1               3907014912  2869947264  1037067648  74% /farm/acre12
/dev/sdat1               3907014912      123648  3906891264   1% /farm/acre14

Ideally, it would be cool to get the substring search result of both device and mount path strings but if that's too complicated, matching only exact would be less confusing because it gives heart attack the way it's currently implemented ;)

[note: and if you do decide to implement full substring matching, number sort would be a nice cherry on top, but certainly not required 😀

Thanks for making such a wonderful console visual utility ! ⭐⭐⭐⭐⭐

-=dave

(venv) speedster@hoffman:/mnt$ dfc -v
dfc 3.1.1
(venv) speedster@hoffman:/mnt$ uname -a
Linux hoffman 5.4.106-1-pve #1 SMP PVE 5.4.106-1 (Fri, 19 Mar 2021 11:08:47 +0100) x86_64 GNU/Linux

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions