|
243 | 243 | "performed_via_github_app": null, |
244 | 244 | "reactions": { |
245 | 245 | "+1": 3, |
246 | | - "-1": 15, |
| 246 | + "-1": 16, |
247 | 247 | "confused": 0, |
248 | 248 | "eyes": 0, |
249 | 249 | "heart": 2, |
250 | 250 | "hooray": 0, |
251 | 251 | "laugh": 0, |
252 | 252 | "rocket": 0, |
253 | | - "total_count": 20, |
| 253 | + "total_count": 21, |
254 | 254 | "url": "https://api.github.com/repos/neovim/neovim/issues/comments/1858039774/reactions" |
255 | 255 | }, |
256 | 256 | "updated_at": "2023-12-15T15:13:52Z", |
|
321 | 321 | "url": "https://api.github.com/users/SJFCS", |
322 | 322 | "user_view_type": "public" |
323 | 323 | } |
| 324 | + }, |
| 325 | + { |
| 326 | + "author_association": "NONE", |
| 327 | + "body": "Combined ibhagwan solution into one user command function with the help of ChatGPT:\n``` lua \n-- sudo write\nvim.api.nvim_create_user_command(\"Suw\", function()\nlocal filepath = vim.fn.expand(\"%:p\")\n if filepath == \"\" then\n vim.notify(\"E32: No file name\", vim.log.levels.ERROR)\n return\n end\n -- Save buffer to a temporary file\n local tmpfile = vim.fn.tempname()\n vim.cmd(\"write! \" .. tmpfile)\n -- Prompt for password\n vim.fn.inputsave()\n local password = vim.fn.inputsecret(\"Password: \")\n vim.fn.inputrestore()\n if password == \"\" then\n vim.notify(\"Invalid password, sudo aborted\", vim.log.levels.WARN)\n return\n end\n -- Use sudo to move the file\n local cmd = string.format(\"sudo -p '' -S dd if=%s of=%s bs=1048576\",\n vim.fn.shellescape(tmpfile), vim.fn.shellescape(filepath)\n )\n local proc = vim.system({ \"sh\", \"-c\", string.format(\"echo %q | %s\", password, cmd) }):wait()\n -- Handle result\n if proc.code == 0 then\n vim.bo.modified = false\n vim.cmd.checktime()\n vim.api.nvim_feedkeys(\n vim.api.nvim_replace_termcodes(\"<ESC>\", true, false, true), \"n\", true\n )\n else\n vim.notify(proc.stderr, vim.log.levels.ERROR)\n end\n\n vim.fn.delete(tmpfile)\nend, { desc = \"Sudo write current buffer\" })\n```", |
| 328 | + "created_at": "2025-07-15T14:05:35Z", |
| 329 | + "html_url": "https://github.com/neovim/neovim/issues/12103#issuecomment-3073751144", |
| 330 | + "id": 3073751144, |
| 331 | + "issue_url": "https://api.github.com/repos/neovim/neovim/issues/12103", |
| 332 | + "node_id": "IC_kwDOAPphoM63Nbho", |
| 333 | + "performed_via_github_app": null, |
| 334 | + "reactions": { |
| 335 | + "+1": 0, |
| 336 | + "-1": 0, |
| 337 | + "confused": 0, |
| 338 | + "eyes": 0, |
| 339 | + "heart": 0, |
| 340 | + "hooray": 0, |
| 341 | + "laugh": 0, |
| 342 | + "rocket": 0, |
| 343 | + "total_count": 0, |
| 344 | + "url": "https://api.github.com/repos/neovim/neovim/issues/comments/3073751144/reactions" |
| 345 | + }, |
| 346 | + "updated_at": "2025-07-15T14:05:35Z", |
| 347 | + "url": "https://api.github.com/repos/neovim/neovim/issues/comments/3073751144", |
| 348 | + "user": { |
| 349 | + "avatar_url": "https://avatars.githubusercontent.com/u/40931454?v=4", |
| 350 | + "events_url": "https://api.github.com/users/vulpes-vulpeos/events{/privacy}", |
| 351 | + "followers_url": "https://api.github.com/users/vulpes-vulpeos/followers", |
| 352 | + "following_url": "https://api.github.com/users/vulpes-vulpeos/following{/other_user}", |
| 353 | + "gists_url": "https://api.github.com/users/vulpes-vulpeos/gists{/gist_id}", |
| 354 | + "gravatar_id": "", |
| 355 | + "html_url": "https://github.com/vulpes-vulpeos", |
| 356 | + "id": 40931454, |
| 357 | + "login": "vulpes-vulpeos", |
| 358 | + "node_id": "MDQ6VXNlcjQwOTMxNDU0", |
| 359 | + "organizations_url": "https://api.github.com/users/vulpes-vulpeos/orgs", |
| 360 | + "received_events_url": "https://api.github.com/users/vulpes-vulpeos/received_events", |
| 361 | + "repos_url": "https://api.github.com/users/vulpes-vulpeos/repos", |
| 362 | + "site_admin": false, |
| 363 | + "starred_url": "https://api.github.com/users/vulpes-vulpeos/starred{/owner}{/repo}", |
| 364 | + "subscriptions_url": "https://api.github.com/users/vulpes-vulpeos/subscriptions", |
| 365 | + "type": "User", |
| 366 | + "url": "https://api.github.com/users/vulpes-vulpeos", |
| 367 | + "user_view_type": "public" |
| 368 | + } |
324 | 369 | } |
325 | 370 | ], |
326 | | - "comments": 7, |
| 371 | + "comments": 8, |
327 | 372 | "comments_url": "https://api.github.com/repos/neovim/neovim/issues/12103/comments", |
328 | 373 | "created_at": "2020-04-10T05:46:12Z", |
329 | 374 | "events_url": "https://api.github.com/repos/neovim/neovim/issues/12103/events", |
|
380 | 425 | "locked": false, |
381 | 426 | "milestone": { |
382 | 427 | "closed_at": null, |
383 | | - "closed_issues": 726, |
| 428 | + "closed_issues": 728, |
384 | 429 | "created_at": "2014-05-10T20:43:04Z", |
385 | 430 | "creator": { |
386 | 431 | "avatar_url": "https://avatars.githubusercontent.com/u/1359421?v=4", |
|
410 | 455 | "labels_url": "https://api.github.com/repos/neovim/neovim/milestones/6/labels", |
411 | 456 | "node_id": "MDk6TWlsZXN0b25lNjU1MDM3", |
412 | 457 | "number": 6, |
413 | | - "open_issues": 630, |
| 458 | + "open_issues": 633, |
414 | 459 | "state": "open", |
415 | 460 | "title": "backlog", |
416 | | - "updated_at": "2025-07-07T03:51:31Z", |
| 461 | + "updated_at": "2025-07-20T16:53:32Z", |
417 | 462 | "url": "https://api.github.com/repos/neovim/neovim/milestones/6" |
418 | 463 | }, |
419 | 464 | "node_id": "MDU6SXNzdWU1OTc3MDg4OTc=", |
420 | 465 | "number": 12103, |
421 | 466 | "performed_via_github_app": null, |
422 | 467 | "reactions": { |
423 | | - "+1": 90, |
| 468 | + "+1": 92, |
424 | 469 | "-1": 0, |
425 | 470 | "confused": 0, |
426 | 471 | "eyes": 0, |
427 | | - "heart": 2, |
| 472 | + "heart": 3, |
428 | 473 | "hooray": 0, |
429 | 474 | "laugh": 0, |
430 | 475 | "rocket": 0, |
431 | | - "total_count": 92, |
| 476 | + "total_count": 95, |
432 | 477 | "url": "https://api.github.com/repos/neovim/neovim/issues/12103/reactions" |
433 | 478 | }, |
434 | 479 | "repository_url": "https://api.github.com/repos/neovim/neovim", |
|
451 | 496 | "node_id": "IT_kwDOAGK_Pc4ACRyr", |
452 | 497 | "updated_at": "2024-07-26T10:12:30Z" |
453 | 498 | }, |
454 | | - "updated_at": "2025-07-02T08:37:01Z", |
| 499 | + "updated_at": "2025-07-15T14:05:35Z", |
455 | 500 | "url": "https://api.github.com/repos/neovim/neovim/issues/12103", |
456 | 501 | "user": { |
457 | 502 | "avatar_url": "https://avatars.githubusercontent.com/u/297678?v=4", |
|
0 commit comments