jond3k/yay — Issue #12: default action should use colour if a file wasn't found
Author: jond3k
Created: 2012-01-21 20:32:45+00:00
State: open

a user thinks the default action should colour something in, not load a template

e.g. this currently tries to load the file 'cheese', but should instead colour cheese in with a default colour

> yay cheese

but the current behaviour is still pretty good. clearly we have two use cases to cover:

1) when a user wants to grep and colour one match
2) when a user wants to use a default colour file

we can cover both these cases with the following rule:

1) yay cheese -> try to load file 'cheese'
2) if cheese not found, imply 'cheese is yellow'

we do need a third rule for sequences:

3) yay cheese,bacon -> without colours, rotate around a default colour list so 'cheese is yellow, bacon is red'

this should only affect one line commands, not template files.