spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / mods / diff / hooks / views / detail / placeholder-of / safe-pathspec-pattern / safe-pathspec-pattern.ts
7 lines · 291 BRaw
1/**
2 * A file name safe to paste into a stage command in any shell (POSIX,
3 * PowerShell, cmd): letters and digits of any script and `._/@+-` only.
4 *
5 * No quote of any kind, no separator and no substitution can ride in it.
6 */
7export const SAFE_PATHSPEC_PATTERN = /^[\p{L}\p{N}._/@+-]+$/u