Helm: Insert double-quoted file with helm-insert-file-name-completion-at-point in SLY.
parent
c4ee4c1456
commit
934c3a5a75
|
@ -25,9 +25,24 @@ of the full, abbreviated or relative paths to insert."
|
|||
(string-match-p
|
||||
"\\`\\(/\\|[[:lower:][:upper:]]:/\\)"
|
||||
guess))))
|
||||
(escape-fn (if (memq major-mode
|
||||
helm-modes-using-escaped-strings)
|
||||
#'shell-quote-argument #'identity))
|
||||
(escape-fn (cond
|
||||
((derived-mode-p 'sly-mrepl-mode)
|
||||
;; TODO: Inserting the path as is does not work with
|
||||
;; #p if the file has a wildcard, so we must escape it.
|
||||
;; Or output uiop:ensure-pathname?
|
||||
;;
|
||||
;; In sbcl-ambrevar, we have FOF and we can use #f instead.
|
||||
;;
|
||||
;; (lambda (s)
|
||||
;; (if (string-match-p (regexp-opt '("[" "]" "*") )
|
||||
;; s)
|
||||
;; (concat "(uiop:ensure-pathname \"" s "\")")
|
||||
;; (concat "#p\"" s "\"")))
|
||||
#'prin1-to-string)
|
||||
((memq major-mode
|
||||
helm-modes-using-escaped-strings)
|
||||
#'shell-quote-argument)
|
||||
(t #'identity)))
|
||||
(fname-formats '(:full nil
|
||||
:abbreviated (4)
|
||||
:relative (16)
|
||||
|
|
Loading…
Reference in New Issue