mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-08 04:09:15 -04:00
launcher: add /d /f file search prefixes. Fix prefix not always
triggering
This commit is contained in:
@@ -159,3 +159,14 @@ function sortPluginsOrdered(plugins, order) {
|
||||
return aOrder - bOrder;
|
||||
});
|
||||
}
|
||||
|
||||
function parseFileSearchPrefix(query) {
|
||||
if (!query || !query.startsWith("/"))
|
||||
return null;
|
||||
var rest = query.substring(1);
|
||||
if (rest === "d" || rest.startsWith("d ") || rest.startsWith("d\t"))
|
||||
return { type: "dir", query: rest.substring(1).trim() };
|
||||
if (rest === "f" || rest.startsWith("f ") || rest.startsWith("f\t"))
|
||||
return { type: "file", query: rest.substring(1).trim() };
|
||||
return { type: null, query: rest.trim() };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user