kmdr-cli icon indicating copy to clipboard operation
kmdr-cli copied to clipboard

tar and ps support writing parameters without leading dashes

Open ghost opened this issue 5 years ago • 1 comments

Describe the bug With tar (and ps and other tools as well), e.g.tar -xp is synonymous to tar xp. Right now, for both tar and ps, kmdr currently only recognizes the tar -xp form of the command properly. Otherwise, it will tell you things like xp -- an operand.

To Reproduce

  1. kmdr explain
  2. tar xp

Expected behavior Treat dash-prefixed parameters the same as unprefixed ones for these kinds of commands.

Desktop (please complete the following information):

  • OS: Linux
  • Browser: no
  • Version: no

ghost avatar Dec 18 '19 17:12 ghost

Hi @sknorr , thanks for the issue 👍

The parser would need to handle a special case for programs that accept BSD-like options. I'll focus on ps and tar, are there more?

ediardo avatar Dec 22 '19 05:12 ediardo