ファイル · コマンドリファレンス
qzx findText
機能
高度なフィルターを使ってファイル内のテキストパターンを検索します。
コマンドの成熟度: Alpha
実際の利用とフィードバックに使えますが、インターフェースと動作はまだ変更される可能性があります。 これは現在の開発チェックアウトに対する評価です。今後の各不変リリースタグには、そのバージョンに含まれた正確な評価が保存されます。 PyPI 0.2.2.0.9 で利用できます。ドキュメントは alpha チェックアウト 0.2.2.0.9 に対応しています。
動作と組み込み保護
状態を変更せずに検査します
この操作は直接実行されます
ネイティブプログラムを呼び出さずに動作します
ネットワークを使わずに動作します
権限昇格なしで動作するよう設計されています
この安全分類は 2026-08-25 に OpenAI GPT-5.6 Pro が実装ダイジェスト sha256:2aeda2f46c91d3f2a806da12a8f604fdcb90f6f0959d6c35a51b3c785c9e6d34 と照合してレビューしました。
正確な構文
qzx findText <pattern> <target> [recursive] [regex] [case_sensitive] [file_pattern] [context_lines] [invert_match] [count_only] [max_matches] [colored] --jsonパラメータ
スワイプするか横スクロールバーを使って、すべての列を表示してください。
| 名前 | 型 | 必須 | 既定値 | 説明 |
|---|---|---|---|---|
| pattern | str | はい | 未宣言 | 検索するテキストパターン (正規表現対応) |
| target | str | はい | 未宣言 | 検索対象のファイル、ディレクトリ、または空白区切りのファイル/ディレクトリ一覧 |
| recursive | str | いいえ | 未宣言 | 再帰レベル: -r/--recursive は無制限、-rN/--recursiveN は最大 N 階層 |
| regex | bool | いいえ | false | パターン照合に正規表現を使用 (true/false) |
| case_sensitive | bool | いいえ | true | 検索で大文字小文字を区別 (true/false) |
| file_pattern | str | いいえ | "*" | このパターンに一致するファイルだけを検索 (例: "*.py" または "*.{py,js}") |
| context_lines | int | いいえ | 0 | 各一致箇所の前後に表示する行数 |
| invert_match | bool | いいえ | false | パターンに一致しない行を表示 (true/false) |
| count_only | bool | いいえ | false | ファイルごとの一致件数だけを表示 (true/false) |
| max_matches | int | いいえ | 0 | 表示する最大一致件数 (0 は無制限) |
| colored | bool | いいえ | true | 一致箇所を色で強調 (true/false) |
入力例
qzx findText "function" "script.js"JavaScript ファイル内の "function" をすべて検索
qzx findText "error" "logs" truelogs ディレクトリのファイル内にある "error" をすべて検索
qzx findText "def\s+\w+" "src" true true正規表現を使って Python ファイル内の関数定義を検索
qzx findText "WARNING|ERROR" "logs" true true false "*.log"ログファイルで警告またはエラーを検索
qzx findText "TODO" "src" true false true "*.{py,js,ts}" 2ソースファイルで TODO を検索し前後 2 行を表示
qzx findText "function" "file1.js file2.js lib/utils.js"複数の指定ファイルで "function" の全出現を検索
完全な構造化ペイロードを取得するには --json を追加します: qzx findText <pattern> <target> [recursive] [regex] [case_sensitive] [file_pattern] [context_lines] [invert_match] [count_only] [max_matches] [colored] --json
観測された出力例
Windows 11 上の QZX 0.2.2.0.9 で取得。終了コードは 0。ホスト依存の値や所要時間は変わる場合があります。
例のコマンド: qzx findText QZX ../artifacts/qzx-evidence/golden-core-files -r --regex=false --case-sensitive=false "--file-pattern=*.txt" --context-lines=1 --max-matches=10 --colored=false --json
{
"success": true,
"pattern": "QZX",
"target": "../artifacts/qzx-evidence/golden-core-files",
"regex": false,
"case_sensitive": false,
"file_pattern": "*.txt",
"recursive": "unlimited",
"context_lines": 1,
"invert_match": false,
"files_searched": 2,
"files_with_matches": 2,
"total_matches": 2,
"results": [
{
"file": "C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\golden-core-files\\alpha.txt",
"matches": 1,
"lines": [
{
"line_num": 1,
"content": "QZX alpha evidence",
"is_match": true
},
{
"line_num": 2,
"content": "second line",
"is_match": false
}
]
},
{
"file": "C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\golden-core-files\\nested\\gamma.txt",
"matches": 1,
"lines": [
{
"line_num": 1,
"content": "prefix qzx suffix",
"is_match": true
}
]
}
],
"message": "Found 2 matches in 2 files (including all subdirectories)",
"meta": {
"command": "findText",
"command_maturity": {
"stage": "alpha",
"label": "Alpha",
"sequence": 2,
"public_executable": true,
"stability": "interface_may_change",
"summary": "Available for real use and feedback while its interface and behavior can still evolve.",
"promotion_review_required": false,
"assessment_scope": "development_checkout"
},
"duration_ms": 7.362,
"schema_version": 1
}
}JSON 結果コントラクトを見る
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [
"success",
"message",
"meta"
],
"properties": {
"success": {
"type": "boolean"
},
"message": {
"type": "string"
},
"meta": {
"type": "object",
"required": [
"command",
"command_maturity",
"duration_ms",
"schema_version"
],
"properties": {
"command": {
"type": "string"
},
"command_maturity": {
"type": "object",
"required": [
"stage",
"label",
"sequence",
"public_executable",
"stability",
"summary",
"promotion_review_required",
"assessment_scope"
],
"properties": {
"stage": {
"type": "string"
},
"label": {
"type": "string"
},
"sequence": {
"type": "integer"
},
"public_executable": {
"type": "boolean"
},
"stability": {
"type": "string"
},
"summary": {
"type": "string"
},
"promotion_review_required": {
"type": "boolean"
},
"assessment_scope": {
"type": "string"
},
"note": {
"type": "string"
},
"review": {
"type": "object",
"required": [
"reviewed_on",
"rationale",
"evidence"
],
"properties": {
"reviewed_on": {
"type": "string",
"format": "date"
},
"rationale": {
"type": "string"
},
"evidence": {
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
},
"replacement": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": true
},
"duration_ms": {
"type": "number"
},
"schema_version": {
"type": "integer"
}
},
"additionalProperties": true
},
"case_sensitive": [],
"context_lines": [],
"error": {
"type": "string"
},
"file_pattern": [],
"files_searched": [],
"files_with_matches": [],
"invert_match": [],
"pattern": [],
"recursive": {
"type": "string"
},
"regex": [],
"results": [],
"target": [],
"total_matches": []
},
"additionalProperties": true
}エラーと制限
公開コントラクトでは失敗時に success=false と説明的な message が必要です。このカタログではまだコマンドごとのエラー分類を宣言していません。結果を確認し、存在しないコードを推測しないでください。
QZX は alpha 段階です。オプション依存関係、権限、ホスト機能によって結果が変わる場合があります。
{
"success": false,
"error": "Invalid regular expression: unterminated character set at position 0",
"message": "Invalid regular expression: unterminated character set at position 0",
"meta": {
"command": "findText",
"command_maturity": {
"stage": "alpha",
"label": "Alpha",
"sequence": 2,
"public_executable": true,
"stability": "interface_may_change",
"summary": "Available for real use and feedback while its interface and behavior can still evolve.",
"promotion_review_required": false,
"assessment_scope": "development_checkout"
},
"duration_ms": 4.133,
"schema_version": 1
}
}取得したコマンド: qzx findText "[" ../artifacts/qzx-evidence/golden-core-files -r --regex=true --max-matches=1 --colored=false --json
証拠フロー: 取得済み・ダイジェストで検証済み。
証拠と出所
- ドキュメントチャネル
- 開発ドキュメント 0.2.2.0.9 · main · sha256:cfba936e39931c286ca23add0ae546693db17d8b316e7cbc3891d26642d9b7e8
- 提供状況
- 0.2.2.0.9 以前
さらに探す
関連コマンド
これらのコマンドも ファイル カテゴリに属します。比較して、タスクに最適な操作を選んでください。