# Clink configuration
#
# Last reviewed release: v1.4.24

# ---------------------------------- Clink ------------------------------------

# Command to run in the first CMD prompt shown after Clink is injected
#
# If blank, Clink looks for clink_start.cmd in the binaries and profile
# directories, and runs it if found. Set to "nul" to disable any command.
clink.autostart = nul

# Periodically check for updates
clink.autoupdate = False
# Interval between update checks (days)
clink.update_interval = 5

# Context sensitive colouring of input
clink.colorize_input = True

# Default key bindings
#
# Valid values:
# - bash
# - windows
clink.default_bindings = windows

# Startup logo to display when Clink is injected
#
# Valid values:
# - none
# - short
# - full
clink.logo = none

# Maximum number of rows the input line can use, up to the terminal height. If
# set to zero, the limit is the terminal height.
clink.max_input_rows = 0

# Handling of CR and LF characters on paste
#
# Valid values:
# - ampersand
# - crlf
# - delete
# - space
clink.paste_crlf = crlf

# Paths from which to load Lua scripts (semicolon-separated)
#clink.path =

# Prompt filtering by Lua scripts
clink.promptfilter = True


# -------------------------- Automatic suggestions ----------------------------

# Display suggested commands
autosuggest.enable = True

# Generate suggestions asynchronously
autosuggest.async = True

# Strategy for choosing suggestions
#
# Multiple strategies are attempted in listed order (space-separated).
#
# Valid values:
# - completion
# - history
# - match_prev_cmd
autosuggest.strategy = match_prev_cmd history completion

# Use original capitalisation of suggestions
autosuggest.original_case = True


# ---------------------------- Command Processor ------------------------------

# If set, the text to replace the "Administrator: " console title prefix
#cmd.admin_title_prefix =

# Automatically answer "Terminate batch job (Y/N)?" prompts
#
# Valid values:
# - off
# - answer_no
# - answer_yes
cmd.auto_answer = off

# Retrieve %errorlevel% before each interactive prompt for use by Lua scripts
cmd.get_errorlevel = True

# Exit on receiving Alt+F4
cmd.altf4_exits = True
# Exit on receiving Ctrl+D on an empty line
cmd.ctrld_exits = False


# --------------------------------- Colours -----------------------------------

# Default colours
#
# Input text
color.input                     = sgr 38;5;222
# Command prompt
#color.prompt                   =

# Input line
#
# Selected text
color.selection                 = sgr 38;5;16;48;5;179
# Automatic suggestion (autosuggest.enable)
color.suggestion                = sgr 38;5;239
# Unrecognised command word
color.unrecognized              = sgr 38;5;203

# Completions
#
# Argument information (with argmatcher)
color.arginfo                   = sgr 38;5;172
# CMD completion (also used by clink.colorize_input)
color.cmd                       = sgr 1;38;5;231
# Comment row
color.comment_row               = sgr 38;5;87;48;5;18
# Match description
color.description               = sgr 38;5;39
# DOSKEY alias (also used by clink.colorize_input)
color.doskey                    = sgr 1;38;5;75
# Filtered completion
color.filtered                  = sgr 38;5;231
# File with the Hidden attribute
color.hidden                    = sgr 38;5;160
# File with the Read-only attribute
color.readonly                  = sgr 38;5;28
# Selected completion
color.selected_completion       = sgr 38;5;16;48;5;254

# Horizontal scroll indicators
color.horizscroll               = sgr 38;5;16;48;5;30

# Interactive prompt
color.interact                  = bold
# Prompt message area
color.message                   = default

# Pop-up lists and messages
#color.popup                    =
# Pop-up list description column
#color.popup_desc               =

# Context sensitive input (clink.colorize_input)
#
# Command argument
#color.arg                      =
# Command name (with argmatcher)
color.argmatcher                = sgr 1;38;5;40
# Redirection symbols
color.cmdredir                  = sgr 38;5;172
# Command separators
color.cmdsep                    = sgr 38;5;214
# Command word if an executable file
color.executable                = sgr 1;38;5;33
# Command flag
color.flag                      = sgr 38;5;117
# History expansions
color.histexpand                = sgr 97;48;5;55
# Unexpected argument
color.unexpected                = default


# ------------------------------- Executables ---------------------------------

# Match executables when completing the first word of a line
exec.enable = True

# Executable matching sources
#
# Include DOSKEY aliases
exec.aliases = True
# Include CMD commands
exec.commands = True
# Include executables in the current working directory. This is implicit if the
# word being completed is a relative path, or exec.files is enabled.
exec.cwd = True
# Include directories relative to the current working directory
exec.dirs = True
# Include files in the current directory
exec.files = False
# Include executables in directories found in the %PATH% environment variable
exec.path = True

# If the line begins with whitespace perform normal file matching
exec.space_prefix = True


# --------------------------------- History -----------------------------------

# Save command history between sessions
history.save = True

# Share history across all active instances
history.shared = False

# Maximum number of history lines to retain
history.max_lines = 25000

# Automatically perform history expansion on accepting a command line
history.auto_expand = True

# If the text at the cursor is subject to history expansion, show a preview of
# the expanded result below the input line.
history.show_preview = True

# Save and optionally display history timestamps
#
# Valid values:
# - off
# - save
# - show
history.time_stamp = save
# Time format for display of history timestamps
history.time_format = "%F %T  "

# Handling of lines which match an existing entry
#
# Valid values:
# - add
# - erase_prev
# - ignore
history.dupe_mode = erase_prev

# Interpretation of "!" character for word expansion
#
# Valid values:
# - off
# - on
# - not_quoted
# - not_squoted
# - not_dquoted
history.expand_mode = not_quoted

# When using a history line do not add the line to the end of the history, and
# retain the history search position so subsequent invocation of next/previous
# history line is relative to the previously used history line.
history.sticky_search = False

# Commands to exclude from adding to history
#
# Entries can be space, comma, or semicolon separated.
history.dont_add_to_history_cmds = exit history

# Ignore lines which begin with whitespace when adding to history
history.ignore_space = True


# ----------------------------------- Lua -------------------------------------

# Value to append to package.path
#lua.path =

# Treat argument errors as a failure in scripts
lua.strict = True

# Reload scripts each time the edit prompt is activated
lua.reload_scripts = False

# Print a stack trace on errors
lua.traceback_on_error = False

# Load a simple embedded debugger
lua.debug = False
# Break into the debugger on errors
lua.break_on_error = False
# Break into the debugger on traceback()
lua.break_on_traceback = False


# -------------------------------- Matching -----------------------------------

# Expand abbreviated paths before performing completion
match.expand_abbrev = True

# Expand environment variables in a word before performing completion
match.expand_envvars = True

# Ignore character accents when completing matches
match.ignore_accent = True
# Case sensitivity behaviour when completing matches
#
# Valid values:
# - off
# - on
# - relaxed
match.ignore_case = relaxed

# Calculate column widths to display as many matches as possible
match.fit_columns = True
# Disable calculating column widths when the number of matches exceeds this
# value. If set to zero, no limit is imposed for calculating column widths.
match.limit_fitted_columns = 0

# Maximum number of rows to be used by clink-select-complete. If set to zero,
# the limit is the terminal height.
match.max_rows = 0
# Number of rows to use as a preview by clink-select-complete. If set to zero,
# all rows are shown unless there's too many matches, which will show a prompt.
match.preview_rows = 0

# Position of directories with matching names relative to files
#
# Valid values:
# - after
# - before
# - with
match.sort_dirs = with

# Perform a substring search if a prefix search finds no completions
match.substring = True

# Translate path separators to be consistent when performing completions
#
# Valid values:
# - off
# - system
# - slash
# - backslash
match.translate_slashes = system

# Match leading "?" and "*" wildcards, as well as a leading ".", when using any
# of the completion commands.
match.wild = True


# -------------------------------- Terminal -----------------------------------

# Adjust the cursor shape and visibility for certain events
terminal.adjust_cursor_style = True

# Indicates if the terminal draws emoji using coloured double width characters
#
# Valid values:
# - auto
# - emulate
# - native
terminal.color_emoji = auto

# Generate special key sequences for Ctrl+Tab, Ctrl+I, Ctrl+M, and Ctrl+[ to
# enables binding them separately from the Backspace, Tab, Enter, or Esc keys.
terminal.differentiate_keys = False

# Method for resolving ambiguous widths of East Asian characters
#
# Valid values:
# - auto
# - font
# - one
# - two
terminal.east_asian_ambiguous = auto

# Perform virtual terminal emulation and handle ANSI escape codes
#
# Valid values:
# - auto
# - emulate
# - native
terminal.emulation = auto

# Respond to mouse input instead of delegating to the terminal
#
# Valid values:
# - auto
# - off
# - on
terminal.mouse_input = auto
# Modifier keys to hold for Clink to respond to mouse input (space-separated)
#terminal.mouse_modifier =

# Send a literal escape character on pressing Esc
terminal.raw_esc = False

# Support the Windows Ctrl+Alt substitute for AltGr
terminal.use_altgr_substitute = False


# ------------------------------ Miscellaneous --------------------------------

# Log all terminal input and output
debug.log_terminal = False

# Enhanced DOSKEY macro expansion and word quoting
doskey.enhanced = True

# Include files with the Hidden attribute when generating file lists
files.hidden = True
# Include files with the System attribute when generating file lists
files.system = False

# Refresh the prompt asynchronously
prompt.async = True
# When to collapse previous prompts
#
# Valid values:
# - off
# - same_dir
# - always
prompt.transient = off

# Suppress stderr output from Readline
readline.hide_stderr = False
