Refactor: Rename file search functions for clarity

This commit is contained in:
travertexg
2025-06-09 16:52:36 +00:00
parent c2dfb48e22
commit 250a0e1bde
5 changed files with 14 additions and 14 deletions

View File

@@ -14,7 +14,7 @@ import {
* @param query The query to search for.
* @returns A promise that resolves to a formatted string of search results.
*/
export async function searchFilesWithCorePlugin(
export async function matchSearchUsingCorePlugin(
query: string,
app: App,
): Promise<string> {

View File

@@ -47,7 +47,7 @@ function isOmnisearchAvailable(): boolean {
* @param app The Obsidian App instance.
* @returns A formatted string of search results.
*/
export async function searchFilesWithOmnisearch(
export async function matchSearchUsingOmnisearch(
query: string,
app: App,
): Promise<string> {

View File

@@ -1,5 +1,5 @@
import { App } from "obsidian";
import { searchFilesWithCorePlugin } from '../match/coreplugin-match'
import { matchSearchUsingCorePlugin } from '../match/coreplugin-match'
/**
* Performs a regular expression search using Obsidian's core search plugin.
@@ -8,10 +8,10 @@ import { searchFilesWithCorePlugin } from '../match/coreplugin-match'
* @param regex The regular expression to search for.
* @returns A promise that resolves to a formatted string of search results.
*/
export async function regexSearchFilesWithCorePlugin(
export async function regexSearchUsingCorePlugin(
regex: string,
app: App,
): Promise<string> {
const regexQuery = `/${regex}/`;
return searchFilesWithCorePlugin(regexQuery, app);
return matchSearchUsingCorePlugin(regexQuery, app);
}

View File

@@ -66,7 +66,7 @@ async function execRipgrep(bin: string, args: string[]): Promise<string> {
})
}
export async function regexSearchFilesWithRipgrep(
export async function regexSearchUsingRipgrep(
directoryPath: string,
regex: string,
ripgrepPath: string,