Files @ c584e55ee1e7
Branch filter:

Location: workgroups2/src/workgroups-misc.el

Sergey Pashinin
new var wg-restore-remote-buffers - restore remote dirs or not
(defun wg-string/starts-with (s arg)
  "returns non-nil if string S starts with ARG.  Else nil."
  (cond ((>= (length s) (length arg))
         (string-equal (substring s 0 (length arg)) arg))
        (t nil)))

(defun wg-is-file-remote (filename)
  "Return t if filename starts with \"/ssh:\" or \"/sudo:\""
  (interactive)
  (or (wg-string/starts-with filename "/ssh:")
      (wg-string/starts-with filename "/sudo:")))

;; (wg-is-file-remote "/sudo:/etc/myfile")

(provide 'workgroups-misc)