Skip to content

Commit 8e0c29a

Browse files
committed
style: apply clang-format to search_code command
Signed-off-by: Cosm1cAC <87748355+Cosm1cAC@users.noreply.github.com>
1 parent 9971fab commit 8e0c29a

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

‎src/mcp/mcp.c‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4497,7 +4497,8 @@ static void build_grep_cmd(char *cmd, size_t cmd_sz, bool use_regex, bool scoped
44974497
snprintf(
44984498
cmd, cmd_sz,
44994499
"powershell -Command \"$pat = Get-Content -Encoding UTF8 -LiteralPath '%s'; "
4500-
"Get-Content -Encoding UTF8 -LiteralPath '%s' | ForEach-Object { Select-String -LiteralPath $_ -Pattern $pat%s "
4500+
"Get-Content -Encoding UTF8 -LiteralPath '%s' | ForEach-Object { Select-String "
4501+
"-LiteralPath $_ -Pattern $pat%s "
45014502
"-ErrorAction SilentlyContinue }"
45024503
" | Where-Object { $_.Path -like '*%s' }"
45034504
" | ForEach-Object { $_.Path + [char]9 + $_.LineNumber + [char]9 + $_.Line }\"",
@@ -4506,7 +4507,8 @@ static void build_grep_cmd(char *cmd, size_t cmd_sz, bool use_regex, bool scoped
45064507
snprintf(
45074508
cmd, cmd_sz,
45084509
"powershell -Command \"$pat = Get-Content -Encoding UTF8 -LiteralPath '%s'; "
4509-
"Get-Content -Encoding UTF8 -LiteralPath '%s' | ForEach-Object { Select-String -LiteralPath $_ -Pattern $pat%s "
4510+
"Get-Content -Encoding UTF8 -LiteralPath '%s' | ForEach-Object { Select-String "
4511+
"-LiteralPath $_ -Pattern $pat%s "
45104512
"-ErrorAction SilentlyContinue }"
45114513
" | ForEach-Object { $_.Path + [char]9 + $_.LineNumber + [char]9 + $_.Line }\"",
45124514
tmpfile, filelist, sm);
@@ -4517,15 +4519,17 @@ static void build_grep_cmd(char *cmd, size_t cmd_sz, bool use_regex, bool scoped
45174519
cmd, cmd_sz,
45184520
"powershell -Command \"Get-ChildItem -Recurse -Path '%s\\*' -Include '%s' -File "
45194521
"-ErrorAction SilentlyContinue"
4520-
" | Select-String -Pattern (Get-Content -Encoding UTF8 -LiteralPath '%s')%s -ErrorAction SilentlyContinue"
4522+
" | Select-String -Pattern (Get-Content -Encoding UTF8 -LiteralPath '%s')%s "
4523+
"-ErrorAction SilentlyContinue"
45214524
" | ForEach-Object { $_.Path + [char]9 + $_.LineNumber + [char]9 + $_.Line }\"",
45224525
root_path, file_pattern, tmpfile, sm);
45234526
} else {
45244527
snprintf(
45254528
cmd, cmd_sz,
45264529
"powershell -Command \"Get-ChildItem -Recurse -Path '%s\\*' -File -ErrorAction "
45274530
"SilentlyContinue"
4528-
" | Select-String -Pattern (Get-Content -Encoding UTF8 -LiteralPath '%s')%s -ErrorAction SilentlyContinue"
4531+
" | Select-String -Pattern (Get-Content -Encoding UTF8 -LiteralPath '%s')%s "
4532+
"-ErrorAction SilentlyContinue"
45294533
" | ForEach-Object { $_.Path + [char]9 + $_.LineNumber + [char]9 + $_.Line }\"",
45304534
root_path, tmpfile, sm);
45314535
}

0 commit comments

Comments
 (0)