hop
Hop: a small native macOS launcher. Clipboard history, find, on-device dictation and your coding agent behind one key.
Brought by drakestapleton
hop / tests / RemoteIndexChecks.swift
| 1 | // Prints, quoted for sh, the file-list rebuild command for the roots given (for tools/check-index-rebuild.sh). |
| 2 | import Foundation |
| 3 | |
| 4 | @main |
| 5 | struct RemoteIndexChecks { |
| 6 | static func quote(_ s: String) -> String { "'" + s.replacingOccurrences(of: "'", with: "'\\''") + "'" } |
| 7 | static func main() { |
| 8 | let roots = CommandLine.arguments.dropFirst().map(quote).joined(separator: " ") |
| 9 | print(quote(RemoteIndex.build(roots: roots, prune: "-name " + quote("node_modules"), shards: 20))) |
| 10 | } |
| 11 | } |