mirror of https://github.com/tstack/lnav
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
432 B
Plaintext
18 lines
432 B
Plaintext
#
|
|
# @synopsis: docker-url-handler
|
|
# @description: Internal script to handle opening docker URLs
|
|
#
|
|
|
|
;SELECT CASE path
|
|
WHEN '/' THEN
|
|
'docker logs -f ' || hostname
|
|
ELSE
|
|
'docker exec ' || hostname || ' tail -n +0 -F "' || path || '"'
|
|
END AS cmd
|
|
FROM (SELECT
|
|
jget(url, '/host') AS hostname,
|
|
jget(url, '/path') AS path
|
|
FROM (SELECT parse_url($1) AS url))
|
|
|
|
:sh eval $cmd
|