1
0
mirror of https://codeberg.org/cage/tinmop/ synced 2025-01-30 04:14:47 +01:00

- allowed opending kami address from command line, using '-o' switch.

This commit is contained in:
cage 2022-02-05 16:24:37 +01:00
parent 01215de078
commit bf781ee291
3 changed files with 9 additions and 8 deletions

View File

@ -68,7 +68,7 @@
:description (_ "Open gemini url")
:short #\o
:arg-parser #'identity
:long "open-gemini-url")
:long "open-gemini-url")
(:name :gemini-full-screen-mode
:description (_ "Start as gemini client only.")
:short #\G

View File

@ -166,7 +166,7 @@ etc.) happened"
command-line:*module-file*)
:as-error t))))
(if command-line:*gemini-url*
(gemini-viewer:load-gemini-url command-line:*gemini-url*)
(ui:open-net-address command-line:*gemini-url*)
(progn
(let ((program-events:*process-events-immediately* t))
(when command-line:*start-timeline*

View File

@ -1923,7 +1923,7 @@ mot recent updated to least recent"
open-message-link-window:open-message-link"
(_ "Open url: "))
(defun open-net-address ()
(defun open-net-address (&optional (address nil))
"Ask for an internet address and try to load it.
Currently the only recognized protocols are gemini and kami."
(flet ((on-input-complete (url)
@ -1931,11 +1931,12 @@ Currently the only recognized protocols are gemini and kami."
(if (text-utils:string-starts-with-p kami:+kami-scheme+ trimmed-url)
(open-kami-address trimmed-url)
(open-gemini-address trimmed-url)))))
(let ((prompt (open-url-prompt)))
(ask-string-input #'on-input-complete
:prompt prompt
:complete-fn (complete:make-complete-gemini-iri-fn prompt)))))
(if (null address)
(let ((prompt (open-url-prompt)))
(ask-string-input #'on-input-complete
:prompt prompt
:complete-fn (complete:make-complete-gemini-iri-fn prompt)))
(on-input-complete address))))
(defun open-gemini-address (url)
(gemini-viewer:load-gemini-url url