hawk icon indicating copy to clipboard operation
hawk copied to clipboard

magic rules

Open gelisam opened this issue 11 years ago • 7 comments

The current code considers the uses at the top of this list to be more common than the uses at the bottom:

  1. manipulate the input as a table ([[_]] -> _)
  2. manipulate the input as a list of lines ([_] -> _)
  3. apply the expression to each line (_ -> _)
  4. evaluate the expression, ignoring the input (_)

So when magic encounters a case where what the user wants to do is ambiguous, it pick the most likely candidate. Perhaps there could be a --verbose mode in which we print to stderr which other interpretations would have made sense, and tell the user which flags they could use to force that interpretation?

gelisam avatar Aug 27 '13 12:08 gelisam