change sudo to doas for open file with root privileges

This commit is contained in:
Jesús 2021-11-02 12:19:54 -05:00
parent 5c590da187
commit e81308a39c
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766

View File

@ -83,12 +83,12 @@
browse-url-generic-program "iceweasel-uxp") browse-url-generic-program "iceweasel-uxp")
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
;; sudo open file option ;; doas open file option
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
(defun sudo-find-file (file-name) (defun doas-find-file (file-name)
"Like find file, but opens the file as root." "Like find file, but opens the file as root."
(interactive "FSudo Find File: ") (interactive "FDoas Find File: ")
(let ((tramp-file-name (concat "/sudo::" (expand-file-name file-name)))) (let ((tramp-file-name (concat "/doas::" (expand-file-name file-name))))
(find-file tramp-file-name))) (find-file tramp-file-name)))
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------