mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
doom/sudo-find-file work on remote files
This commit is contained in:
@ -7,7 +7,9 @@
|
||||
(list (read-file-name "Open as root: ")))
|
||||
(find-file (if (file-writable-p file)
|
||||
file
|
||||
(concat "/sudo:root@localhost:" file))))
|
||||
(if (file-remote-p file)
|
||||
(concat "/" (file-remote-p file 'method) ":" (file-remote-p file 'user) "@" (file-remote-p file 'host) "|sudo:root@" (file-remote-p file 'host) ":" (file-remote-p file 'localname))
|
||||
(concat "/sudo:root@localhost:" file)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom/sudo-this-file ()
|
||||
|
Reference in New Issue
Block a user