payload: {"action":"created","comment":{"url":"https://api.github.com/repos/jarun/nnn/pulls/comments/335062151","pull_request_review_id":302049324,"id":335062151,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMzNTA2MjE1MQ==","diff_hunk":"@@ -2628,6 +2629,29 @@ static void savecurctx(settings *curcfg, char *path, char *curname, int r /* nex\n \t*curcfg = cfg;\n }\n \n+static void session_manager(int op)\n+{\n+    char *session_name = xreadline(\"\", \"Session name: \");\n+    char session_path[PATH_MAX + 1];\n+    mkpath(sessiondir, session_name, session_path);\n+\n+    FILE *fsession = fopen(session_path, (op == SEL_SAVE_SESSION) ? \"wb\" : \"rb\");\n+    if (!fsession) {\n+        printmsg(\"Failed to save session\");\n+        return;\n+    }\n+\n+    if (op == SEL_SAVE_SESSION) {\n+        fwrite(&cfg, sizeof(cfg), 1, fsession);\n+        fwrite(g_ctx, sizeof(context), CTX_MAX, fsession);\n+    } else { // SEL_LOAD_SESSION\n+        fread(&cfg, sizeof(cfg), 1, fsession);\n+        fread(g_ctx, sizeof(context), CTX_MAX, fsession);","path":"src/nnn.c","position":29,"original_position":29,"commit_id":"0c6e061ced79128b11f7565afef6738d6acc6ab1","original_commit_id":"0c6e061ced79128b11f7565afef6738d6acc6ab1","user":{"login":"annagrram","id":4895022,"node_id":"MDQ6VXNlcjQ4OTUwMjI=","avatar_url":"https://avatars1.githubusercontent.com/u/4895022?v=4","gravatar_id":"","url":"https://api.github.com/users/annagrram","html_url":"https://github.com/annagrram","followers_url":"https://api.github.com/users/annagrram/followers","following_url":"https://api.github.com/users/annagrram/following{/other_user}","gists_url":"https://api.github.com/users/annagrram/gists{/gist_id}","starred_url":"https://api.github.com/users/annagrram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annagrram/subscriptions","organizations_url":"https://api.github.com/users/annagrram/orgs","repos_url":"https://api.github.com/users/annagrram/repos","events_url":"https://api.github.com/users/annagrram/events{/privacy}","received_events_url":"https://api.github.com/users/annagrram/received_events","type":"User","site_admin":false},"body":"Haven't handled that problem yet.\r\nIt's just a file in a documented location, so they can delete it from there.\r\nLater on (whether in the first or second iteration), we'll add a more refined session management control into the program itself (or just a jump to the sessions directory and use nnn to manage the files?).","created_at":"2019-10-15T16:42:09Z","updated_at":"2019-10-15T16:42:09Z","html_url":"https://github.com/jarun/nnn/pull/360#discussion_r335062151","pull_request_url":"https://api.github.com/repos/jarun/nnn/pulls/360","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/jarun/nnn/pulls/comments/335062151"},"html":{"href":"https://github.com/jarun/nnn/pull/360#discussion_r335062151"},"pull_request":{"href":"https://api.github.com/repos/jarun/nnn/pulls/360"}},"in_reply_to_id":334994298},"pull_request":{"url":"https://api.github.com/repos/jarun/nnn/pulls/360","id":328248519,"node_id":"MDExOlB1bGxSZXF1ZXN0MzI4MjQ4NTE5","html_url":"https://github.com/jarun/nnn/pull/360","diff_url":"https://github.com/jarun/nnn/pull/360.diff","patch_url":"https://github.com/jarun/nnn/pull/360.patch","issue_url":"https://api.github.com/repos/jarun/nnn/issues/360","number":360,"state":"open","locked":false,"title":"Implementing sessions support","user":{"login":"annagrram","id":4895022,"node_id":"MDQ6VXNlcjQ4OTUwMjI=","avatar_url":"https://avatars1.githubusercontent.com/u/4895022?v=4","gravatar_id":"","url":"https://api.github.com/users/annagrram","html_url":"https://github.com/annagrram","followers_url":"https://api.github.com/users/annagrram/followers","following_url":"https://api.github.com/users/annagrram/following{/other_user}","gists_url":"https://api.github.com/users/annagrram/gists{/gist_id}","starred_url":"https://api.github.com/users/annagrram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annagrram/subscriptions","organizations_url":"https://api.github.com/users/annagrram/orgs","repos_url":"https://api.github.com/users/annagrram/repos","events_url":"https://api.github.com/users/annagrram/events{/privacy}","received_events_url":"https://api.github.com/users/annagrram/received_events","type":"User","site_admin":false},"body":"Opening a pull request for you to test the feature as it progresses and give your input on what's already implemented (if it's not implemented, it might be before \"work in progress\" label is lifted).\r\nMoreover, some more cleanups are due too.\r\n\r\nThoughts to self:\r\nThere are all kinds of weird magic numbers and string shenanigans that need to be cleaned somewhen.","created_at":"2019-10-15T12:40:56Z","updated_at":"2019-10-15T16:42:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"79ac997dbf5b66471fa05e6e3cf30e3ec7df7b00","assignee":{"login":"annagrram","id":4895022,"node_id":"MDQ6VXNlcjQ4OTUwMjI=","avatar_url":"https://avatars1.githubusercontent.com/u/4895022?v=4","gravatar_id":"","url":"https://api.github.com/users/annagrram","html_url":"https://github.com/annagrram","followers_url":"https://api.github.com/users/annagrram/followers","following_url":"https://api.github.com/users/annagrram/following{/other_user}","gists_url":"https://api.github.com/users/annagrram/gists{/gist_id}","starred_url":"https://api.github.com/users/annagrram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annagrram/subscriptions","organizations_url":"https://api.github.com/users/annagrram/orgs","repos_url":"https://api.github.com/users/annagrram/repos","events_url":"https://api.github.com/users/annagrram/events{/privacy}","received_events_url":"https://api.github.com/users/annagrram/received_events","type":"User","site_admin":false},"assignees":[{"login":"annagrram","id":4895022,"node_id":"MDQ6VXNlcjQ4OTUwMjI=","avatar_url":"https://avatars1.githubusercontent.com/u/4895022?v=4","gravatar_id":"","url":"https://api.github.com/users/annagrram","html_url":"https://github.com/annagrram","followers_url":"https://api.github.com/users/annagrram/followers","following_url":"https://api.github.com/users/annagrram/following{/other_user}","gists_url":"https://api.github.com/users/annagrram/gists{/gist_id}","starred_url":"https://api.github.com/users/annagrram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annagrram/subscriptions","organizations_url":"https://api.github.com/users/annagrram/orgs","repos_url":"https://api.github.com/users/annagrram/repos","events_url":"https://api.github.com/users/annagrram/events{/privacy}","received_events_url":"https://api.github.com/users/annagrram/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":678753627,"node_id":"MDU6TGFiZWw2Nzg3NTM2Mjc=","url":"https://api.github.com/repos/jarun/nnn/labels/work%20in%20progress","name":"work in progress","color":"d93f0b","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/jarun/nnn/pulls/360/commits","review_comments_url":"https://api.github.com/repos/jarun/nnn/pulls/360/comments","review_comment_url":"https://api.github.com/repos/jarun/nnn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jarun/nnn/issues/360/comments","statuses_url":"https://api.github.com/repos/jarun/nnn/statuses/0c6e061ced79128b11f7565afef6738d6acc6ab1","head":{"label":"annagrram:sessions","ref":"sessions","sha":"0c6e061ced79128b11f7565afef6738d6acc6ab1","user":{"login":"annagrram","id":4895022,"node_id":"MDQ6VXNlcjQ4OTUwMjI=","avatar_url":"https://avatars1.githubusercontent.com/u/4895022?v=4","gravatar_id":"","url":"https://api.github.com/users/annagrram","html_url":"https://github.com/annagrram","followers_url":"https://api.github.com/users/annagrram/followers","following_url":"https://api.github.com/users/annagrram/following{/other_user}","gists_url":"https://api.github.com/users/annagrram/gists{/gist_id}","starred_url":"https://api.github.com/users/annagrram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annagrram/subscriptions","organizations_url":"https://api.github.com/users/annagrram/orgs","repos_url":"https://api.github.com/users/annagrram/repos","events_url":"https://api.github.com/users/annagrram/events{/privacy}","received_events_url":"https://api.github.com/users/annagrram/received_events","type":"User","site_admin":false},"repo":{"id":214036462,"node_id":"MDEwOlJlcG9zaXRvcnkyMTQwMzY0NjI=","name":"nnn","full_name":"annagrram/nnn","private":false,"owner":{"login":"annagrram","id":4895022,"node_id":"MDQ6VXNlcjQ4OTUwMjI=","avatar_url":"https://avatars1.githubusercontent.com/u/4895022?v=4","gravatar_id":"","url":"https://api.github.com/users/annagrram","html_url":"https://github.com/annagrram","followers_url":"https://api.github.com/users/annagrram/followers","following_url":"https://api.github.com/users/annagrram/following{/other_user}","gists_url":"https://api.github.com/users/annagrram/gists{/gist_id}","starred_url":"https://api.github.com/users/annagrram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annagrram/subscriptions","organizations_url":"https://api.github.com/users/annagrram/orgs","repos_url":"https://api.github.com/users/annagrram/repos","events_url":"https://api.github.com/users/annagrram/events{/privacy}","received_events_url":"https://api.github.com/users/annagrram/received_events","type":"User","site_admin":false},"html_url":"https://github.com/annagrram/nnn","description":":dolphin: The missing terminal file manager for X","fork":true,"url":"https://api.github.com/repos/annagrram/nnn","forks_url":"https://api.github.com/repos/annagrram/nnn/forks","keys_url":"https://api.github.com/repos/annagrram/nnn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/annagrram/nnn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/annagrram/nnn/teams","hooks_url":"https://api.github.com/repos/annagrram/nnn/hooks","issue_events_url":"https://api.github.com/repos/annagrram/nnn/issues/events{/number}","events_url":"https://api.github.com/repos/annagrram/nnn/events","assignees_url":"https://api.github.com/repos/annagrram/nnn/assignees{/user}","branches_url":"https://api.github.com/repos/annagrram/nnn/branches{/branch}","tags_url":"https://api.github.com/repos/annagrram/nnn/tags","blobs_url":"https://api.github.com/repos/annagrram/nnn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/annagrram/nnn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/annagrram/nnn/git/refs{/sha}","trees_url":"https://api.github.com/repos/annagrram/nnn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/annagrram/nnn/statuses/{sha}","languages_url":"https://api.github.com/repos/annagrram/nnn/languages","stargazers_url":"https://api.github.com/repos/annagrram/nnn/stargazers","contributors_url":"https://api.github.com/repos/annagrram/nnn/contributors","subscribers_url":"https://api.github.com/repos/annagrram/nnn/subscribers","subscription_url":"https://api.github.com/repos/annagrram/nnn/subscription","commits_url":"https://api.github.com/repos/annagrram/nnn/commits{/sha}","git_commits_url":"https://api.github.com/repos/annagrram/nnn/git/commits{/sha}","comments_url":"https://api.github.com/repos/annagrram/nnn/comments{/number}","issue_comment_url":"https://api.github.com/repos/annagrram/nnn/issues/comments{/number}","contents_url":"https://api.github.com/repos/annagrram/nnn/contents/{+path}","compare_url":"https://api.github.com/repos/annagrram/nnn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/annagrram/nnn/merges","archive_url":"https://api.github.com/repos/annagrram/nnn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/annagrram/nnn/downloads","issues_url":"https://api.github.com/repos/annagrram/nnn/issues{/number}","pulls_url":"https://api.github.com/repos/annagrram/nnn/pulls{/number}","milestones_url":"https://api.github.com/repos/annagrram/nnn/milestones{/number}","notifications_url":"https://api.github.com/repos/annagrram/nnn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/annagrram/nnn/labels{/name}","releases_url":"https://api.github.com/repos/annagrram/nnn/releases{/id}","deployments_url":"https://api.github.com/repos/annagrram/nnn/deployments","created_at":"2019-10-09T22:29:17Z","updated_at":"2019-10-09T22:29:18Z","pushed_at":"2019-10-15T12:49:26Z","git_url":"git://github.com/annagrram/nnn.git","ssh_url":"git@github.com:annagrram/nnn.git","clone_url":"https://github.com/annagrram/nnn.git","svn_url":"https://github.com/annagrram/nnn","homepage":"","size":2931,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause","node_id":"MDc6TGljZW5zZTQ="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jarun:master","ref":"master","sha":"43c636d95c6ac835c1a92bcabe4297268fd41aa9","user":{"login":"jarun","id":5959286,"node_id":"MDQ6VXNlcjU5NTkyODY=","avatar_url":"https://avatars3.githubusercontent.com/u/5959286?v=4","gravatar_id":"","url":"https://api.github.com/users/jarun","html_url":"https://github.com/jarun","followers_url":"https://api.github.com/users/jarun/followers","following_url":"https://api.github.com/users/jarun/following{/other_user}","gists_url":"https://api.github.com/users/jarun/gists{/gist_id}","starred_url":"https://api.github.com/users/jarun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jarun/subscriptions","organizations_url":"https://api.github.com/users/jarun/orgs","repos_url":"https://api.github.com/users/jarun/repos","events_url":"https://api.github.com/users/jarun/events{/privacy}","received_events_url":"https://api.github.com/users/jarun/received_events","type":"User","site_admin":false},"repo":{"id":66150122,"node_id":"MDEwOlJlcG9zaXRvcnk2NjE1MDEyMg==","name":"nnn","full_name":"jarun/nnn","private":false,"owner":{"login":"jarun","id":5959286,"node_id":"MDQ6VXNlcjU5NTkyODY=","avatar_url":"https://avatars3.githubusercontent.com/u/5959286?v=4","gravatar_id":"","url":"https://api.github.com/users/jarun","html_url":"https://github.com/jarun","followers_url":"https://api.github.com/users/jarun/followers","following_url":"https://api.github.com/users/jarun/following{/other_user}","gists_url":"https://api.github.com/users/jarun/gists{/gist_id}","starred_url":"https://api.github.com/users/jarun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jarun/subscriptions","organizations_url":"https://api.github.com/users/jarun/orgs","repos_url":"https://api.github.com/users/jarun/repos","events_url":"https://api.github.com/users/jarun/events{/privacy}","received_events_url":"https://api.github.com/users/jarun/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jarun/nnn","description":":dolphin: The missing terminal file manager for X","fork":false,"url":"https://api.github.com/repos/jarun/nnn","forks_url":"https://api.github.com/repos/jarun/nnn/forks","keys_url":"https://api.github.com/repos/jarun/nnn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jarun/nnn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jarun/nnn/teams","hooks_url":"https://api.github.com/repos/jarun/nnn/hooks","issue_events_url":"https://api.github.com/repos/jarun/nnn/issues/events{/number}","events_url":"https://api.github.com/repos/jarun/nnn/events","assignees_url":"https://api.github.com/repos/jarun/nnn/assignees{/user}","branches_url":"https://api.github.com/repos/jarun/nnn/branches{/branch}","tags_url":"https://api.github.com/repos/jarun/nnn/tags","blobs_url":"https://api.github.com/repos/jarun/nnn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jarun/nnn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jarun/nnn/git/refs{/sha}","trees_url":"https://api.github.com/repos/jarun/nnn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jarun/nnn/statuses/{sha}","languages_url":"https://api.github.com/repos/jarun/nnn/languages","stargazers_url":"https://api.github.com/repos/jarun/nnn/stargazers","contributors_url":"https://api.github.com/repos/jarun/nnn/contributors","subscribers_url":"https://api.github.com/repos/jarun/nnn/subscribers","subscription_url":"https://api.github.com/repos/jarun/nnn/subscription","commits_url":"https://api.github.com/repos/jarun/nnn/commits{/sha}","git_commits_url":"https://api.github.com/repos/jarun/nnn/git/commits{/sha}","comments_url":"https://api.github.com/repos/jarun/nnn/comments{/number}","issue_comment_url":"https://api.github.com/repos/jarun/nnn/issues/comments{/number}","contents_url":"https://api.github.com/repos/jarun/nnn/contents/{+path}","compare_url":"https://api.github.com/repos/jarun/nnn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jarun/nnn/merges","archive_url":"https://api.github.com/repos/jarun/nnn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jarun/nnn/downloads","issues_url":"https://api.github.com/repos/jarun/nnn/issues{/number}","pulls_url":"https://api.github.com/repos/jarun/nnn/pulls{/number}","milestones_url":"https://api.github.com/repos/jarun/nnn/milestones{/number}","notifications_url":"https://api.github.com/repos/jarun/nnn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jarun/nnn/labels{/name}","releases_url":"https://api.github.com/repos/jarun/nnn/releases{/id}","deployments_url":"https://api.github.com/repos/jarun/nnn/deployments","created_at":"2016-08-20T14:10:14Z","updated_at":"2019-10-15T00:46:01Z","pushed_at":"2019-10-15T12:49:27Z","git_url":"git://github.com/jarun/nnn.git","ssh_url":"git@github.com:jarun/nnn.git","clone_url":"https://github.com/jarun/nnn.git","svn_url":"https://github.com/jarun/nnn","homepage":"","size":2927,"stargazers_count":6375,"watchers_count":6375,"language":"C","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":225,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":2,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause","node_id":"MDc6TGljZW5zZTQ="},"forks":225,"open_issues":2,"watchers":6375,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jarun/nnn/pulls/360"},"html":{"href":"https://github.com/jarun/nnn/pull/360"},"issue":{"href":"https://api.github.com/repos/jarun/nnn/issues/360"},"comments":{"href":"https://api.github.com/repos/jarun/nnn/issues/360/comments"},"review_comments":{"href":"https://api.github.com/repos/jarun/nnn/pulls/360/comments"},"review_comment":{"href":"https://api.github.com/repos/jarun/nnn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jarun/nnn/pulls/360/commits"},"statuses":{"href":"https://api.github.com/repos/jarun/nnn/statuses/0c6e061ced79128b11f7565afef6738d6acc6ab1"}},"author_association":"COLLABORATOR"}}
other: {"actor":{"display_login":"annagrram"}}