{"action":"created","issue":{"url":"https://api.github.com/repos/facelessuser/ApplySyntax/issues/70","labels_url":"https://api.github.com/repos/facelessuser/ApplySyntax/issues/70/labels{/name}","comments_url":"https://api.github.com/repos/facelessuser/ApplySyntax/issues/70/comments","events_url":"https://api.github.com/repos/facelessuser/ApplySyntax/issues/70/events","html_url":"https://github.com/facelessuser/ApplySyntax/issues/70","id":69009266,"number":70,"title":"Should filename used to match file_name expression have path stripped?","user":{"login":"jguice","id":587350,"avatar_url":"https://avatars.githubusercontent.com/u/587350?v=3","gravatar_id":"","url":"https://api.github.com/users/jguice","html_url":"https://github.com/jguice","followers_url":"https://api.github.com/users/jguice/followers","following_url":"https://api.github.com/users/jguice/following{/other_user}","gists_url":"https://api.github.com/users/jguice/gists{/gist_id}","starred_url":"https://api.github.com/users/jguice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jguice/subscriptions","organizations_url":"https://api.github.com/users/jguice/orgs","repos_url":"https://api.github.com/users/jguice/repos","events_url":"https://api.github.com/users/jguice/events{/privacy}","received_events_url":"https://api.github.com/users/jguice/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facelessuser/ApplySyntax/labels/Question","name":"Question","color":"5319e7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-16T21:03:34Z","updated_at":"2015-04-16T21:25:08Z","closed_at":"2015-04-16T21:25:08Z","body":"I was just trying to setup some files with no extensions as a particular syntax was confused about why it wasn't working.\r\n\r\nAfter some fiddling I realized that the .* on the left-hand side of the default rules isn't just there because it's matching a variable filename, but it's also matching the path.\r\n\r\ne.g. my attempt at a rule like this wasn't working:\r\n\r\n`{\"file_name\": \"myfilename$\"}`\r\n\r\nbut this works:\r\n\r\n`{\"file_name\": \".*/myfilename$\"}`\r\n\r\nMy question is whether anyone would ever want to include path in their match (and if not maybe stripping it ahead of time would make the above more intuitive)? :)"},"comment":{"url":"https://api.github.com/repos/facelessuser/ApplySyntax/issues/comments/93843071","html_url":"https://github.com/facelessuser/ApplySyntax/issues/70#issuecomment-93843071","issue_url":"https://api.github.com/repos/facelessuser/ApplySyntax/issues/70","id":93843071,"user":{"login":"jguice","id":587350,"avatar_url":"https://avatars.githubusercontent.com/u/587350?v=3","gravatar_id":"","url":"https://api.github.com/users/jguice","html_url":"https://github.com/jguice","followers_url":"https://api.github.com/users/jguice/followers","following_url":"https://api.github.com/users/jguice/following{/other_user}","gists_url":"https://api.github.com/users/jguice/gists{/gist_id}","starred_url":"https://api.github.com/users/jguice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jguice/subscriptions","organizations_url":"https://api.github.com/users/jguice/orgs","repos_url":"https://api.github.com/users/jguice/repos","events_url":"https://api.github.com/users/jguice/events{/privacy}","received_events_url":"https://api.github.com/users/jguice/received_events","type":"User","site_admin":false},"created_at":"2015-04-16T21:25:08Z","updated_at":"2015-04-16T21:25:08Z","body":"Ah, makes sense!  Thanks for finally giving folks a way to reliably syntax highlight extension-less files, etc. ;)"}}