Skip to content

Commit dc0cb13

Browse files
committed
v1.7.0
1 parent d81fc25 commit dc0cb13

File tree

3 files changed

+75
-0
lines changed

3 files changed

+75
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Each release entry covers the motivation, new features, breaking changes (if any
66

77
| Version | Blog post |
88
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
9+
| [v1.7.0](https://fulll.github.io/github-code-search/blog/release-v1-7-0) | Shell completions (bash/zsh/fish) + extended syntax highlighting (PHP, C/C++, Swift, Terraform/HCL, Dockerfile) |
910
| [v1.6.1](https://fulll.github.io/github-code-search/blog/release-v1-6-1) | Fix TUI only displaying first text fragment when a file has multiple matches |
1011
| [v1.6.0](https://fulll.github.io/github-code-search/blog/release-v1-6-0) | Power navigation: global fold/unfold, gg/G top/bottom, paged scroll, open-in-browser |
1112
| [v1.5.0](https://fulll.github.io/github-code-search/blog/release-v1-5-0) | Advanced filter targets, regex mode, word-jump, scroll fix |

docs/blog/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Full release notes and changelogs are always available on
1111

1212
| Release | Highlights |
1313
| -------------------------- | ----------------------------------------------------------------------------------------------------- |
14+
| [v1.7.0](./release-v1-7-0) | Shell completions (bash/zsh/fish), extended syntax highlighting (PHP, C/C++, Swift, Terraform, Dockerfile) |
1415
| [v1.6.1](./release-v1-6-1) | Fix TUI rendering only the first fragment for multi-match files |
1516
| [v1.6.0](./release-v1-6-0) | Power navigation: global fold/unfold (`Z`), Vim `gg`/`G` jumps, paged scroll, open-in-browser (`o`) |
1617
| [v1.5.0](./release-v1-5-0) | Advanced filter targets (content/path/repo), regex mode, word-jump shortcuts, scroll accuracy fix |

docs/blog/release-v1-7-0.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
title: "What's new in v1.7.0"
3+
description: "Shell completions for bash, zsh and fish, plus extended syntax highlighting for PHP, C/C++, Swift, Terraform/HCL and Dockerfile."
4+
date: 2026-03-04
5+
---
6+
7+
# What's new in github-code-search v1.7.0
8+
9+
> Full release notes: <https://github.com/fulll/github-code-search/releases/tag/v1.7.0>
10+
11+
## Highlights
12+
13+
### Shell completions — bash, zsh, fish
14+
15+
Tab-completion is now available for all three major shells. A new `completions` subcommand prints the appropriate script to stdout:
16+
17+
```bash
18+
# bash
19+
github-code-search completions --shell bash >> ~/.bashrc
20+
21+
# zsh (place the script in a $fpath directory)
22+
github-code-search completions --shell zsh > ~/.zfunc/_github-code-search
23+
24+
# fish
25+
github-code-search completions --shell fish > ~/.config/fish/completions/github-code-search.fish
26+
```
27+
28+
When `--shell` is omitted, the shell is auto-detected from `$SHELL`.
29+
30+
The completion scripts cover:
31+
32+
- All subcommands (`query`, `upgrade`, `completions`)
33+
- All flags (`--org`, `--format`, `--output-type`, `--exclude-repositories`, `--exclude-extracts`, `--group-by-team-prefix`, `--no-interactive`, `--include-archived`, `--no-cache`, `--debug`)
34+
- Enumerated flag values where applicable (`--format markdown|json`, `--output-type repo-and-matches|repo-only`)
35+
36+
#### Auto-refresh on upgrade
37+
38+
If you have installed completions, they are **refreshed automatically** every time you run `github-code-search upgrade`. No manual action needed — the completion file is overwritten in-place.
39+
40+
#### Install script
41+
42+
The `install.sh` script now calls `install_completions()` at the end of an installation, writing the completion file for the detected shell:
43+
44+
```bash
45+
curl -sSL https://raw.githubusercontent.com/fulll/github-code-search/main/install.sh | bash
46+
```
47+
48+
### Extended syntax highlighting
49+
50+
Five new language profiles have been added to the TUI code viewer:
51+
52+
| Language | Keywords → magenta | Special tokens → cyan |
53+
| ---------------- | ------------------------------ | ------------------------------- |
54+
| **PHP** | `function`, `class`, `echo`, `foreach`| `$variables`, PascalCase types — `#[Attributes]` correctly NOT dimmed (PHP 8+) |
55+
| **C / C++** | `int`, `void`, `struct`, `class`, `nullptr`| `#include`/`#define` directives |
56+
| **Swift** | `var`, `let`, `func`, `guard`, `protocol`| PascalCase types |
57+
| **Terraform/HCL** | `resource`, `variable`, `output`, `module`| Booleans / `null` |
58+
| **Dockerfile** | `FROM`, `RUN`, `CMD`, `COPY`, `EXPOSE`| `$ENV_VAR` / `${VAR}` references |
59+
60+
Language detection is extension-based first (`Dockerfile.ts` is correctly identified as TypeScript, not Dockerfile). Filename-based Dockerfile detection is the fallback for files without a known extension.
61+
62+
12 new file extensions are now recognised: `.php`, `.phtml`, `.c`, `.h`, `.cpp`, `.cc`, `.cxx`, `.hpp`, `.hxx`, `.swift`, `.tf`, `.hcl`.
63+
64+
---
65+
66+
## Upgrade
67+
68+
```bash
69+
github-code-search upgrade
70+
```
71+
72+
Or grab the latest binary directly from the
73+
[GitHub Releases page](https://github.com/fulll/github-code-search/releases/tag/v1.7.0).

0 commit comments

Comments
 (0)