Common Errors
cli-expander: command not found
The binary is not in your PATH.
# Find the binary
find ~/.local/bin -name cli-expander -o -name ce
# Add to PATH
echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.bashrc
source ~/.bashrc
No match found for trigger
The match directory doesn't contain the trigger, or the path is wrong.
# Check your match files exist
ls ~/.config/cli-expander/matches/
# Validate YAML syntax
python3 -c "import yaml; yaml.safe_load(open('base.yml'))"
# List available triggers
ce list
# Load from a specific directory
ce expand ":hello" --config-dir ~/.config/cli-expander/matches/
Common causes:
- File starts with
_(underscore files are ignored) - Wrong file extension (must be
.ymlor.yaml) - YAML syntax error (missing indentation, tabs used instead of spaces)
- Misspelled trigger name
Form requires an interactive terminal
This happens when running in a non-interactive context:
- Piped output:
echo ":form" | ce expand - Over SSH without TTY:
ssh host ce expand ":form" - In CI/headless environments
- Inside editors with non-TTY terminals
Fix: Run directly in a terminal emulator.
ce ":form" # works
ce expand ":form" # works
Shell Plugin Not Responding
If :trigger[Space] doesn't expand in your shell:
# Verify plugin is loaded
type _cli_expander_on_space
# Expected: function found
# If not found, check your shell rc file
grep "cli-expander" ~/.bashrc
# Reload shell
exec bash
Zsh-specific: Load cli-expander last in ~/.zshrc:
source /path/to/zsh-autosuggestions.zsh
source /path/to/zsh-syntax-highlighting.zsh
source /path/to/shell/cli-expander.zsh # ← last
No keyboard devices found
System-wide detection needs access to /dev/input/ devices.
# Check group membership
groups $USER
# Add to input group
sudo usermod -aG input $USER
# Log out and back in for changes to take effect
Permission denied for /dev/uinput
uinput injection needs write access.
# Check permissions
ls -l /dev/uinput
# Add to uinput group
sudo usermod -aG uinput $USER
# Alternative: set capability
sudo setcap cap_dac_override+ep $(which ce)
Expansion Shows Wrong Output
If the expanded text is missing characters or shows only "v":
The injection backend may not be compatible with your application. Try:
- Add
force_mode: clipboardto the match to use clipboard injection - Add
force_mode: keysto simulate keyboard input - Set the global
backendoption in~/.config/cli-expander/config.yml
# config.yml
backend: clipboard
YAML File is Skipped
If a match file is not being loaded, check:
# File must not start with underscore
ls ~/.config/cli-expander/matches/
# _private.yml ← skipped
# base.yml ← loaded
# File extension must be .yml or .yaml
# config.txt ← skipped
# config.yml ← loaded
CSV Not Updated After Changes
The fzf trigger search uses a CSV cache. Regenerate it after adding matches:
ce generate-csv --force
Clipboard Variable Returns Empty
The clipboard variable requires a running display server and clipboard tool:
# X11
sudo apt install xclip # Debian/Ubuntu
sudo pacman -S xclip # Arch
# Wayland
sudo apt install wl-clipboard # Debian/Ubuntu
sudo pacman -S wl-clipboard # Arch
# Test clipboard access
echo "test" | xclip -selection clipboard
xclip -selection clipboard -o
fzf Not Found
If Ctrl+F/Alt+F doesn't open the trigger search:
which fzf
# If not installed:
sudo apt install fzf # Debian/Ubuntu
sudo pacman -S fzf # Arch
sudo dnf install fzf # Fedora
RUST_LOG No Output
If debug logging produces no output:
# Try explicit log level
RUST_LOG=trace ce expand ":hello"
# Ensure you're using a supported format
RUST_LOG=debug ce expand ":hello" 2>&1
Getting Help
If you still have issues:
- Check the GitHub Issues
- Enable debug logging:
RUST_LOG=debug ce expand ":hello" - Include in your bug report:
ce --versionoutput- Your match file content
- Exact steps to reproduce
- Terminal emulator and shell version