File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -84,10 +84,15 @@ local finder = function(opts)
8484 if not job_started then
8585
8686 local load_file_command = " "
87- if string.match (opts .url , " ^/" ) ~= nil then
87+ local expanded_url = vim .fn .expand (opts .url )
88+ local file_or_web_url = " "
89+ local starts_with_slash = string.match (expanded_url , " ^/" ) ~= nil
90+ if starts_with_slash then
8891 load_file_command = " cat"
92+ file_or_web_url = expanded_url
8993 else
9094 load_file_command = " curl"
95+ file_or_web_url = opts .url
9196 end
9297
9398 job_started = true
@@ -96,7 +101,7 @@ local finder = function(opts)
96101 :new ({
97102 command = load_file_command ,
98103 args = {
99- opts . url ,
104+ file_or_web_url ,
100105 },
101106 on_exit = vim .schedule_wrap (function (j , exit_code )
102107 if exit_code ~= 0 then
You can’t perform that action at this time.
0 commit comments