{"action":"created","comment":{"url":"https://api.github.com/repos/thoughtbot/gitsh/pulls/comments/73799290","id":73799290,"diff_hunk":"@@ -31,6 +31,10 @@ def prompt\n \n     attr_reader :env, :prompt_color\n \n+    def cwd_basename\n+      Dir.getwd == Dir.home ? '~' : File.basename(Dir.getwd)","path":"lib/gitsh/prompter.rb","position":14,"original_position":14,"commit_id":"1ec13027864d3f72be61afdd40eaf958dea910e8","original_commit_id":"1ec13027864d3f72be61afdd40eaf958dea910e8","user":{"login":"mike-burns","id":4550,"avatar_url":"https://avatars.githubusercontent.com/u/4550?v=3","gravatar_id":"","url":"https://api.github.com/users/mike-burns","html_url":"https://github.com/mike-burns","followers_url":"https://api.github.com/users/mike-burns/followers","following_url":"https://api.github.com/users/mike-burns/following{/other_user}","gists_url":"https://api.github.com/users/mike-burns/gists{/gist_id}","starred_url":"https://api.github.com/users/mike-burns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mike-burns/subscriptions","organizations_url":"https://api.github.com/users/mike-burns/orgs","repos_url":"https://api.github.com/users/mike-burns/repos","events_url":"https://api.github.com/users/mike-burns/events{/privacy}","received_events_url":"https://api.github.com/users/mike-burns/received_events","type":"User","site_admin":false},"body":"Aha, good point. Yes, I'd like that.","created_at":"2016-08-07T10:08:13Z","updated_at":"2016-08-07T10:08:14Z","html_url":"https://github.com/thoughtbot/gitsh/pull/266#discussion_r73799290","pull_request_url":"https://api.github.com/repos/thoughtbot/gitsh/pulls/266","_links":{"self":{"href":"https://api.github.com/repos/thoughtbot/gitsh/pulls/comments/73799290"},"html":{"href":"https://github.com/thoughtbot/gitsh/pull/266#discussion_r73799290"},"pull_request":{"href":"https://api.github.com/repos/thoughtbot/gitsh/pulls/266"}}},"pull_request":{"url":"https://api.github.com/repos/thoughtbot/gitsh/pulls/266","id":80345926,"html_url":"https://github.com/thoughtbot/gitsh/pull/266","diff_url":"https://github.com/thoughtbot/gitsh/pull/266.diff","patch_url":"https://github.com/thoughtbot/gitsh/pull/266.patch","issue_url":"https://api.github.com/repos/thoughtbot/gitsh/issues/266","number":266,"state":"open","locked":false,"title":"Show home directory as a tilde in the prompt","user":{"login":"srstevenson","id":5845679,"avatar_url":"https://avatars.githubusercontent.com/u/5845679?v=3","gravatar_id":"","url":"https://api.github.com/users/srstevenson","html_url":"https://github.com/srstevenson","followers_url":"https://api.github.com/users/srstevenson/followers","following_url":"https://api.github.com/users/srstevenson/following{/other_user}","gists_url":"https://api.github.com/users/srstevenson/gists{/gist_id}","starred_url":"https://api.github.com/users/srstevenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srstevenson/subscriptions","organizations_url":"https://api.github.com/users/srstevenson/orgs","repos_url":"https://api.github.com/users/srstevenson/repos","events_url":"https://api.github.com/users/srstevenson/events{/privacy}","received_events_url":"https://api.github.com/users/srstevenson/received_events","type":"User","site_admin":false},"body":"When `gitsh` is launched from the user's home directory, the basename of the current working directory shown in the prompt is typically the same as the user's username, which is a potential source of confusion as to what this prompt section shows. With this commit, the directory name is shown as a tilde when the current working directory is the user's home directory, as is conventional for Unix shells.\r\n\r\nWithout this commit:\r\n\r\n    $ cd ~\r\n    $ pwd\r\n    /home/srs\r\n    $ gitsh\r\n    gitsh 0.10\r\n    Type :exit to exit\r\n    srs uninitialized!!\r\n\r\nWith this commit:\r\n\r\n    $ cd ~\r\n    $ pwd\r\n    /home/srs\r\n    $ gitsh\r\n    gitsh 0.10\r\n    Type :exit to exit\r\n    ~ uninitialized!!","created_at":"2016-08-06T17:28:16Z","updated_at":"2016-08-07T10:08:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aee37866700061fc3ffce508729462a94943983a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/thoughtbot/gitsh/pulls/266/commits","review_comments_url":"https://api.github.com/repos/thoughtbot/gitsh/pulls/266/comments","review_comment_url":"https://api.github.com/repos/thoughtbot/gitsh/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thoughtbot/gitsh/issues/266/comments","statuses_url":"https://api.github.com/repos/thoughtbot/gitsh/statuses/1ec13027864d3f72be61afdd40eaf958dea910e8","head":{"label":"srstevenson:tilde-for-home-in-prompt","ref":"tilde-for-home-in-prompt","sha":"1ec13027864d3f72be61afdd40eaf958dea910e8","user":{"login":"srstevenson","id":5845679,"avatar_url":"https://avatars.githubusercontent.com/u/5845679?v=3","gravatar_id":"","url":"https://api.github.com/users/srstevenson","html_url":"https://github.com/srstevenson","followers_url":"https://api.github.com/users/srstevenson/followers","following_url":"https://api.github.com/users/srstevenson/following{/other_user}","gists_url":"https://api.github.com/users/srstevenson/gists{/gist_id}","starred_url":"https://api.github.com/users/srstevenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srstevenson/subscriptions","organizations_url":"https://api.github.com/users/srstevenson/orgs","repos_url":"https://api.github.com/users/srstevenson/repos","events_url":"https://api.github.com/users/srstevenson/events{/privacy}","received_events_url":"https://api.github.com/users/srstevenson/received_events","type":"User","site_admin":false},"repo":{"id":65092492,"name":"gitsh","full_name":"srstevenson/gitsh","owner":{"login":"srstevenson","id":5845679,"avatar_url":"https://avatars.githubusercontent.com/u/5845679?v=3","gravatar_id":"","url":"https://api.github.com/users/srstevenson","html_url":"https://github.com/srstevenson","followers_url":"https://api.github.com/users/srstevenson/followers","following_url":"https://api.github.com/users/srstevenson/following{/other_user}","gists_url":"https://api.github.com/users/srstevenson/gists{/gist_id}","starred_url":"https://api.github.com/users/srstevenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srstevenson/subscriptions","organizations_url":"https://api.github.com/users/srstevenson/orgs","repos_url":"https://api.github.com/users/srstevenson/repos","events_url":"https://api.github.com/users/srstevenson/events{/privacy}","received_events_url":"https://api.github.com/users/srstevenson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/srstevenson/gitsh","description":"An interactive shell for git","fork":true,"url":"https://api.github.com/repos/srstevenson/gitsh","forks_url":"https://api.github.com/repos/srstevenson/gitsh/forks","keys_url":"https://api.github.com/repos/srstevenson/gitsh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/srstevenson/gitsh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/srstevenson/gitsh/teams","hooks_url":"https://api.github.com/repos/srstevenson/gitsh/hooks","issue_events_url":"https://api.github.com/repos/srstevenson/gitsh/issues/events{/number}","events_url":"https://api.github.com/repos/srstevenson/gitsh/events","assignees_url":"https://api.github.com/repos/srstevenson/gitsh/assignees{/user}","branches_url":"https://api.github.com/repos/srstevenson/gitsh/branches{/branch}","tags_url":"https://api.github.com/repos/srstevenson/gitsh/tags","blobs_url":"https://api.github.com/repos/srstevenson/gitsh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/srstevenson/gitsh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/srstevenson/gitsh/git/refs{/sha}","trees_url":"https://api.github.com/repos/srstevenson/gitsh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/srstevenson/gitsh/statuses/{sha}","languages_url":"https://api.github.com/repos/srstevenson/gitsh/languages","stargazers_url":"https://api.github.com/repos/srstevenson/gitsh/stargazers","contributors_url":"https://api.github.com/repos/srstevenson/gitsh/contributors","subscribers_url":"https://api.github.com/repos/srstevenson/gitsh/subscribers","subscription_url":"https://api.github.com/repos/srstevenson/gitsh/subscription","commits_url":"https://api.github.com/repos/srstevenson/gitsh/commits{/sha}","git_commits_url":"https://api.github.com/repos/srstevenson/gitsh/git/commits{/sha}","comments_url":"https://api.github.com/repos/srstevenson/gitsh/comments{/number}","issue_comment_url":"https://api.github.com/repos/srstevenson/gitsh/issues/comments{/number}","contents_url":"https://api.github.com/repos/srstevenson/gitsh/contents/{+path}","compare_url":"https://api.github.com/repos/srstevenson/gitsh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/srstevenson/gitsh/merges","archive_url":"https://api.github.com/repos/srstevenson/gitsh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/srstevenson/gitsh/downloads","issues_url":"https://api.github.com/repos/srstevenson/gitsh/issues{/number}","pulls_url":"https://api.github.com/repos/srstevenson/gitsh/pulls{/number}","milestones_url":"https://api.github.com/repos/srstevenson/gitsh/milestones{/number}","notifications_url":"https://api.github.com/repos/srstevenson/gitsh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/srstevenson/gitsh/labels{/name}","releases_url":"https://api.github.com/repos/srstevenson/gitsh/releases{/id}","deployments_url":"https://api.github.com/repos/srstevenson/gitsh/deployments","created_at":"2016-08-06T16:52:26Z","updated_at":"2016-08-06T16:52:28Z","pushed_at":"2016-08-06T17:25:52Z","git_url":"git://github.com/srstevenson/gitsh.git","ssh_url":"git@github.com:srstevenson/gitsh.git","clone_url":"https://github.com/srstevenson/gitsh.git","svn_url":"https://github.com/srstevenson/gitsh","homepage":"https://thoughtbot.com/tools","size":1870,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"thoughtbot:master","ref":"master","sha":"53be5c788bb486de7fc554e60ceb884b68fdcfce","user":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"repo":{"id":14063942,"name":"gitsh","full_name":"thoughtbot/gitsh","owner":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thoughtbot/gitsh","description":"An interactive shell for git","fork":false,"url":"https://api.github.com/repos/thoughtbot/gitsh","forks_url":"https://api.github.com/repos/thoughtbot/gitsh/forks","keys_url":"https://api.github.com/repos/thoughtbot/gitsh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thoughtbot/gitsh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thoughtbot/gitsh/teams","hooks_url":"https://api.github.com/repos/thoughtbot/gitsh/hooks","issue_events_url":"https://api.github.com/repos/thoughtbot/gitsh/issues/events{/number}","events_url":"https://api.github.com/repos/thoughtbot/gitsh/events","assignees_url":"https://api.github.com/repos/thoughtbot/gitsh/assignees{/user}","branches_url":"https://api.github.com/repos/thoughtbot/gitsh/branches{/branch}","tags_url":"https://api.github.com/repos/thoughtbot/gitsh/tags","blobs_url":"https://api.github.com/repos/thoughtbot/gitsh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thoughtbot/gitsh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thoughtbot/gitsh/git/refs{/sha}","trees_url":"https://api.github.com/repos/thoughtbot/gitsh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thoughtbot/gitsh/statuses/{sha}","languages_url":"https://api.github.com/repos/thoughtbot/gitsh/languages","stargazers_url":"https://api.github.com/repos/thoughtbot/gitsh/stargazers","contributors_url":"https://api.github.com/repos/thoughtbot/gitsh/contributors","subscribers_url":"https://api.github.com/repos/thoughtbot/gitsh/subscribers","subscription_url":"https://api.github.com/repos/thoughtbot/gitsh/subscription","commits_url":"https://api.github.com/repos/thoughtbot/gitsh/commits{/sha}","git_commits_url":"https://api.github.com/repos/thoughtbot/gitsh/git/commits{/sha}","comments_url":"https://api.github.com/repos/thoughtbot/gitsh/comments{/number}","issue_comment_url":"https://api.github.com/repos/thoughtbot/gitsh/issues/comments{/number}","contents_url":"https://api.github.com/repos/thoughtbot/gitsh/contents/{+path}","compare_url":"https://api.github.com/repos/thoughtbot/gitsh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thoughtbot/gitsh/merges","archive_url":"https://api.github.com/repos/thoughtbot/gitsh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thoughtbot/gitsh/downloads","issues_url":"https://api.github.com/repos/thoughtbot/gitsh/issues{/number}","pulls_url":"https://api.github.com/repos/thoughtbot/gitsh/pulls{/number}","milestones_url":"https://api.github.com/repos/thoughtbot/gitsh/milestones{/number}","notifications_url":"https://api.github.com/repos/thoughtbot/gitsh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thoughtbot/gitsh/labels{/name}","releases_url":"https://api.github.com/repos/thoughtbot/gitsh/releases{/id}","deployments_url":"https://api.github.com/repos/thoughtbot/gitsh/deployments","created_at":"2013-11-02T09:33:38Z","updated_at":"2016-08-04T02:04:20Z","pushed_at":"2016-08-06T17:28:17Z","git_url":"git://github.com/thoughtbot/gitsh.git","ssh_url":"git@github.com:thoughtbot/gitsh.git","clone_url":"https://github.com/thoughtbot/gitsh.git","svn_url":"https://github.com/thoughtbot/gitsh","homepage":"https://thoughtbot.com/tools","size":2049,"stargazers_count":1582,"watchers_count":1582,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":75,"mirror_url":null,"open_issues_count":29,"forks":75,"open_issues":29,"watchers":1582,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thoughtbot/gitsh/pulls/266"},"html":{"href":"https://github.com/thoughtbot/gitsh/pull/266"},"issue":{"href":"https://api.github.com/repos/thoughtbot/gitsh/issues/266"},"comments":{"href":"https://api.github.com/repos/thoughtbot/gitsh/issues/266/comments"},"review_comments":{"href":"https://api.github.com/repos/thoughtbot/gitsh/pulls/266/comments"},"review_comment":{"href":"https://api.github.com/repos/thoughtbot/gitsh/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thoughtbot/gitsh/pulls/266/commits"},"statuses":{"href":"https://api.github.com/repos/thoughtbot/gitsh/statuses/1ec13027864d3f72be61afdd40eaf958dea910e8"}}}}
{"actor":{"display_login":"mike-burns"}}