{"action":"created","issue":{"url":"https://api.github.com/repos/fatih/vim-go/issues/868","repository_url":"https://api.github.com/repos/fatih/vim-go","labels_url":"https://api.github.com/repos/fatih/vim-go/issues/868/labels{/name}","comments_url":"https://api.github.com/repos/fatih/vim-go/issues/868/comments","events_url":"https://api.github.com/repos/fatih/vim-go/issues/868/events","html_url":"https://github.com/fatih/vim-go/issues/868","id":156107160,"number":868,"title":"Error executing :GoDef with tcsh","user":{"login":"tsne","id":10640029,"avatar_url":"https://avatars.githubusercontent.com/u/10640029?v=3","gravatar_id":"","url":"https://api.github.com/users/tsne","html_url":"https://github.com/tsne","followers_url":"https://api.github.com/users/tsne/followers","following_url":"https://api.github.com/users/tsne/following{/other_user}","gists_url":"https://api.github.com/users/tsne/gists{/gist_id}","starred_url":"https://api.github.com/users/tsne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsne/subscriptions","organizations_url":"https://api.github.com/users/tsne/orgs","repos_url":"https://api.github.com/users/tsne/repos","events_url":"https://api.github.com/users/tsne/events{/privacy}","received_events_url":"https://api.github.com/users/tsne/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-21T15:25:18Z","updated_at":"2016-05-21T22:31:30Z","closed_at":"2016-05-21T22:30:53Z","body":"### Actual behavior\r\n\r\nI'm using tcsh as my default shell and every time I execute `:GoDef`, I get the following error:\r\n\r\n    Error detected while processing function go#def#Jump[18]..go#util#System:\r\n    E484: Can't open file /var/folders/gy/y60619bd0t95zcxs326y1f8r0000gn/T/vufGvHW/0\r\n\r\n### Expected behavior\r\n\r\nI would expect that the cursor jumps to the definition of the method or type.\r\n\r\n### Steps to reproduce:\r\n\r\nCreate a short program with a simple function and a call to this function, e.g.\r\n\r\n    package main\r\n    \r\n    func main() {\r\n        foo()\r\n    }\r\n    \r\n    func foo() {}\r\n\r\nSet the shell to tcsh (`:set shell='/bin/tcsh'`), navigate the cursor to the call of `foo` in the `main` function and execute `:GoDef`.\r\n\r\n### Configuration\r\n\r\n* vim version: 7.4\r\n* vim-go version: current master\r\n* go version: 1.6.2\r\n\r\n### Problem\r\n\r\nThe function `go#def#Jump` builds the command with the use of `shellescape`. So the filename is surrounded by single quotation marks and the executed system call looks like\r\n\r\n    guru  definition 'foo.go':#123\r\n\r\nwhich seems to produce the error. If the system call would look like\r\n\r\n    guru  definition 'foo.go:#123'\r\n\r\nit should run with all major shells (including tcsh).\r\n\r\n### Possible Solution\r\n\r\nI would suggest building the command in the `go#def#Jump` function with\r\n\r\n    printf(\"%s %s definition %s\", bin_path, flags, shellescape(fname.':#'.go#util#OffsetCursor()))\r\n\r\ninstead. Or do I miss any edge cases?"},"comment":{"url":"https://api.github.com/repos/fatih/vim-go/issues/comments/220803817","html_url":"https://github.com/fatih/vim-go/issues/868#issuecomment-220803817","issue_url":"https://api.github.com/repos/fatih/vim-go/issues/868","id":220803817,"user":{"login":"fatih","id":438920,"avatar_url":"https://avatars.githubusercontent.com/u/438920?v=3","gravatar_id":"","url":"https://api.github.com/users/fatih","html_url":"https://github.com/fatih","followers_url":"https://api.github.com/users/fatih/followers","following_url":"https://api.github.com/users/fatih/following{/other_user}","gists_url":"https://api.github.com/users/fatih/gists{/gist_id}","starred_url":"https://api.github.com/users/fatih/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatih/subscriptions","organizations_url":"https://api.github.com/users/fatih/orgs","repos_url":"https://api.github.com/users/fatih/repos","events_url":"https://api.github.com/users/fatih/events{/privacy}","received_events_url":"https://api.github.com/users/fatih/received_events","type":"User","site_admin":false},"created_at":"2016-05-21T22:31:30Z","updated_at":"2016-05-21T22:31:30Z","body":"Hi @tsne \r\n\r\nThanks for your feedback. Vim needs a POSIX compatible shell actually. I'm not sure if that is true for your case, but check out these instructions as well: https://github.com/fatih/vim-go/wiki/FAQ-Troubleshooting#im-using-fish-shell-but-have-some-problems-using-vim-go\r\n\r\nAccording to your solution, that would be an improvement probably.  I've pushed it to master as well, let me know if there is any problem with it. "}}
{"actor":{"display_login":"fatih"}}