Function: dired-rsync--extract-user-from-tramp

dired-rsync--extract-user-from-tramp is a natively compiled function defined in dired-rsync.el.

Signature

(dired-rsync--extract-user-from-tramp FILE-OR-PATH)

Documentation

Extract the username part of a tramp FILE-OR-PATH.

Source Code

;; Defined in /nix/store/i42d1fmg6q3dci37c05j415vhqjrzi15-emacs-packages-deps/share/emacs/site-lisp/elpa/dired-rsync-20261005.758/dired-rsync.el
;; This is tricky for remote-to-remote because we may have an implied
;; user from the local config which isn't available on the remote
;; .ssh/config
(defun dired-rsync--extract-user-from-tramp (file-or-path)
  "Extract the username part of a tramp FILE-OR-PATH."
  (with-parsed-tramp-file-name file-or-path tfop
    (or tfop-user
        ;; somehow extract .ssh/config user for tfop-host
        (getenv "USER"))))