1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-29 00:11:16 +01:00
RIOT/dist/tools/zsh-completion
Marian Buschsieweke eb6127e4e5
dist/tools/zsh-completion: add awareness for STATIC_ANALYSIS
This adds `STATIC_ANALYSIS` awareness to the ZSH completion, so that
enabling static analysis is made easier for zsh users who use the
completion snippet.
2025-04-18 09:36:32 +02:00
..

Command Line Completion Using ZSH

This provides command line completion for zsh to increase productivity when working with RIOT build system. The completion focuses on make targets, options, and variables commonly used when interacting with the RIOT build system from the shell. Aspects of the build system typically only used by scripts or the CI are (intentionally) not added.

Installation

  1. Copy the zsh-riot.sh script where you can find it, e.g. cp zsh-riot.sh ~/.zsh-riot.sh
  2. Hook up the custom RIOT specific make completion in .zshrc and use that instead of the default make completion if and only if the working directory is inside a RIOT repository. This can be done by adding the following snippet:
source ~/.zsh-riot.sh
compdef '
if git rev-parse --is-inside-work-tree &> /dev/null && [[ -e "$(git rev-parse --show-toplevel)/.murdock" ]]; then
  _riot
else
  _make
fi
' make