Created
February 4, 2022 22:46
-
-
Save GitMurf/4b9a9598f6eb58fe96707cb900b3cd5a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%* | |
const search = app.workspace.getLeavesOfType("search")[0]; | |
let thisFile = app.workspace.getActiveFile(); | |
//SortOrder Options: alphabeticalReverse, alphabetical, byModifiedTime, byModifiedTimeReverse, byCreatedTime, byCreatedTimeReverse | |
search.view.setSortOrder("byCreatedTime"); | |
//Collapse=true, Expand=false | |
search.view.setCollapseAll(false); | |
//Show Extra Context: true or false | |
search.view.setExtraContext(true); | |
const noteName = tp.file.title; | |
const myString = await tp.system.prompt("Task Keyword", noteName); | |
search.view.setQuery(`((file:(${myString}) "[ ]") OR section:(--${myString} "[ ]") OR section:(--${myString} section:("[ ]"))) -file:inbox`); | |
app.workspace.revealLeaf(search); | |
%> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment