Skip to content

[Feature Request]: Suggest sudo if no suggestion found #76

@non-bin

Description

@non-bin

What do you want us to work on?

EDIT: Looking at https://github.com/iffse/pay-respects/blob/main/rules/_PR_PRIVILEGE.toml it seems like it should have been suggested because it includes the phrase be root. I still think this should be the backup though, for vim for exaple because it will just time out

If F finds no suggestions, it should suggest elevating privileges

for example:

$ framework_tool --power -vv
Must be root to get SMBIOS data.
Failed to find SMBIOS
Must be root to get SMBIOS data.
Failed to find SMBIOS
Must be root to get SMBIOS data.
Error: "Fail"
$ f
No suggestion found for command: framework_tool --power -vv

If you think there should be a suggestion, please open an issue or send a pull request!
https://github.com/iffse/pay-respects
$ sudo framework_tool --power -vv
Charger Status
  AC is:            not connected
  Charger Voltage:  17600mV
  Charger Current:  1096mA
                    0.20C
  Chg Input Current:432mA
  Battery SoC:      64%
Battery Status
  AC is:            not connected
  Battery is:       connected
  Battery LFCC:     5074 mAh (Last Full Charge Capacity)
  Battery Capacity: 3217 mAh
                    50.239 Wh
  Charge level:     63%
  Manufacturer:     NVT
  Model Number:     FRANDBA
  Serial Number:    0198
  Battery Type:     LION
  Present Voltage:  15.617 V
  Present Rate:     1121 mA
  Design Capacity:  5491 mAh
                    85.0 Wh
  Design Voltage:   15.480 V
  Cycle Count:      133
  Battery discharging

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