{"action":"created","issue":{"url":"https://api.github.com/repos/mklabs/node-tabtab/issues/25","repository_url":"https://api.github.com/repos/mklabs/node-tabtab","labels_url":"https://api.github.com/repos/mklabs/node-tabtab/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/mklabs/node-tabtab/issues/25/comments","events_url":"https://api.github.com/repos/mklabs/node-tabtab/issues/25/events","html_url":"https://github.com/mklabs/node-tabtab/issues/25","id":157410715,"number":25,"title":"we should probably compute additional environment variables for completion handlers","user":{"login":"binduwavell","id":115754,"avatar_url":"https://avatars.githubusercontent.com/u/115754?v=3","gravatar_id":"","url":"https://api.github.com/users/binduwavell","html_url":"https://github.com/binduwavell","followers_url":"https://api.github.com/users/binduwavell/followers","following_url":"https://api.github.com/users/binduwavell/following{/other_user}","gists_url":"https://api.github.com/users/binduwavell/gists{/gist_id}","starred_url":"https://api.github.com/users/binduwavell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binduwavell/subscriptions","organizations_url":"https://api.github.com/users/binduwavell/orgs","repos_url":"https://api.github.com/users/binduwavell/repos","events_url":"https://api.github.com/users/binduwavell/events{/privacy}","received_events_url":"https://api.github.com/users/binduwavell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-29T23:02:15Z","updated_at":"2016-05-30T02:45:48Z","closed_at":null,"body":"If someone attempts a completion mid-word it may help a completion author to have lastPartialEnd (the remains of the word that is being completed) in addition to lastPartial.\r\n\r\nAs an example suppose I've typed `N<tab>PE` and I'm trying to complete a java exception class name. It would help to know PE in addition to N in order to more accurately guess NullPointerException instead of something like NonNumericException.\r\n\r\nI assume that prev is used when someone wants to complete an optional value. Say the shell user has typed `command --opt foo<tab>`, I assume that prev is used to see if we are attempting to complete values for the opt option. If this is correct, we likely should have a prevPartial in addition to lastPartial to handle user entries like `command --opt foo<tab> arg1`. prevPartial would provide the word prior to the word at the cursor.\r\n\r\nAssume the shell user has entered the following `command --opt \"multi word<tab> value\" arg1 arg2`. \r\n\r\nIn bash and zsh, words will be 2 (i.e. it's actually the argument count and not the word count.) It may be worth providing argument based equivalents for: words, last, prev, partial, lastPartial, lastPartialEnd, prevPartial.\r\n\r\nIn the previous example, using bash, line will be something like `command --opt \"multi word value\" arg1 arg2`. While using zsh, line will be: `command --opt multi word value arg1 arg2`. Note that with bash, position includes the quotes so in our example position will be 25; while with zsh position does not include the quotes so in our example will be 24 (this is both good and bad :) ) We should consider how to normalize these items."},"comment":{"url":"https://api.github.com/repos/mklabs/node-tabtab/issues/comments/222401478","html_url":"https://github.com/mklabs/node-tabtab/issues/25#issuecomment-222401478","issue_url":"https://api.github.com/repos/mklabs/node-tabtab/issues/25","id":222401478,"user":{"login":"mklabs","id":113832,"avatar_url":"https://avatars.githubusercontent.com/u/113832?v=3","gravatar_id":"","url":"https://api.github.com/users/mklabs","html_url":"https://github.com/mklabs","followers_url":"https://api.github.com/users/mklabs/followers","following_url":"https://api.github.com/users/mklabs/following{/other_user}","gists_url":"https://api.github.com/users/mklabs/gists{/gist_id}","starred_url":"https://api.github.com/users/mklabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mklabs/subscriptions","organizations_url":"https://api.github.com/users/mklabs/orgs","repos_url":"https://api.github.com/users/mklabs/repos","events_url":"https://api.github.com/users/mklabs/events{/privacy}","received_events_url":"https://api.github.com/users/mklabs/received_events","type":"User","site_admin":false},"created_at":"2016-05-30T02:45:48Z","updated_at":"2016-05-30T02:45:48Z","body":"Thanks @binduwavell for amazing feedbacks.\r\n\r\nYep, I agree with all you just said. Though, I'm leaning towards simplifying the API and maybe just provide `line`, `prev` and `cursor`. Would be way more clear, and would reduce the API surface a little bit.\r\n\r\nEven though they're documented (maybe badly), for instance, I'm sure you was confused with all these options where as `line`, `prev` and `cursor` are all self explanatory.\r\n\r\nI'm not sure which road to take yet.\r\n"}}
{"actor":{"display_login":"mklabs"}}