Tab Completion - espresso20/civcli GitHub Wiki

Tab Completion

This page explains how tab completion works in CivIdleCli and how to use it effectively.

Tab Completion Overview

CivIdleCli features a robust tab completion system that helps players:

  1. Complete partial commands
  2. Discover available subcommands and options
  3. Cycle through multiple matching suggestions

Basic Usage

Completing Commands

  1. Type the beginning of a command
  2. Press the Tab key
  3. The command will auto-complete if there's a unique match

For example:

  • Type bui and press Tab → Completes to build
  • Type he and press Tab → Completes to help

Discovering Options

  1. Type a complete command followed by a space
  2. Press the Tab key
  3. The game will show available subcommands or options

For example:

  • Type build and press Tab → Shows available buildings
  • Type gather and press Tab → Shows available resources

Cycling Through Suggestions

If multiple commands match your input:

  1. Press Tab to see the first suggestion
  2. Press Tab again to cycle to the next suggestion
  3. Continue pressing Tab to cycle through all matching options

For example:

  • Type b and press Tab repeatedly → Cycles through build, buildings, etc.

Command-Specific Completions

Different commands offer different completion options:

build

Shows available buildings:

  • hut
  • farm
  • lumber_mill
  • mine
  • market
  • library

gather / assign / unassign

Shows available resources:

  • food
  • wood
  • stone
  • gold
  • knowledge

research

Shows available technologies for research

library

Shows available library topics:

  • villagers
  • resources
  • buildings
  • ages
  • commands
  • tips

Partial Word Completion

The tab completion system can also complete partial words:

  1. Type part of a command or subcommand
  2. Press Tab
  3. The system will complete the word if there's a unique match

For example:

  • Type build fa and press Tab → Completes to build farm
  • Type assign villager wo and press Tab → Completes to assign villager wood

Tips for Efficient Tab Completion

  1. Learn Command Beginnings: Knowing the first few letters of commands speeds up your gameplay
  2. Explore Options: Use Tab after commands to discover what's available
  3. Multiple Tabs: Remember that pressing Tab multiple times cycles through options
  4. Command Structure: Understanding the command structure (command → subcommand → arguments) helps with effective tab completion
  5. Quick Navigation: Use Tab completion to quickly navigate through complex commands without typing them fully