{"action":"created","issue":{"url":"https://api.github.com/repos/zsh-users/zsh-syntax-highlighting/issues/152","labels_url":"https://api.github.com/repos/zsh-users/zsh-syntax-highlighting/issues/152/labels{/name}","comments_url":"https://api.github.com/repos/zsh-users/zsh-syntax-highlighting/issues/152/comments","events_url":"https://api.github.com/repos/zsh-users/zsh-syntax-highlighting/issues/152/events","html_url":"https://github.com/zsh-users/zsh-syntax-highlighting/pull/152","id":44108263,"number":152,"title":"colors for files, command_prefix + more minor modifications","user":{"login":"jimmijj","id":8701021,"avatar_url":"https://avatars.githubusercontent.com/u/8701021?v=3","gravatar_id":"","url":"https://api.github.com/users/jimmijj","html_url":"https://github.com/jimmijj","followers_url":"https://api.github.com/users/jimmijj/followers","following_url":"https://api.github.com/users/jimmijj/following{/other_user}","gists_url":"https://api.github.com/users/jimmijj/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmijj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmijj/subscriptions","organizations_url":"https://api.github.com/users/jimmijj/orgs","repos_url":"https://api.github.com/users/jimmijj/repos","events_url":"https://api.github.com/users/jimmijj/events{/privacy}","received_events_url":"https://api.github.com/users/jimmijj/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/zsh-users/zsh-syntax-highlighting/labels/Feature","name":"Feature","color":"02e10c"},{"url":"https://api.github.com/repos/zsh-users/zsh-syntax-highlighting/labels/Improvement","name":"Improvement","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-09-26T21:31:29Z","updated_at":"2015-09-05T11:57:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/zsh-users/zsh-syntax-highlighting/pulls/152","html_url":"https://github.com/zsh-users/zsh-syntax-highlighting/pull/152","diff_url":"https://github.com/zsh-users/zsh-syntax-highlighting/pull/152.diff","patch_url":"https://github.com/zsh-users/zsh-syntax-highlighting/pull/152.patch"},"body":"I've added a few things, mostly to highlighters/main/main-highlighter.zsh:\r\n\r\n1. Highlighting for files based of LS_COLORS environment variable with the following features:\r\n    a) both 8 and 256 color terminal are supported\r\n    b) attributes (ex, ln, st...) and extension of file are taken into account\r\n    c) file prefix is recognized and properly colored too\r\n    d) does not interfere with path style (different colors)\r\n    e) possibility to edit filename in the middle of the line without loosing colors\r\n    f) user can override color for one particular file type or all at once in .zshrc\r\n\r\n2. command_prefix\r\n    This should solve (at least partially) issue #148. The problem is that if path_approx style is enabled and user run command in $HOME directory then one of many dot-files in this folder match almost all commands. To solve this function check_command should be run *before* check_path. By default I set this style to the same as command style, this probably what user is expecting.\r\n\r\n3. Changed ${#BUFFER} -> ${#LBUFFER} in path_check\r\n    This is minor improvement to guarantee that path prefix can be with colors even if edit is made in the middle of the line.\r\n\r\n4. missing separators &|, |& and &!\r\n    It seems obvious to include all command separators to the list, but for some reason these three were not there. I see this also in user 'm0vie' commit, but is was not merged to main tree so far.\r\n\r\n\r\nAdditionally I've described new file-highlighting under ./highlighters/main/README.md and added small screenshot to ./README.md to give new users a hint what to expect from zsh-syntax-highlighting package.\r\n\r\n\r\nComments and questions are welcome."},"comment":{"url":"https://api.github.com/repos/zsh-users/zsh-syntax-highlighting/issues/comments/137947869","html_url":"https://github.com/zsh-users/zsh-syntax-highlighting/pull/152#issuecomment-137947869","issue_url":"https://api.github.com/repos/zsh-users/zsh-syntax-highlighting/issues/152","id":137947869,"user":{"login":"jimmijj","id":8701021,"avatar_url":"https://avatars.githubusercontent.com/u/8701021?v=3","gravatar_id":"","url":"https://api.github.com/users/jimmijj","html_url":"https://github.com/jimmijj","followers_url":"https://api.github.com/users/jimmijj/followers","following_url":"https://api.github.com/users/jimmijj/following{/other_user}","gists_url":"https://api.github.com/users/jimmijj/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmijj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmijj/subscriptions","organizations_url":"https://api.github.com/users/jimmijj/orgs","repos_url":"https://api.github.com/users/jimmijj/repos","events_url":"https://api.github.com/users/jimmijj/events{/privacy}","received_events_url":"https://api.github.com/users/jimmijj/received_events","type":"User","site_admin":false},"created_at":"2015-09-05T11:57:17Z","updated_at":"2015-09-05T11:57:17Z","body":"> What I would like to have right now is a separate issue for each logical change, so we can discuss them individually.\r\n\r\nI see your point. Sounds logical at first, but that's not so simple.\r\nThe problem is that I cannot isolate n*th* commit alone - in many cases there are conflicts without commit *n-2*, while in *n-1* I changed other (not related with *n-1*) thing, but in the same part of code. In other words  there are conflicts with my own work if one do not take into account previous commits. It is huge amount of work to disentangle all \"logical changes\" from my commits right now.\r\n\r\nLet me propose other, simpler solution.\r\nAs far as I can see you pushed just a few commits so far, all of them with not much code inside. I would suggest to revert them -> push my commits -> add previously reverted commits back -> solve conflicts. The point is that it is easier to resolve conflicts in few lines of code and a few commits. You may dedicate separate branch for the whole operation, and merge this branch with master only when everything will be cleaned. I can help you with all of that if you are willing.\r\n\r\n\r\nOh, and concerning files highlighting, there is option to switch it off, or set to underline, so one may set highlighting behaviour in the same fashion as without this change. It may be even default. Please check main/README.md where I described the procedure.\r\n\r\n\r\nBTW, I have other local changes, and further ideas, but I will not commit anything until we decide what to do with stuff which is already present."}}