|
| 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