runme icon indicating copy to clipboard operation
runme copied to clipboard

Accept filename and code block id as parameter

Open christian-bromann opened this issue 2 years ago • 2 comments

Suggest to remove the --chdir and filename parameter as it feels not very familiar. Given the natural way devs us ls is suggest to allow passing in the readme path as parameter, e.g.:

Instead of:

runme ls --chdir ./examples --filename README.md

Just do:

runme ls ./examples/README.md

Same for executing code blocks:

runme run ./examples/README.md myExampleCodeBlock

christian-bromann avatar Dec 13 '22 19:12 christian-bromann

I agree that --chdir and --filename are a poor UX design choice. The suggestions also make sense. The only thing is to provide good defaults which seem to fit nicely here:

  • runme ls would default to the current working directory and README.md
  • runme run myExampleCodeBlock would work the same and it's easy to distinct these two examples by the number of provided arguments.

adambabik avatar Dec 14 '22 09:12 adambabik

@adambabik makes sense to me

christian-bromann avatar Dec 14 '22 15:12 christian-bromann