This commit is contained in:
@@ -209,6 +209,7 @@ end
|
||||
|
||||
internal.planets = function(opts)
|
||||
local show_pluto = opts.show_pluto or false
|
||||
local show_moon = opts.show_moon or false
|
||||
|
||||
local sourced_file = require("plenary.debug_utils").sourced_filepath()
|
||||
local base_directory = vim.fn.fnamemodify(sourced_file, ":h:h:h:h")
|
||||
@@ -216,7 +217,7 @@ internal.planets = function(opts)
|
||||
local globbed_files = vim.fn.globpath(base_directory .. "/data/memes/planets/", "*", true, true)
|
||||
local acceptable_files = {}
|
||||
for _, v in ipairs(globbed_files) do
|
||||
if show_pluto or not v:find "pluto" then
|
||||
if (show_pluto or not v:find "pluto") and (show_moon or not v:find "moon") then
|
||||
table.insert(acceptable_files, vim.fn.fnamemodify(v, ":t"))
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user