MCPcopy Create free account
hub / github.com/codeaashu/claude-code / isPathLikeToken

Function isPathLikeToken

src/utils/suggestions/directoryCompletion.ts:152–162  ·  view source on GitHub ↗
(token: string)

Source from the content-addressed store, hash-verified

150 * Checks if a string looks like a path (starts with path-like prefixes)
151 */
152export function isPathLikeToken(token: string): boolean {
153 return (
154 token.startsWith('~/') ||
155 token.startsWith('/') ||
156 token.startsWith('./') ||
157 token.startsWith('../') ||
158 token === '~' ||
159 token === '.' ||
160 token === '..'
161 )
162}
163
164/**
165 * Scans a directory and returns both files and subdirectories

Callers 1

useTypeaheadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected