summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorGuido Cella <guido@guidocella.xyz>2023-10-15 12:16:55 +0200
committerDudemanguy <random342@airmail.cc>2023-11-02 14:58:28 +0000
commit8e16dcf2a2daf92d749c190bcb575012fc73b466 (patch)
tree878815bbaa472beda2301bb438a7199a98caf943 /player
parente1ca04274dc411e1ef933da8394cc890296ab394 (diff)
downloadmpv-8e16dcf2a2daf92d749c190bcb575012fc73b466.tar.bz2
mpv-8e16dcf2a2daf92d749c190bcb575012fc73b466.tar.xz
console.lua: complete profiles
Diffstat (limited to 'player')
-rw-r--r--player/lua/console.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/player/lua/console.lua b/player/lua/console.lua
index f47ef15c3e..ec486639d6 100644
--- a/player/lua/console.lua
+++ b/player/lua/console.lua
@@ -659,6 +659,16 @@ local function property_list()
return properties
end
+local function profile_list()
+ local profiles = {}
+
+ for i, profile in ipairs(mp.get_property_native('profile-list')) do
+ profiles[i] = profile.name
+ end
+
+ return profiles
+end
+
local function choice_list(option)
local info = mp.get_property_native('option-info/' .. option, {})
@@ -687,6 +697,8 @@ function build_completers()
{ pattern = '^%s*set%s+"?([%w_-]+)"?%s+"()%S*$', list = choice_list, append = '"' },
{ pattern = '^%s*cycle[-_]values%s+"?([%w_-]+)"?.-%s+()%S*$', list = choice_list, append = " " },
{ pattern = '^%s*cycle[-_]values%s+"?([%w_-]+)"?.-%s+"()%S*$', list = choice_list, append = '" ' },
+ { pattern = '^%s*apply[-_]profile%s+"()%S*$', list = profile_list, append = '"' },
+ { pattern = '^%s*apply[-_]profile%s+()%S*$', list = profile_list },
{ pattern = '${()[%w_/-]+$', list = property_list, append = '}' },
}