Skip to content

pathCompleter() function

Home > streplts > pathCompleter

High-performance file path completion builder mapping real directory systems onto option choices.

Signature:

export declare function pathCompleter(options?: {
onlyDirs?: boolean;
}): (typed: string, previousArgs: string[], context: any, globals: any) => string[];

Parameter

Type

Description

options

{ onlyDirs?: boolean; }

(Optional) Toggles adjusting directory searches.

Returns:

(typed: string, previousArgs: string[], context: any, globals: any) => string[]

A structured contextual choice generator function compliant with ArgDefinition["choices"]. *

Dynamically resolves slash trends across platforms, queries synchronous local filesystem boundaries, filters trailing types, and appends directory directory context indicators.