for your shell to print the appropriate escape sequence at each prompt,
such as with the following command:
- printf \"\\e]7;file://%s%s\\e\\\\\" \"$HOSTNAME\" \"$PWD\""
- (let ((url (url-generic-parse-url text)))
- (when (and (string= (url-type url) "file")
- (or (null (url-host url))
- ;; Use `downcase' to match `url-generic-parse-url' behavior
- (string= (url-host url) (downcase (system-name)))))
- (ignore-errors
- (cd-absolute
- (concat (file-remote-p default-directory
- (url-unhex-string (url-filename url)))))))))
+ printf \"\\e]7;file://%s%s\\e\\\\\" \"$HOSTNAME\" \"$PWD\"
+
+A remote `default-directory' is maintained."
+ (when-let* ((url (url-generic-parse-url text))
+ ((string= (url-type url) "file")))
+ (ignore-errors
+ (cd-absolute
+ (concat (file-remote-p default-directory)
+ (url-unhex-string (url-filename url)))))))
;; Hyperlink handling (OSC 8)