1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 20:22:26 +01:00

Added :load [playlist]<tab>, command for loading specified playlist (autocompleted)

This commit is contained in:
Prathyush Thota
2009-03-24 04:18:43 +05:30
parent 74dde82355
commit 77f277ddcc
2 changed files with 46 additions and 0 deletions

View File

@@ -1409,6 +1409,21 @@ function Completion() //{{{
}
},
playlist: function playlist(context, args)
{
let playlists = Player().getPlaylists();
let length = playlists.length;
let playlistNames = [];
for (var i=0; i < length; i++)
{
playlistNames[i] = [playlists[i].name.toString(),playlists[i].name];
}
context.title = ["Playlists"];
context.completions = playlistNames;
},
buffer: function buffer(context)
{
filter = context.filter.toLowerCase();