{"action":"created","comment":{"url":"https://api.github.com/repos/fish-shell/fish-shell/pulls/comments/59687184","id":59687184,"diff_hunk":"@@ -0,0 +1,18 @@\n+# Provide a minimalist realpath implementation to help deal with platforms that may not provide it\n+# as a command. If a realpath command is available simply pass all arguments thru to it. If not\n+# fallback to alternative solutions.\n+function realpath --description 'realpath implementation with fallbacks if command not present'\n+    if type -q -P realpath\n+        command realpath $argv\n+    else if type -q -P readlink\n+        readlink -f $argv[-1]\n+    else if type -q -P python2\n+        python2 -c 'import os, sys; print os.path.realpath(sys.argv[1])' $argv[-1]","path":"share/functions/realpath.fish","position":10,"original_position":10,"commit_id":"ecb88f5db5ae4118f1256e27108118bf1dfa1d80","original_commit_id":"ecb88f5db5ae4118f1256e27108118bf1dfa1d80","user":{"login":"floam","id":291142,"avatar_url":"https://avatars.githubusercontent.com/u/291142?v=3","gravatar_id":"","url":"https://api.github.com/users/floam","html_url":"https://github.com/floam","followers_url":"https://api.github.com/users/floam/followers","following_url":"https://api.github.com/users/floam/following{/other_user}","gists_url":"https://api.github.com/users/floam/gists{/gist_id}","starred_url":"https://api.github.com/users/floam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/floam/subscriptions","organizations_url":"https://api.github.com/users/floam/orgs","repos_url":"https://api.github.com/users/floam/repos","events_url":"https://api.github.com/users/floam/events{/privacy}","received_events_url":"https://api.github.com/users/floam/received_events","type":"User","site_admin":false},"body":"This should just be a builtin and do it right if this is necessary. ","created_at":"2016-04-14T09:27:34Z","updated_at":"2016-04-14T09:27:34Z","html_url":"https://github.com/fish-shell/fish-shell/pull/2935#discussion_r59687184","pull_request_url":"https://api.github.com/repos/fish-shell/fish-shell/pulls/2935","_links":{"self":{"href":"https://api.github.com/repos/fish-shell/fish-shell/pulls/comments/59687184"},"html":{"href":"https://github.com/fish-shell/fish-shell/pull/2935#discussion_r59687184"},"pull_request":{"href":"https://api.github.com/repos/fish-shell/fish-shell/pulls/2935"}}},"pull_request":{"url":"https://api.github.com/repos/fish-shell/fish-shell/pulls/2935","id":66412492,"html_url":"https://github.com/fish-shell/fish-shell/pull/2935","diff_url":"https://github.com/fish-shell/fish-shell/pull/2935.diff","patch_url":"https://github.com/fish-shell/fish-shell/pull/2935.patch","issue_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/2935","number":2935,"state":"open","locked":false,"title":"provide a realpath implementation","user":{"login":"krader1961","id":7545917,"avatar_url":"https://avatars.githubusercontent.com/u/7545917?v=3","gravatar_id":"","url":"https://api.github.com/users/krader1961","html_url":"https://github.com/krader1961","followers_url":"https://api.github.com/users/krader1961/followers","following_url":"https://api.github.com/users/krader1961/following{/other_user}","gists_url":"https://api.github.com/users/krader1961/gists{/gist_id}","starred_url":"https://api.github.com/users/krader1961/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krader1961/subscriptions","organizations_url":"https://api.github.com/users/krader1961/orgs","repos_url":"https://api.github.com/users/krader1961/repos","events_url":"https://api.github.com/users/krader1961/events{/privacy}","received_events_url":"https://api.github.com/users/krader1961/received_events","type":"User","site_admin":false},"body":"Not all distros have a `realpath` command. Provide a function that uses the\r\nreal command if available else try fallback solutions.\r\n\r\nFixes #2932","created_at":"2016-04-14T00:21:58Z","updated_at":"2016-04-14T09:27:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6d8934e0b42052b44e543a854fab37f1a6421875","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fish-shell/fish-shell/pulls/2935/commits","review_comments_url":"https://api.github.com/repos/fish-shell/fish-shell/pulls/2935/comments","review_comment_url":"https://api.github.com/repos/fish-shell/fish-shell/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/2935/comments","statuses_url":"https://api.github.com/repos/fish-shell/fish-shell/statuses/ecb88f5db5ae4118f1256e27108118bf1dfa1d80","head":{"label":"krader1961:realpath","ref":"realpath","sha":"ecb88f5db5ae4118f1256e27108118bf1dfa1d80","user":{"login":"krader1961","id":7545917,"avatar_url":"https://avatars.githubusercontent.com/u/7545917?v=3","gravatar_id":"","url":"https://api.github.com/users/krader1961","html_url":"https://github.com/krader1961","followers_url":"https://api.github.com/users/krader1961/followers","following_url":"https://api.github.com/users/krader1961/following{/other_user}","gists_url":"https://api.github.com/users/krader1961/gists{/gist_id}","starred_url":"https://api.github.com/users/krader1961/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krader1961/subscriptions","organizations_url":"https://api.github.com/users/krader1961/orgs","repos_url":"https://api.github.com/users/krader1961/repos","events_url":"https://api.github.com/users/krader1961/events{/privacy}","received_events_url":"https://api.github.com/users/krader1961/received_events","type":"User","site_admin":false},"repo":{"id":46686263,"name":"fish-shell","full_name":"krader1961/fish-shell","owner":{"login":"krader1961","id":7545917,"avatar_url":"https://avatars.githubusercontent.com/u/7545917?v=3","gravatar_id":"","url":"https://api.github.com/users/krader1961","html_url":"https://github.com/krader1961","followers_url":"https://api.github.com/users/krader1961/followers","following_url":"https://api.github.com/users/krader1961/following{/other_user}","gists_url":"https://api.github.com/users/krader1961/gists{/gist_id}","starred_url":"https://api.github.com/users/krader1961/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krader1961/subscriptions","organizations_url":"https://api.github.com/users/krader1961/orgs","repos_url":"https://api.github.com/users/krader1961/repos","events_url":"https://api.github.com/users/krader1961/events{/privacy}","received_events_url":"https://api.github.com/users/krader1961/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/krader1961/fish-shell","description":"The user-friendly command line shell.","fork":true,"url":"https://api.github.com/repos/krader1961/fish-shell","forks_url":"https://api.github.com/repos/krader1961/fish-shell/forks","keys_url":"https://api.github.com/repos/krader1961/fish-shell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/krader1961/fish-shell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/krader1961/fish-shell/teams","hooks_url":"https://api.github.com/repos/krader1961/fish-shell/hooks","issue_events_url":"https://api.github.com/repos/krader1961/fish-shell/issues/events{/number}","events_url":"https://api.github.com/repos/krader1961/fish-shell/events","assignees_url":"https://api.github.com/repos/krader1961/fish-shell/assignees{/user}","branches_url":"https://api.github.com/repos/krader1961/fish-shell/branches{/branch}","tags_url":"https://api.github.com/repos/krader1961/fish-shell/tags","blobs_url":"https://api.github.com/repos/krader1961/fish-shell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/krader1961/fish-shell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/krader1961/fish-shell/git/refs{/sha}","trees_url":"https://api.github.com/repos/krader1961/fish-shell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/krader1961/fish-shell/statuses/{sha}","languages_url":"https://api.github.com/repos/krader1961/fish-shell/languages","stargazers_url":"https://api.github.com/repos/krader1961/fish-shell/stargazers","contributors_url":"https://api.github.com/repos/krader1961/fish-shell/contributors","subscribers_url":"https://api.github.com/repos/krader1961/fish-shell/subscribers","subscription_url":"https://api.github.com/repos/krader1961/fish-shell/subscription","commits_url":"https://api.github.com/repos/krader1961/fish-shell/commits{/sha}","git_commits_url":"https://api.github.com/repos/krader1961/fish-shell/git/commits{/sha}","comments_url":"https://api.github.com/repos/krader1961/fish-shell/comments{/number}","issue_comment_url":"https://api.github.com/repos/krader1961/fish-shell/issues/comments{/number}","contents_url":"https://api.github.com/repos/krader1961/fish-shell/contents/{+path}","compare_url":"https://api.github.com/repos/krader1961/fish-shell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/krader1961/fish-shell/merges","archive_url":"https://api.github.com/repos/krader1961/fish-shell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/krader1961/fish-shell/downloads","issues_url":"https://api.github.com/repos/krader1961/fish-shell/issues{/number}","pulls_url":"https://api.github.com/repos/krader1961/fish-shell/pulls{/number}","milestones_url":"https://api.github.com/repos/krader1961/fish-shell/milestones{/number}","notifications_url":"https://api.github.com/repos/krader1961/fish-shell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/krader1961/fish-shell/labels{/name}","releases_url":"https://api.github.com/repos/krader1961/fish-shell/releases{/id}","deployments_url":"https://api.github.com/repos/krader1961/fish-shell/deployments","created_at":"2015-11-22T23:46:18Z","updated_at":"2016-01-16T02:50:11Z","pushed_at":"2016-04-14T02:47:07Z","git_url":"git://github.com/krader1961/fish-shell.git","ssh_url":"git@github.com:krader1961/fish-shell.git","clone_url":"https://github.com/krader1961/fish-shell.git","svn_url":"https://github.com/krader1961/fish-shell","homepage":"http://fishshell.com","size":28022,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fish-shell:master","ref":"master","sha":"b5b8d9010ec2dcc78efdcaed1cb0532e4e4c4603","user":{"login":"fish-shell","id":1828073,"avatar_url":"https://avatars.githubusercontent.com/u/1828073?v=3","gravatar_id":"","url":"https://api.github.com/users/fish-shell","html_url":"https://github.com/fish-shell","followers_url":"https://api.github.com/users/fish-shell/followers","following_url":"https://api.github.com/users/fish-shell/following{/other_user}","gists_url":"https://api.github.com/users/fish-shell/gists{/gist_id}","starred_url":"https://api.github.com/users/fish-shell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fish-shell/subscriptions","organizations_url":"https://api.github.com/users/fish-shell/orgs","repos_url":"https://api.github.com/users/fish-shell/repos","events_url":"https://api.github.com/users/fish-shell/events{/privacy}","received_events_url":"https://api.github.com/users/fish-shell/received_events","type":"Organization","site_admin":false},"repo":{"id":4279682,"name":"fish-shell","full_name":"fish-shell/fish-shell","owner":{"login":"fish-shell","id":1828073,"avatar_url":"https://avatars.githubusercontent.com/u/1828073?v=3","gravatar_id":"","url":"https://api.github.com/users/fish-shell","html_url":"https://github.com/fish-shell","followers_url":"https://api.github.com/users/fish-shell/followers","following_url":"https://api.github.com/users/fish-shell/following{/other_user}","gists_url":"https://api.github.com/users/fish-shell/gists{/gist_id}","starred_url":"https://api.github.com/users/fish-shell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fish-shell/subscriptions","organizations_url":"https://api.github.com/users/fish-shell/orgs","repos_url":"https://api.github.com/users/fish-shell/repos","events_url":"https://api.github.com/users/fish-shell/events{/privacy}","received_events_url":"https://api.github.com/users/fish-shell/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fish-shell/fish-shell","description":"The user-friendly command line shell.","fork":false,"url":"https://api.github.com/repos/fish-shell/fish-shell","forks_url":"https://api.github.com/repos/fish-shell/fish-shell/forks","keys_url":"https://api.github.com/repos/fish-shell/fish-shell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fish-shell/fish-shell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fish-shell/fish-shell/teams","hooks_url":"https://api.github.com/repos/fish-shell/fish-shell/hooks","issue_events_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/events{/number}","events_url":"https://api.github.com/repos/fish-shell/fish-shell/events","assignees_url":"https://api.github.com/repos/fish-shell/fish-shell/assignees{/user}","branches_url":"https://api.github.com/repos/fish-shell/fish-shell/branches{/branch}","tags_url":"https://api.github.com/repos/fish-shell/fish-shell/tags","blobs_url":"https://api.github.com/repos/fish-shell/fish-shell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fish-shell/fish-shell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fish-shell/fish-shell/git/refs{/sha}","trees_url":"https://api.github.com/repos/fish-shell/fish-shell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fish-shell/fish-shell/statuses/{sha}","languages_url":"https://api.github.com/repos/fish-shell/fish-shell/languages","stargazers_url":"https://api.github.com/repos/fish-shell/fish-shell/stargazers","contributors_url":"https://api.github.com/repos/fish-shell/fish-shell/contributors","subscribers_url":"https://api.github.com/repos/fish-shell/fish-shell/subscribers","subscription_url":"https://api.github.com/repos/fish-shell/fish-shell/subscription","commits_url":"https://api.github.com/repos/fish-shell/fish-shell/commits{/sha}","git_commits_url":"https://api.github.com/repos/fish-shell/fish-shell/git/commits{/sha}","comments_url":"https://api.github.com/repos/fish-shell/fish-shell/comments{/number}","issue_comment_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/comments{/number}","contents_url":"https://api.github.com/repos/fish-shell/fish-shell/contents/{+path}","compare_url":"https://api.github.com/repos/fish-shell/fish-shell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fish-shell/fish-shell/merges","archive_url":"https://api.github.com/repos/fish-shell/fish-shell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fish-shell/fish-shell/downloads","issues_url":"https://api.github.com/repos/fish-shell/fish-shell/issues{/number}","pulls_url":"https://api.github.com/repos/fish-shell/fish-shell/pulls{/number}","milestones_url":"https://api.github.com/repos/fish-shell/fish-shell/milestones{/number}","notifications_url":"https://api.github.com/repos/fish-shell/fish-shell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/labels{/name}","releases_url":"https://api.github.com/repos/fish-shell/fish-shell/releases{/id}","deployments_url":"https://api.github.com/repos/fish-shell/fish-shell/deployments","created_at":"2012-05-10T03:00:55Z","updated_at":"2016-04-14T07:09:47Z","pushed_at":"2016-04-14T07:51:51Z","git_url":"git://github.com/fish-shell/fish-shell.git","ssh_url":"git@github.com:fish-shell/fish-shell.git","clone_url":"https://github.com/fish-shell/fish-shell.git","svn_url":"https://github.com/fish-shell/fish-shell","homepage":"http://fishshell.com","size":32440,"stargazers_count":5761,"watchers_count":5761,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":549,"mirror_url":null,"open_issues_count":563,"forks":549,"open_issues":563,"watchers":5761,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fish-shell/fish-shell/pulls/2935"},"html":{"href":"https://github.com/fish-shell/fish-shell/pull/2935"},"issue":{"href":"https://api.github.com/repos/fish-shell/fish-shell/issues/2935"},"comments":{"href":"https://api.github.com/repos/fish-shell/fish-shell/issues/2935/comments"},"review_comments":{"href":"https://api.github.com/repos/fish-shell/fish-shell/pulls/2935/comments"},"review_comment":{"href":"https://api.github.com/repos/fish-shell/fish-shell/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fish-shell/fish-shell/pulls/2935/commits"},"statuses":{"href":"https://api.github.com/repos/fish-shell/fish-shell/statuses/ecb88f5db5ae4118f1256e27108118bf1dfa1d80"}}}}