Shell Completions

Shell completions

orangu has shell completion built in. Run orangu -s to print the completion script for the shell detected from $SHELL, then source it:

Short Long Completion
-c --config files
-t --theme theme names and .theme files
-w --workspace directories
-r --resume session UUIDs
-a --all
-p --prompt
-q --quiet
-l --list
-i --init
-s --shell-completions
-h --help

Completion for --resume scans ~/.orangu/sessions/ for the available session UUIDs and offers them newest first. The in-app /session Tab completion offers the same UUIDs, then the distinct workspace paths recorded across sessions, and finally — when the typed text matches neither — falls back to filesystem directory completion (expanding ~) so a brand-new workspace can be navigated to.

bash

Add to ~/.bashrc:

eval "$(orangu -s)"

Or write once to the bash-completion drop-in directory:

orangu -s > ~/.local/share/bash-completion/completions/orangu

zsh

Add to ~/.zshrc:

eval "$(orangu -s)"

Or write once to a directory on your $fpath:

mkdir -p ~/.zsh/completions
orangu -s > ~/.zsh/completions/_orangu
# ~/.zshrc
fpath=(~/.zsh/completions $fpath)
autoload -Uz compinit && compinit

fish

Add to ~/.config/fish/config.fish:

orangu -s | source

Or write once to the fish completions directory:

orangu -s > ~/.config/fish/completions/orangu.fish