3 ms·
This is certainly a less convenient approach. You always need to parse the class name in your head to open the correct file.
by egze 11y ago
This is certainly a less convenient approach. You always need to parse the class name in your head to open the correct file.
- lojack 11y agoAs a counter argument, when grepping files you still need to parse the output in order to open the correct file. And, yes I understand that you can have grep output a path name and pass that directly in as an argument to your text editor. Similarly, it'd be relatively trivial to write a bash function that'd parse the class name and find the correct file to open. Something like: function lookupcss() { find . | grep $(expr "$1" : '\(.*\)__.*' | sed 's/_/.*/g')".*\.css$"; }