pathcomplete

package
v1.11.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package pathcomplete offers directory completion for a typed path prefix.

It is deliberately incapable of browsing: there is no "list everything" entry point, because Sidecar's Add Project form must never enumerate a directory before the user has typed a path prefix. A caller with an empty input gets nothing back.

Index

Constants

View Source
const DefaultLimit = 8

DefaultLimit is how many candidates a form shows before it stops listing.

Variables

This section is empty.

Functions

func Directories

func Directories(input string, limit int) []string

Directories returns directory candidates for a typed prefix, formatted the way the user is typing them: a path that began with ~ comes back with ~.

The empty input returns nil. So does a bare "~", "~/" or "/" with nothing after it: the user has expressed a root, not a prefix to complete.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL