Last active
February 3, 2024 23:31
-
-
Save sionta/076b60258d739f1fd50955d33fcf4195 to your computer and use it in GitHub Desktop.
My personal profile on Command Prompt (cmd.exe) shell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
:: Requires Clink v1.4+ https://github.com/chrisant996/clink | |
:: Optional: | |
:: oh-my-posh : https://github.com/jandedobbeleer/oh-my-posh | |
:: fuzzy-finder: https://github.com/junegunn/fzf | |
call :TEST_EXEC findstr && ( | |
findstr "$" "%~f0" >nul || ( | |
echo ERROR: The script has an LF line ending issue or a blank line at the end of the script is missing. | |
exit /b 1 | |
) | |
) | |
:PARSE | |
if "%~1"=="" ( | |
GOTO :BEGIN | |
) else if "%~1"=="/?" ( | |
GOTO :USAGE | |
) else if /i "%~1"=="/help" ( | |
GOTO :USAGE | |
) else if /i "%~1"=="/autorun" ( | |
set autorun_enable=1 | |
goto :AUTORUN | |
) else if /i "%~1"=="/unautorun" ( | |
set autorun_enable=0 | |
goto :AUTORUN | |
) else if /i "%~1"=="/CLINK_DIR" ( | |
if not exist "%~f2\clink*.exe" ( | |
echo %~n0: directory not found '%2'. | |
exit /b 1 | |
) else ( | |
set "CLINK_DIR=%~f2" | |
) | |
) else if /i "%~1"=="/wd" ( | |
if "%~2"=="~" ( | |
cd /d "%USERPROFILE%" | |
) else if not exist "%~f2\" ( | |
echo %~n0: directory not found '%2'. | |
exit /b 1 | |
) else ( | |
cd /d "%~f2\" | |
) | |
) else ( | |
echo %~n0: option '%1' is unknown. | |
echo try '%0 /?' | |
exit /b 1 | |
) | |
if "%~2"=="" ( | |
echo %~n0: option '%1' requires value. | |
exit /b 1 | |
) | |
shift /1 | |
shift /1 | |
GOTO :PARSE | |
:USAGE | |
echo.Usage: %~nx0 [options] ... | |
echo. | |
echo.Options: | |
echo. /?, /help Show this help message and exit. | |
echo. /clink_dir=^<path^> Specifies the installation directory for Clink. | |
echo. /wd=^<path^> Assigns the starting directory path. If '~' is used, | |
echo. the starting directory will be set to %%USERPROFILE%%. | |
echo. /autorun Enable auto-run in the Command Prompt. | |
echo. /unautorun Disable auto-run in the Command Prompt. | |
exit /b 0 | |
:AUTORUN | |
setlocal enabledelayedexpansion | |
set current_params=%* | |
set current_params=!current_params:\=\\! | |
set current_params=!current_params:"=\"! | |
set current_params=!current_params:/autorun=! | |
if %autorun_enable% equ 1 ( | |
<nul set /p x="Registering auto-run..." | |
>nul reg add "HKCU\SOFTWARE\Microsoft\Command Processor" /v "AutoRun" /t REG_SZ /d "\"%~f0\" !current_params!" /f | |
>nul reg add "HKCU\SOFTWARE\Wow6432Node\Microsoft\Command Processor" /v "AutoRun" /t REG_SZ /d "\"%~f0\" !current_params!" /f | |
) else ( | |
<nul set /p x="Unregistering auto-run..." | |
>nul reg add "HKCU\SOFTWARE\Microsoft\Command Processor" /v "AutoRun" /t REG_SZ /d "" /f | |
>nul reg add "HKCU\SOFTWARE\Wow6432Node\Microsoft\Command Processor" /v "AutoRun" /t REG_SZ /d "" /f | |
) | |
endlocal & ( | |
echo. successfully. | |
echo Please restart cmd.exe for take the effect. | |
exit /b %errorlevel% | |
) | |
@REM Avoid using the 'for' command directly in main scripts, | |
@REM instead, call it through a function. | |
:BEGIN | |
if defined CMDER_ROOT ( | |
echo ERROR: Do not run this script with CMDER, as it will cause conflicts in some files or variables. | |
exit /b 1 | |
) | |
set CLINK_PROFILE_DIR=%USERPROFILE%\.cmdfiles | |
if not exist "%CLINK_PROFILE_DIR%\" ( | |
echo Initializing... | |
mkdir "%CLINK_PROFILE_DIR%\" | |
) | |
@REM user profile | |
set CMD_PROFILE=%CLINK_PROFILE_DIR%\user_profile.cmd | |
if not exist "%CMD_PROFILE%" ( | |
echo.@ECHO OFF | |
echo.@REM This file runs custom startup commands before executing Clink. | |
echo.@REM Place your batch script below. | |
echo. | |
echo.:: Uncomment and specify a custom Clink directory | |
echo.@REM set CLINK_DIR= | |
echo. | |
echo.:: Set 0 to disable and set 1 to enable batch utilities. | |
echo.set BAT_UTILS=0 | |
echo. | |
)>"%CMD_PROFILE%" | |
call "%CMD_PROFILE%" | |
IF %ERRORLEVEL% NEQ 0 ( | |
echo ERROR: Process exited with code %errorlevel% | |
exit /b %errorlevel% | |
) | |
@REM batch utils | |
if defined BAT_UTILS if "%BAT_UTILS%"=="1" ( | |
if not exist "%CLINK_PROFILE_DIR%\utils\myutils" ( | |
call :TEST_EXEC git && ( | |
call :TEST_PING "https://github.com/sionta/batch.scripts.git" && ( | |
git clone "https://github.com/sionta/batch.scripts.git" "%CLINK_PROFILE_DIR%\utils" | |
) | |
) || ( | |
call :TEST_EXEC gh && ( | |
call :TEST_PING "https://github.com/sionta/batch.scripts.git" && ( | |
gh repo clone "sionta/batch.scripts" "%CLINK_PROFILE_DIR%\utils" | |
) | |
) | |
) | |
) | |
if exist "%CLINK_PROFILE_DIR%\utils\myutils\*" ( | |
call :TEST_EXEC findstr && ( | |
echo "%PATH%" | findstr /i "%CLINK_PROFILE_DIR:\=\\%\\utils\\myutils" >nul || ( | |
set "PATH=%CLINK_PROFILE_DIR%\utils\myutils;%PATH%" | |
) | |
) | |
) | |
) | |
@REM aliases | |
call :TEST_EXEC doskey && ( | |
set "CMD_ALIASES=%CLINK_PROFILE_DIR%\user_aliases.txt" | |
) || ( | |
set "CMD_ALIASES=" | |
) | |
if defined CMD_ALIASES ( | |
if not exist "%CMD_ALIASES%" ( | |
echo.== Starting with EQUALS ^(=^) will not be executed. | |
echo.== Uncomment or add your aliases below: | |
echo.e.=explorer . | |
echo.ls=dir $* | |
echo.cp=copy $* | |
echo.mv=move $* | |
echo.ni=echo/$G$1:0 | |
@echo. | |
)>"%CMD_ALIASES%" | |
doskey /macrofile="%CMD_ALIASES%" >nul | |
doskey alias=if "$1"=="" ^(doskey /macros^) else doskey $* | |
doskey unalias=if not "$1"=="" doskey $1 = | |
doskey realias=doskey /macrofile="%%CMD_ALIASES%%"$Gnul^&^&echo Alias reloaded. | |
) | |
@REM clink | |
if /i "%PROCESSOR_ARCHITECTURE%"=="x86" ( | |
set CLINK_ARCH=x86 | |
) else if /i "%PROCESSOR_ARCHITECTURE%"=="arm64" ( | |
set CLINK_ARCH=arm64 | |
) else if /i "%PROCESSOR_ARCHITECTURE%"=="amd64" ( | |
if defined PROCESSOR_ARCHITEW6432 ( | |
set CLINK_ARCH=x86 | |
) else ( | |
set CLINK_ARCH=x64 | |
) | |
) | |
if not defined CLINK_DIR ( | |
for %%I in ("clink_%CLINK_ARCH%.exe") do ( | |
if not "%%~$PATH:I"=="" ( | |
set "CLINK_DIR=%%~dp$PATH:I" | |
) else ( | |
echo ERROR: Need to install Clink: https://github.com/chrisant996/clink/releases/latest | |
echo and make sure the clink directory has been added to the path. | |
exit /b 1 | |
) | |
) | |
) | |
@REM validator path | |
set "CLINK_DIR=%CLINK_DIR:"=%" | |
set "CLINK_DIR=%CLINK_DIR:'=%" | |
if "%CLINK_DIR:~-1%"=="\" set "CLINK_DIR=%CLINK_DIR:~0,-1%" | |
if not exist "%CLINK_DIR%\clink_dll_%CLINK_ARCH%.dll" ( | |
echo ERROR: Missing Clink library file: '%CLINK_DIR%\clink_dll_%CLINK_ARCH%.dll'. | |
set "CLINK_DIR=" | |
exit /b 1 | |
) | |
@REM check version | |
"%CLINK_DIR%\clink_%CLINK_ARCH%.exe" --version > "%CLINK_PROFILE_DIR%\clink_version" | |
for /f "usebackq tokens=1-2 delims=." %%i in ("%CLINK_PROFILE_DIR%\clink_version") do ( | |
if %%i%%j leq 14 ( | |
echo ERROR: Requires Clink v1.4+ or later. | |
exit /b 1 | |
) | |
) | |
@REM HKCU\Console\%%_SystemRoot%%_system32_cmd.exe | |
call :TEST_EXEC reg && ( | |
if not exist "%LOCALAPPDATA%\Microsoft\HKCU_Console.reg" ( | |
>nul reg export "HKCU\Console" "%LOCALAPPDATA%\Microsoft\HKCU_Console.reg" /y | |
) | |
for %%i in ("ForceV2","ExtendedEditKey") do ( | |
>nul reg query "HKCU\Console" /v "%%~i" /f "0x1" /d /t REG_DWORD >nul || ( | |
>nul reg add "HKCU\Console" /v "%%~i" /t REG_DWORD /d "0x1" /f >nul | |
) | |
) | |
for %%i in ("%SystemRoot%\Fonts","%LOCALAPPDATA%\Microsoft\Windows\Fonts") do ( | |
if exist "%%~i\HackNerdFontMono-Regular.ttf" ( | |
>nul reg query "HKCU\Console" /v "FaceName" /f "Hack Nerd Font Mono" /d /t REG_SZ >nul || ( | |
>nul reg add "HKCU\Console" /v "FaceName" /t REG_SZ /d "Hack Nerd Font Mono" /f | |
) | |
) else if exist "%%~i\MesloLGSNerdFont-Regular.ttf" ( | |
>nul reg query "HKCU\Console" /v "FaceName" /f "MesloLGS Nerd Font Mono" /d /t REG_SZ >nul || ( | |
>nul reg add "HKCU\Console" /v "FaceName" /t REG_SZ /d "MesloLGS Nerd Font Mono" /f | |
) | |
) | |
) | |
) | |
@REM clink files | |
if not exist "%CLINK_PROFILE_DIR%\clink_inputrc" call :_INPUTRC_FILE > "%CLINK_PROFILE_DIR%\clink_inputrc" | |
if not exist "%CLINK_PROFILE_DIR%\clink_settings" call :_SETTINGS_FILE > "%CLINK_PROFILE_DIR%\clink_settings" | |
if not exist "%CLINK_PROFILE_DIR%\clink_settings.txt" call :_SETTINGS_INFO > "%CLINK_PROFILE_DIR%\clink_settings.txt" | |
if not exist "%CLINK_PROFILE_DIR%\user_profile.lua" ( | |
echo.-- This file runs custom startup commands after executing Clink. | |
echo.-- Place your Lua script below. | |
echo. | |
echo.if os.getenv^("CLINK_PROFILE_DIR"^) == true then | |
echo. CLINK_PROFILE_DIR = os.getenv^("CLINK_PROFILE_DIR"^) | |
echo.else | |
echo. CLINK_PROFILE_DIR = "%CLINK_PROFILE_DIR:\=\\%" | |
echo.end | |
echo. | |
)>"%CLINK_PROFILE_DIR%\user_profile.lua" | |
set CLINK_SCRIPTS_DIR=%CLINK_PROFILE_DIR%\scripts | |
if not exist "%CLINK_SCRIPTS_DIR%\" mkdir "%CLINK_SCRIPTS_DIR%" | |
@rem clink-completions: https://github.com/vladimir-kotikov/clink-completions | |
if not exist "%CLINK_SCRIPTS_DIR%\*.lua" ( | |
call :TEST_EXEC git && ( | |
call :TEST_PING && ( | |
if exist "%CLINK_SCRIPTS_DIR%\" move /y "%CLINK_SCRIPTS_DIR%\" "%CLINK_SCRIPTS_DIR%.bak\" | |
git clone "https://github.com/vladimir-kotikov/clink-completions.git" "%CLINK_SCRIPTS_DIR%" | |
if not exist "%CLINK_SCRIPTS_DIR%\" ( | |
if exist "%CLINK_SCRIPTS_DIR%.bak\" ( | |
move /y "%CLINK_SCRIPTS_DIR%.bak\" "%CLINK_SCRIPTS_DIR%\" | |
) else ( | |
mkdir "%CLINK_SCRIPTS_DIR%\" | |
) | |
) | |
) | |
) || ( | |
call :TEST_EXEC curl && call :TEST_EXEC tar && ( | |
call :TEST_PING && ( | |
curl -Lo "%CLINK_SCRIPTS_DIR%.tar.gz" "https://api.github.com/repos/vladimir-kotikov/clink-completions/tarball" | |
tar -xzf "%CLINK_SCRIPTS_DIR%.tar.gz" -C "%CLINK_PROFILE_DIR%" | |
for /f "tokens=*" %%g in ('dir /b /s /a:d "%CLINK_PROFILE_DIR%\vladimir-kotikov-clink-completions-*" 2^>nul') do ( | |
if not "%%~g"=="" move /y "%%~g" "%CLINK_SCRIPTS_DIR%" | |
) | |
) | |
) | |
) | |
) | |
@rem fuzzy-finder: https://github.com/junegunn/fzf | |
call :TEST_EXEC fzf && ( | |
if not exist "%CLINK_SCRIPTS_DIR%\fzf.lua" ( | |
if exist "%CLINK_SCRIPTS_DIR%\fzf.tmp" ( | |
move /y "%CLINK_SCRIPTS_DIR%\fzf.tmp" "%CLINK_SCRIPTS_DIR%\fzf.lua" | |
) else ( | |
call :TEST_EXEC curl && ( | |
call :TEST_PING && ( | |
curl -fLo "%CLINK_SCRIPTS_DIR%\fzf.lua" --create-dirs "https://raw.githubusercontent.com/chrisant996/clink-fzf/main/fzf.lua" | |
) | |
) | |
) | |
) | |
if exist "%CLINK_SCRIPTS_DIR%\fzf.lua" ( | |
call :TEST_EXEC findstr && ( | |
type "%CLINK_PROFILE_DIR%\clink_inputrc" | findstr /i "luafunc\:fzf_.*" >nul || ( | |
echo. | |
echo.# For more see: https://github.com/chrisant996/clink-fzf | |
echo.# Default key bindings for fzf with Clink. | |
echo."\C-t": "luafunc:fzf_file" # Ctrl+T lists files recursively; choose one or multiple to insert them. | |
echo."\C-r": "luafunc:fzf_history" # Ctrl+R lists history entries; choose one to insert it. | |
echo."\M-c": "luafunc:fzf_directory" # Alt+C lists subdirectories; choose one to 'cd /d' to it. | |
echo."\M-b": "luafunc:fzf_bindings" # Alt+B lists key bindings; choose one to invoke it. | |
echo."\t": "luafunc:fzf_complete" # Tab uses fzf to filter match completions. | |
echo."\e[27;5;32~": "luafunc:fzf_complete" # Ctrl+Space uses fzf to filter match completions. | |
echo. | |
)>>"%CLINK_PROFILE_DIR%\clink_inputrc" | |
) | |
) | |
call set "FZF_DEFAULT_OPTS=--height=40%%%%%% --reverse --info=inline --border --margin=1 --padding=1 --layout=reverse" | |
call set "FZF_DEFAULT_OPTS=%%FZF_DEFAULT_OPTS%% --color=bg+:#3c3836,bg:#32302f,spinner:#fb4934,hl:#928374,fg:#ebdbb2,header:#928374" | |
call set "FZF_DEFAULT_OPTS=%%FZF_DEFAULT_OPTS%%,info:#8ec07c,pointer:#fb4934,marker:#fb4934,fg+:#ebdbb2,prompt:#fb4934,hl+:#fb4934" | |
) || ( | |
if exist "%CLINK_SCRIPTS_DIR%\fzf.lua" ( | |
move /y "%CLINK_SCRIPTS_DIR%\fzf.lua" "%CLINK_SCRIPTS_DIR%\fzf.tmp" | |
call :TEST_EXEC findstr && ( | |
type "%CLINK_PROFILE_DIR%\clink_inputrc" | findstr /vi "luafunc\:fzf_.*" >"%CLINK_PROFILE_DIR%\clink_inputrc" | |
) | |
) | |
) | |
@rem oh-my-posh: https://github.com/jandedobbeleer/oh-my-posh | |
call :TEST_EXEC oh-my-posh.exe && ( | |
if not defined POSH_THEME set "POSH_THEME=%CLINK_PROFILE_DIR%\prompt.omp.json" | |
if not exist "%CLINK_PROFILE_DIR%\prompt.omp.json" call :_OHMYPOSH_FILE >"%CLINK_PROFILE_DIR%\prompt.omp.json" | |
if not exist "%CLINK_SCRIPTS_DIR%\oh-my-posh.lua" ( | |
if exist "%CLINK_SCRIPTS_DIR%\oh-my-posh.tmp" ( | |
move /y "%CLINK_SCRIPTS_DIR%\oh-my-posh.tmp" "%CLINK_SCRIPTS_DIR%\oh-my-posh.lua" | |
) else ( | |
echo load^(io.popen^('oh-my-posh init cmd'^):read^("*a"^)^)^(^) >"%CLINK_SCRIPTS_DIR%\oh-my-posh.lua" | |
) | |
) | |
) || ( | |
if exist "%CLINK_SCRIPTS_DIR%\oh-my-posh.lua" ( | |
move /y "%CLINK_SCRIPTS_DIR%\oh-my-posh.lua" "%CLINK_SCRIPTS_DIR%\oh-my-posh.tmp" | |
) | |
call :_FLEXPROMPT_FILE "%CLINK_SCRIPTS_DIR%" | |
if exist "%CLINK_SCRIPTS_DIR%\flexprompt*.lua" ( | |
call :TEST_EXEC findstr && ( | |
type "%CLINK_PROFILE_DIR%\user_profile.lua" | findstr /i "^flexprompt" >nul || ( | |
echo. | |
@echo.flexprompt = flexprompt or {} | |
@echo.flexprompt.settings = flexprompt.settings or {} | |
@echo.flexprompt.settings.charset = "unicode" | |
@echo.flexprompt.settings.flow = "concise" | |
@echo.flexprompt.settings.heads = "pointed" | |
@echo.flexprompt.settings.left_frame = "round" | |
@echo.flexprompt.settings.left_prompt = "{battery}{break}{histlabel}{cwd}{break}{git}" | |
@echo.flexprompt.settings.lines = "one" | |
@echo.flexprompt.settings.powerline_font = true | |
@echo.flexprompt.settings.right_frame = "round" | |
@echo.flexprompt.settings.right_prompt = "{overtype}{exit}{duration}{break}" | |
@echo.flexprompt.settings.separators = "pointed" | |
@echo.flexprompt.settings.spacing = "normal" | |
@echo.flexprompt.settings.style = "rainbow" | |
@echo.flexprompt.settings.symbols = { prompt = { ">", winterminal = "❯", }, } | |
@echo.flexprompt.settings.tails = "flat" | |
@echo.flexprompt.settings.use_8bit_color = true | |
@echo. | |
)>>"%CLINK_PROFILE_DIR%\user_profile.lua" | |
) | |
) else ( | |
call :TEST_EXEC findstr && ( | |
type "%CLINK_PROFILE_DIR%\user_profile.lua" | findstr /vi "^flexprompt" > "%CLINK_PROFILE_DIR%\user_profile.lua" | |
) | |
) | |
) | |
@REM Once upon a time... | |
"%CLINK_DIR%\clink_%CLINK_ARCH%.exe" inject --profile "%CLINK_PROFILE_DIR%" --scripts "%CLINK_SCRIPTS_DIR%" --quiet | |
EXIT /B %ERRORLEVEL% | |
@REM FUNCTION LIST =========================================== | |
:TEST_EXEC | |
IF "%~x1"=="" ( | |
FOR %%e IN (%PATHEXT%) DO ( | |
FOR %%I IN ("%~n1%%~e") DO ( | |
IF NOT "%%~$PATH:I"=="" EXIT /B 0 | |
) | |
) | |
) ELSE ( | |
FOR %%I IN ("%~nx1") DO ( | |
IF NOT "%%~$PATH:I"=="" EXIT /B 0 | |
) | |
) | |
EXIT /B 1 | |
:TEST_PING | |
SETLOCAL | |
IF "%~1"=="" ( | |
SET "_URL=www.google.com" | |
) ELSE ( | |
SET "_URL=%~1" | |
) | |
CALL :TEST_EXEC ping && ( | |
ping -n 1 8.8.8.8 >nul || ( | |
ping -n 1 -a %_URL% >nul | |
) | |
) || ( | |
CALL :TEST_EXEC curl && ( | |
curl -s --head %_URL% >nul | |
) || ( | |
CALL :TEST_EXEC wget && ( | |
wget --quiet --spider %_URL% >nul | |
) | |
) | |
) | |
ENDLOCAL & ( | |
EXIT /B %ERRORLEVEL% | |
) | |
:downloadFile | |
call :TEST_EXEC curl && ( | |
curl -s --head "%~1" >nul && ( | |
curl -o "%~2" -L "%~1" | |
) | |
) | |
exit /b %errorlevel% | |
:_FLEXPROMPT_FILE | |
for %%i in ("flexprompt.lua", "flexprompt_wizard.lua", "flexprompt_modules.lua") do ( | |
if not exist "%~f1\%%~i" call :TEST_EXEC curl && ( | |
call :TEST_PING && curl -JLso "%~f1\%%~i" "https://raw.githubusercontent.com/chrisant996/clink-flex-prompt/master/%%~i" | |
) | |
) | |
exit /b 0 | |
:_OHMYPOSH_FILE | |
@echo.{ | |
@echo. "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
@echo. "palette": { | |
@echo. "light-black": "#504945", | |
@echo. "light-blue": "#83A598", | |
@echo. "light-cyan": "#8EC07C", | |
@echo. "light-green": "#B8BB26", | |
@echo. "light-magenta": "#D3869B", | |
@echo. "light-orange": "#FE8019", | |
@echo. "light-red": "#FB4934", | |
@echo. "light-white": "#EBDBB2", | |
@echo. "light-yellow": "#FABD2F", | |
@echo. "dark-black": "#282828", | |
@echo. "dark-blue": "#458588", | |
@echo. "dark-cyan": "#689D6A", | |
@echo. "dark-green": "#98971A", | |
@echo. "dark-magenta": "#B16286", | |
@echo. "dark-orange": "#D65D0E", | |
@echo. "dark-red": "#CC241D", | |
@echo. "dark-white": "#A89984", | |
@echo. "dark-yellow": "#D79921" | |
@echo. "git": "p:light-orange", | |
@echo. "git-ahead": "p:light-magenta", | |
@echo. "git-behind": "p:light-cyan", | |
@echo. "git-diverged": "p:light-orange", | |
@echo. "git-foreground": "p:light-green", | |
@echo. "git-modified": "p:light-red", | |
@echo. }, | |
@echo. "blocks": [ | |
@echo. { | |
@echo. "alignment": "left", | |
@echo. "segments": [ | |
@echo. { | |
@echo. "foreground_templates": [ | |
@echo. "{{ if .Root }}p:dark-red{{ end }}", | |
@echo. "{{ if .UserName }}p:light-green{{ end }}" | |
@echo. ], | |
@echo. "properties": { | |
@echo. "display_host": false | |
@echo. }, | |
@echo. "style": "plain", | |
@echo. "template": "{{ if .Root }}root#{{ else }}{{ .UserName }}@{{ end }}{{ .HostName }} ", | |
@echo. "type": "session" | |
@echo. }, | |
@echo. { | |
@echo. "foreground": "p:dark-white", | |
@echo. "properties": { | |
@echo. "folder_separator_icon": "/", | |
@echo. "style": "full" | |
@echo. }, | |
@echo. "style": "plain", | |
@echo. "template": "{{ .Path }}", | |
@echo. "type": "path" | |
@echo. }, | |
@echo. { | |
@echo. "foreground": "p:git-foreground", | |
@echo. "foreground_templates": [ | |
@echo. "{{ if or (.Working.Changed) (.Staging.Changed) }}p:git-modified{{ end }}", | |
@echo. "{{ if and (gt .Ahead 0) (gt .Behind 0) }}p:git-diverged{{ end }}", | |
@echo. "{{ if gt .Ahead 0 }}p:git-ahead{{ end }}", | |
@echo. "{{ if gt .Behind 0 }}p:git-behind{{ end }}" | |
@echo. ], | |
@echo. "properties": { | |
@echo. "fetch_stash_count": true, | |
@echo. "fetch_status": true, | |
@echo. "fetch_upstream_icon": true | |
@echo. }, | |
@echo. "style": "plain", | |
@echo. "template": "<p:light-white> on </>{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }}", | |
@echo. "type": "git" | |
@echo. } | |
@echo. ], | |
@echo. "type": "prompt" | |
@echo. }, | |
@echo. { | |
@echo. "alignment": "right", | |
@echo. "segments": [ | |
@echo. { | |
@echo. "foreground": "p:dark-white", | |
@echo. "properties": { | |
@echo. "always_enabled": true, | |
@echo. "style": "round" | |
@echo. }, | |
@echo. "style": "plain", | |
@echo. "template": "{{ .FormattedMs }}", | |
@echo. "type": "executiontime" | |
@echo. }, | |
@echo. { | |
@echo. "foreground_templates": [ | |
@echo. "{{ if gt .Code 0 }}p:dark-red{{ end }}", | |
@echo. "{{ if gt .Code 1 }}p:dark-green{{ end }}" | |
@echo. ], | |
@echo. "properties": { | |
@echo. "always_enabled": true | |
@echo. }, | |
@echo. "style": "powerline", | |
@echo. "template": "{{ if gt .Code 0 }} \u2a2f {{else}} \u2713 {{ end }}", | |
@echo. "type": "status" | |
@echo. } | |
@echo. ], | |
@echo. "type": "prompt" | |
@echo. }, | |
@echo. { | |
@echo. "alignment": "left", | |
@echo. "newline": true, | |
@echo. "segments": [ | |
@echo. { | |
@echo. "style": "plain", | |
@echo. "template": "{{ if .Root }}<p:dark-red>#</>{{ else }}<p:dark-blue>\u276f</>{{ end }}", | |
@echo. "type": "text" | |
@echo. } | |
@echo. ], | |
@echo. "type": "prompt" | |
@echo. } | |
@echo. ], | |
@echo. "final_space": true, | |
@echo. "version": 2 | |
@echo.} | |
@goto:eof | |
:_INPUTRC_FILE | |
@echo.# For more information see: https://chrisant996.github.io/clink/clink.html | |
@echo.# or see: file:///%CLINK_DIR:\=/%/clink.html | |
@echo. | |
@echo.# https://chrisant996.github.io/clink/clink.html#readline-configuration-variables | |
@echo.$if clink | |
@echo. | |
@echo.set colored-completion-prefix on # Color the typed completion prefix. | |
@echo.set colored-stats on # Turn on completion colors. | |
@echo.set search-ignore-case on # Case insensitive history searches. | |
@echo.set mark-symlinked-directories on | |
@echo.set completion-auto-query-items on # Prompt before showing completions if they'll exceed half the screen. | |
@echo.set history-point-at-end-of-anchored-search on | |
@echo. | |
@echo.$endif | |
@echo. | |
@echo.# Add your keybindings below... | |
@echo. | |
@goto:eof | |
:_SETTINGS_FILE | |
@echo.# name: Enable asynchronous suggestions | |
@echo.# type: boolean | |
@echo.autosuggest.async = True | |
@echo. | |
@echo.# name: Enable automatic suggestions | |
@echo.# type: boolean | |
@echo.autosuggest.enable = True | |
@echo. | |
@echo.# name: Accept original capitalization | |
@echo.# type: boolean | |
@echo.autosuggest.original_case = True | |
@echo. | |
@echo.# name: Controls how suggestions are chosen | |
@echo.# type: string | |
@echo.autosuggest.strategy = match_prev_cmd history completion | |
@echo. | |
@echo.# name: Auto-update the Clink program files | |
@echo.# type: boolean | |
@echo.clink.autoupdate = True | |
@echo. | |
@echo.# name: Colorize the input text | |
@echo.# type: boolean | |
@echo.clink.colorize_input = True | |
@echo. | |
@echo.# name: Selects default key bindings | |
@echo.# type: enum | |
@echo.# options: bash,windows | |
@echo.clink.default_bindings = windows | |
@echo. | |
@echo.# name: Controls what startup logo to show | |
@echo.# type: enum | |
@echo.# options: none,full,short | |
@echo.clink.logo = short | |
@echo. | |
@echo.# name: Maximum rows for the input line | |
@echo.# type: integer | |
@echo.clink.max_input_rows = 0 | |
@echo. | |
@echo.# name: Strips CR and LF chars on paste | |
@echo.# type: enum | |
@echo.# options: delete,space,ampersand,crlf | |
@echo.clink.paste_crlf = crlf | |
@echo. | |
@echo.# name: Paths to load Lua scripts from | |
@echo.# type: string | |
@echo.clink.path = | |
@echo. | |
@echo.# name: Enable prompt filtering by Lua scripts | |
@echo.# type: boolean | |
@echo.clink.promptfilter = True | |
@echo. | |
@echo.# name: Days between update checks | |
@echo.# type: integer | |
@echo.clink.update_interval = 5 | |
@echo. | |
@echo.# name: Pressing Alt-F4 exits session | |
@echo.# type: boolean | |
@echo.cmd.altf4_exits = True | |
@echo. | |
@echo.# name: Auto-answer terminate prompt | |
@echo.# type: enum | |
@echo.# options: off,answer_yes,answer_no | |
@echo.cmd.auto_answer = off | |
@echo. | |
@echo.# name: Pressing Ctrl-D exits session | |
@echo.# type: boolean | |
@echo.cmd.ctrld_exits = False | |
@echo. | |
@echo.# name: Retrieve last exit code | |
@echo.# type: boolean | |
@echo.cmd.get_errorlevel = True | |
@echo. | |
@echo.# name: Argument color | |
@echo.# type: color | |
@echo.color.arg = bold | |
@echo. | |
@echo.# name: Argument info color | |
@echo.# type: color | |
@echo.color.arginfo = sgr 38;5;172 | |
@echo. | |
@echo.# name: Shell command completions | |
@echo.# type: color | |
@echo.color.cmd = sgr 1;38;5;231 | |
@echo. | |
@echo.# name: Color for ^< and ^> redirection symbols | |
@echo.# type: color | |
@echo.color.cmdredir = sgr 38;5;172 | |
@echo. | |
@echo.# name: Color for ^& and ^| command separators | |
@echo.# type: color | |
@echo.color.cmdsep = sgr 38;5;214 | |
@echo. | |
@echo.# name: Color for comment row | |
@echo.# type: color | |
@echo.color.comment_row = sgr 38;5;87;48;5;18 | |
@echo. | |
@echo.# name: Description completion color | |
@echo.# type: color | |
@echo.color.description = sgr 38;5;39 | |
@echo. | |
@echo.# name: Doskey completions | |
@echo.# type: color | |
@echo.color.doskey = sgr 1;38;5;75 | |
@echo. | |
@echo.# name: Color for executable command word | |
@echo.# type: color | |
@echo.color.executable = sgr 1;38;5;33 | |
@echo. | |
@echo.# name: Filtered completion color | |
@echo.# type: color | |
@echo.color.filtered = sgr 38;5;231 | |
@echo. | |
@echo.# name: Flag color | |
@echo.# type: color | |
@echo.color.flag = sgr 38;5;117 | |
@echo. | |
@echo.# name: Hidden file completions | |
@echo.# type: color | |
@echo.color.hidden = sgr 38;5;160 | |
@echo. | |
@echo.# name: History expansion color | |
@echo.# type: color | |
@echo.color.histexpand = sgr 97;48;5;55 | |
@echo. | |
@echo.# name: Horizontal scroll marker color | |
@echo.# type: color | |
@echo.color.horizscroll = sgr 38;5;16;48;5;30 | |
@echo. | |
@echo.# name: Input text color | |
@echo.# type: color | |
@echo.color.input = sgr 38;5;222 | |
@echo. | |
@echo.# name: For user-interaction prompts | |
@echo.# type: color | |
@echo.color.interact = bold | |
@echo. | |
@echo.# name: Message area color | |
@echo.# type: color | |
@echo.color.message = default | |
@echo. | |
@echo.# name: Modified history line mark color | |
@echo.# type: color | |
@echo.color.modmark = | |
@echo. | |
@echo.# name: Color for popup lists and messages | |
@echo.# type: color | |
@echo.color.popup = | |
@echo. | |
@echo.# name: Color for popup description column^(s^) | |
@echo.# type: color | |
@echo.color.popup_desc = | |
@echo. | |
@echo.# name: Prompt color | |
@echo.# type: color | |
@echo.color.prompt = | |
@echo. | |
@echo.# name: Readonly file completions | |
@echo.# type: color | |
@echo.color.readonly = sgr 38;5;28 | |
@echo. | |
@echo.# name: Selected completion color | |
@echo.# type: color | |
@echo.color.selected_completion = sgr 38;5;16;48;5;254 | |
@echo. | |
@echo.# name: Selection color | |
@echo.# type: color | |
@echo.color.selection = sgr 38;5;16;48;5;179 | |
@echo. | |
@echo.# name: Color for suggestion text | |
@echo.# type: color | |
@echo.color.suggestion = sgr 38;5;239 | |
@echo. | |
@echo.# name: Unexpected argument color | |
@echo.# type: color | |
@echo.color.unexpected = default | |
@echo. | |
@echo.# name: Color for unrecognized command word | |
@echo.# type: color | |
@echo.color.unrecognized = sgr 38;5;203 | |
@echo. | |
@echo.# name: Log Readline terminal input and output | |
@echo.# type: boolean | |
@echo.debug.log_terminal = False | |
@echo. | |
@echo.# name: Controls duplicates in directory history | |
@echo.# type: enum | |
@echo.# options: add,erase_prev | |
@echo.directories.dupe_mode = add | |
@echo. | |
@echo.# name: Add enhancements to Doskey | |
@echo.# type: boolean | |
@echo.doskey.enhanced = True | |
@echo. | |
@echo.# name: Include aliases | |
@echo.# type: boolean | |
@echo.exec.aliases = True | |
@echo. | |
@echo.# name: Include CMD commands | |
@echo.# type: boolean | |
@echo.exec.commands = True | |
@echo. | |
@echo.# name: Match executables in current directory | |
@echo.# type: boolean | |
@echo.exec.cwd = True | |
@echo. | |
@echo.# name: Include directories | |
@echo.# type: boolean | |
@echo.exec.dirs = True | |
@echo. | |
@echo.# name: Enable executable matching for 'complete' | |
@echo.# type: boolean | |
@echo.exec.enable = True | |
@echo. | |
@echo.# name: Include files | |
@echo.# type: boolean | |
@echo.exec.files = False | |
@echo. | |
@echo.# name: Match executables in PATH | |
@echo.# type: boolean | |
@echo.exec.path = True | |
@echo. | |
@echo.# name: Whitespace prefix matches files | |
@echo.# type: boolean | |
@echo.exec.space_prefix = True | |
@echo. | |
@echo.# name: Include hidden files | |
@echo.# type: boolean | |
@echo.files.hidden = True | |
@echo. | |
@echo.# name: Include system files | |
@echo.# type: boolean | |
@echo.files.system = False | |
@echo. | |
@echo.# name: Perform history expansion automatically | |
@echo.# type: boolean | |
@echo.history.auto_expand = True | |
@echo. | |
@echo.# name: Commands not automatically added to the history | |
@echo.# type: string | |
@echo.history.dont_add_to_history_cmds = exit history | |
@echo. | |
@echo.# name: Controls how duplicate entries are handled | |
@echo.# type: enum | |
@echo.# options: add,ignore,erase_prev | |
@echo.history.dupe_mode = erase_prev | |
@echo. | |
@echo.# name: Sets how command history expansion is applied | |
@echo.# type: enum | |
@echo.# options: off,on,not_squoted,not_dquoted,not_quoted | |
@echo.history.expand_mode = not_quoted | |
@echo. | |
@echo.# name: Skip adding lines prefixed with whitespace | |
@echo.# type: boolean | |
@echo.history.ignore_space = True | |
@echo. | |
@echo.# name: The number of history lines to save | |
@echo.# type: integer | |
@echo.history.max_lines = 25000 | |
@echo. | |
@echo.# name: Save history between sessions | |
@echo.# type: boolean | |
@echo.history.save = True | |
@echo. | |
@echo.# name: Share history between instances | |
@echo.# type: boolean | |
@echo.history.shared = False | |
@echo. | |
@echo.# name: Show preview of history expansion at cursor | |
@echo.# type: boolean | |
@echo.history.show_preview = True | |
@echo. | |
@echo.# name: Makes it easy to replay a series of commands | |
@echo.# type: boolean | |
@echo.history.sticky_search = False | |
@echo. | |
@echo.# name: Format for showing history times | |
@echo.# type: string | |
@echo.history.time_format = %%F %%T | |
@echo. | |
@echo.# name: History item timestamps | |
@echo.# type: enum | |
@echo.# options: off,save,show | |
@echo.history.time_stamp = show | |
@echo. | |
@echo.# name: Breaks into Lua debugger on Lua errors | |
@echo.# type: boolean | |
@echo.lua.break_on_error = False | |
@echo. | |
@echo.# name: Breaks into Lua debugger on traceback | |
@echo.# type: boolean | |
@echo.lua.break_on_traceback = False | |
@echo. | |
@echo.# name: Enables Lua debugging | |
@echo.# type: boolean | |
@echo.lua.debug = False | |
@echo. | |
@echo.# name: 'require' search path | |
@echo.# type: string | |
@echo.lua.path = | |
@echo. | |
@echo.# name: Reload scripts on every prompt | |
@echo.# type: boolean | |
@echo.lua.reload_scripts = False | |
@echo. | |
@echo.# name: Fail on argument errors | |
@echo.# type: boolean | |
@echo.lua.strict = True | |
@echo. | |
@echo.# name: Prints stack trace on Lua errors | |
@echo.# type: boolean | |
@echo.lua.traceback_on_error = False | |
@echo. | |
@echo.# name: Expand abbreviated paths when completing | |
@echo.# type: boolean | |
@echo.match.expand_abbrev = True | |
@echo. | |
@echo.# name: Expand envvars when completing | |
@echo.# type: boolean | |
@echo.match.expand_envvars = True | |
@echo. | |
@echo.# name: Fits match columns to screen width | |
@echo.# type: boolean | |
@echo.match.fit_columns = True | |
@echo. | |
@echo.# name: Accent insensitive matching | |
@echo.# type: boolean | |
@echo.match.ignore_accent = True | |
@echo. | |
@echo.# name: Case insensitive matching | |
@echo.# type: enum | |
@echo.# options: off,on,relaxed | |
@echo.match.ignore_case = relaxed | |
@echo. | |
@echo.# name: Limits fitted columns by number of matches | |
@echo.# type: integer | |
@echo.match.max_fitted_matches = 0 | |
@echo. | |
@echo.# name: Max rows in clink-select-complete | |
@echo.# type: integer | |
@echo.match.max_rows = 0 | |
@echo. | |
@echo.# name: Preview rows | |
@echo.# type: integer | |
@echo.match.preview_rows = 5 | |
@echo. | |
@echo.# name: Where to sort matching directories | |
@echo.# type: enum | |
@echo.# options: before,with,after | |
@echo.match.sort_dirs = with | |
@echo. | |
@echo.# name: Try substring if no prefix matches | |
@echo.# type: boolean | |
@echo.match.substring = True | |
@echo. | |
@echo.# name: Translate slashes and backslashes | |
@echo.# type: enum | |
@echo.# options: off,system,slash,backslash | |
@echo.match.translate_slashes = system | |
@echo. | |
@echo.# name: Match ? and * wildcards when completing | |
@echo.# type: boolean | |
@echo.match.wild = True | |
@echo. | |
@echo.# name: Enables asynchronous prompt refresh | |
@echo.# type: boolean | |
@echo.prompt.async = True | |
@echo. | |
@echo.# name: Controls when past prompts are collapsed | |
@echo.# type: enum | |
@echo.# options: off,always,same_dir | |
@echo.prompt.transient = off | |
@echo. | |
@echo.# name: Suppress stderr from the Readline library | |
@echo.# type: boolean | |
@echo.readline.hide_stderr = False | |
@echo. | |
@echo.# name: Adjusts the cursor visibility and shape | |
@echo.# type: boolean | |
@echo.terminal.adjust_cursor_style = True | |
@echo. | |
@echo.# name: Color emoji support in terminal | |
@echo.# type: enum | |
@echo.# options: off,on,auto | |
@echo.terminal.color_emoji = auto | |
@echo. | |
@echo.# name: Use special sequences for Ctrl-H, -I, -M, -^[ | |
@echo.# type: boolean | |
@echo.terminal.differentiate_keys = False | |
@echo. | |
@echo.# name: East Asian Ambiguous character widths | |
@echo.# type: enum | |
@echo.# options: font,one,two,auto | |
@echo.terminal.east_asian_ambiguous = auto | |
@echo. | |
@echo.# name: Controls VT emulation | |
@echo.# type: enum | |
@echo.# options: native,emulate,auto | |
@echo.terminal.emulation = auto | |
@echo. | |
@echo.# name: Clink mouse input | |
@echo.# type: enum | |
@echo.# options: off,on,auto | |
@echo.terminal.mouse_input = auto | |
@echo. | |
@echo.# name: Modifier keys for mouse input | |
@echo.# type: string | |
@echo.terminal.mouse_modifier = | |
@echo. | |
@echo.# name: Esc sends a literal escape character | |
@echo.# type: boolean | |
@echo.terminal.raw_esc = False | |
@echo. | |
@echo.# name: Support Windows' Ctrl-Alt substitute for AltGr | |
@echo.# type: boolean | |
@echo.terminal.use_altgr_substitute = False | |
@goto:eof | |
:_SETTINGS_INFO | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: autosuggest.async | |
@echo. Description: Enable asynchronous suggestions | |
@echo. Value: True | |
@echo. | |
@echo.The default is 'true'. When this is 'true' matches are generated | |
@echo.asynchronously for suggestions. This helps to keep typing responsive. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: autosuggest.enable | |
@echo. Description: Enable automatic suggestions | |
@echo. Value: False | |
@echo. | |
@echo.The default is 'false'. When this is 'true' a suggested command may appear | |
@echo.in the 'color.suggestion' color after the cursor. If the suggestion isn't | |
@echo.what you want, just ignore it. Or accept the whole suggestion with the Right | |
@echo.arrow or End key, accept the next word of the suggestion with Ctrl+Right, or | |
@echo.accept the next full word of the suggestion up to a space with Shift+Right. | |
@echo.The 'autosuggest.strategy' setting determines how a suggestion is chosen. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: autosuggest.original_case | |
@echo. Description: Accept original capitalization | |
@echo. Value: True | |
@echo. | |
@echo.When this is enabled ^(the default^), accepting a suggestion uses the | |
@echo.original capitalization from the suggestion. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: autosuggest.strategy | |
@echo. Description: Controls how suggestions are chosen | |
@echo. Value: match_prev_cmd history completion | |
@echo. | |
@echo.This determines how suggestions are chosen. The suggestion generators are | |
@echo.tried in the order listed, until one provides a suggestion. There are three | |
@echo.built-in suggestion generators, and scripts can provide new ones. | |
@echo.'history' chooses the most recent matching command from the history. | |
@echo.'completion' chooses the first of the matching completions. | |
@echo.'match_prev_cmd' chooses the most recent matching command whose preceding | |
@echo.history entry matches the most recently invoked command, but only when | |
@echo.the 'history.dupe_mode' setting is 'add'. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: clink.autostart | |
@echo. Description: Command to run when injected | |
@echo. Value: | |
@echo. | |
@echo.This command is automatically run when the first CMD prompt is shown after | |
@echo.Clink is injected. If this is blank ^(the default^), then Clink instead looks | |
@echo.for clink_start.cmd in the binaries directory and profile directory and runs | |
@echo.them. Set it to "nul" to not run any autostart command. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: clink.autoupdate | |
@echo. Description: Auto-update the Clink program files | |
@echo. Value: True | |
@echo. | |
@echo.When enabled, periodically checks for updates for the Clink program files. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: clink.colorize_input | |
@echo. Description: Colorize the input text | |
@echo. Value: True | |
@echo. | |
@echo.When enabled, this colors the words in the input line based on the argmatcher | |
@echo.Lua scripts. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: clink.default_bindings | |
@echo. Description: Selects default key bindings | |
@echo. Options: bash,windows | |
@echo. Value: bash | |
@echo. | |
@echo.Clink uses bash key bindings when this is set to 'bash' ^(the default^). | |
@echo.When this is set to 'windows' Clink overrides some of the bash defaults with | |
@echo.familiar Windows key bindings for Tab, Ctrl+F, Ctrl+M, and some others. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: clink.logo | |
@echo. Description: Controls what startup logo to show | |
@echo. Options: none,full,short | |
@echo. Value: full | |
@echo. | |
@echo.The default is 'full' which shows the full copyright logo when Clink is | |
@echo.injected. A value of 'short' shows an abbreviated startup logo with version | |
@echo.information. A value of 'none' omits the startup logo entirely. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: clink.max_input_rows | |
@echo. Description: Maximum rows for the input line | |
@echo. Value: 0 | |
@echo. | |
@echo.This limits how many rows the input line can use, up to the terminal height. | |
@echo.When this is 0, the terminal height is the limit. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: clink.paste_crlf | |
@echo. Description: Strips CR and LF chars on paste | |
@echo. Options: delete,space,ampersand,crlf | |
@echo. Value: crlf | |
@echo. | |
@echo.Setting this to 'space' makes Clink strip CR and LF characters from text | |
@echo.pasted into the current line. Set this to 'delete' to strip all newline | |
@echo.characters to replace them with a space. Set this to 'ampersand' to replace | |
@echo.all newline characters with an ampersand. Or set this to 'crlf' to paste all | |
@echo.newline characters as-is ^(executing commands that end with newline^). | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: clink.path | |
@echo. Description: Paths to load Lua scripts from | |
@echo. Value: | |
@echo. | |
@echo.These paths will be searched for Lua scripts that provide custom | |
@echo.match generation, prompt filtering, and etc. Multiple paths should be | |
@echo.delimited by semicolons. Setting this loads scripts from here INSTEAD of | |
@echo.from the Clink binaries directory and profile directory. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: clink.promptfilter | |
@echo. Description: Enable prompt filtering by Lua scripts | |
@echo. Value: True | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: clink.update_interval | |
@echo. Description: Days between update checks | |
@echo. Value: 5 | |
@echo. | |
@echo.The Clink autoupdater will wait this many days between update checks. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: cmd.admin_title_prefix | |
@echo. Description: Replaces the console title prefix when elevated | |
@echo. Value: | |
@echo. | |
@echo.This replaces the console title prefix when cmd.exe is elevated. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: cmd.altf4_exits | |
@echo. Description: Pressing Alt-F4 exits session | |
@echo. Value: True | |
@echo. | |
@echo.When enabled ^(the default^), pressing Alt-F4 exits cmd.exe. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: cmd.auto_answer | |
@echo. Description: Auto-answer terminate prompt | |
@echo. Options: off,answer_yes,answer_no | |
@echo. Value: off | |
@echo. | |
@echo.Automatically answers cmd.exe's 'Terminate batch job ^(Y/N^)^?' prompts. | |
@echo. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: cmd.ctrld_exits | |
@echo. Description: Pressing Ctrl-D exits session | |
@echo. Value: True | |
@echo. | |
@echo.Ctrl-D exits cmd.exe when used on an empty line. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: cmd.get_errorlevel | |
@echo. Description: Retrieve last exit code | |
@echo. Value: True | |
@echo. | |
@echo.When this is enabled, Clink runs a hidden 'echo %%errorlevel%%' command before | |
@echo.each interactive input prompt to retrieve the last exit code for use by Lua | |
@echo.scripts. If you experience problems, try turning this off. This is on by | |
@echo.default. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: color.arg | |
@echo. Description: Argument color | |
@echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
@echo. Value: bold | |
@echo. | |
@echo.The color for arguments in the input line. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: color.arginfo | |
@echo. Description: Argument info color | |
@echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
@echo. Value: yellow | |
@echo. | |
@echo.Some argmatchers may show that some flags or arguments accept additional | |
@echo.arguments, when listing possible completions. This color is used for those | |
@echo.additional arguments. ^(E.g. the "dir" in a "-x dir" listed completion.^) | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: color.argmatcher | |
@echo. Description: Argmatcher color | |
@echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
@echo. Value: | |
@echo. | |
@echo.The color for a command name that has an argmatcher. If a command name has | |
@echo.an argmatcher available, then this color will be used for the command name, | |
@echo.otherwise the doskey, cmd, or input color will be used. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: color.cmd | |
@echo. Description: Shell command completions | |
@echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
@echo. Value: bold | |
@echo. | |
@echo.Used when Clink displays shell ^(CMD.EXE^) command completions. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: color.cmdredir | |
@echo. Description: Color for ^< and ^> redirection symbols | |
@echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
@echo. Value: bold | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: color.cmdsep | |
@echo. Description: Color for ^& and ^| command separators | |
@echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
@echo. Value: bold | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: color.comment_row | |
@echo. Description: Color for comment row | |
@echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
@echo. Value: bright white on cyan | |
@echo. | |
@echo.The color for the comment row. During 'clink-select-complete' the comment | |
@echo.row shows the "and N more matches" or "rows X to Y of Z" messages. It | |
@echo.can also show how history expansion will be applied at the cursor. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: color.description | |
@echo. Description: Description completion color | |
@echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
@echo. Value: bright cyan | |
@echo. | |
@echo.The default color for descriptions of completions. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: color.doskey | |
@echo. Description: Doskey completions | |
@echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
@echo. Value: bold cyan | |
@echo. | |
@echo.Used when Clink displays doskey macro completions. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: color.executable | |
@echo. Description: Color for executable command word | |
@echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
@echo. Value: | |
@echo. | |
@echo.When set, this is the color in the input line for a command word that is | |
@echo.recognized as an executable file. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: color.filtered | |
@echo. Description: Filtered completion color | |
@echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
@echo. Value: bold | |
@echo. | |
@echo.The default color for filtered completions. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: color.flag | |
@echo. Description: Flag color | |
@echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
@echo. Value: default | |
@echo. | |
@echo.The color for flags in the input line. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: color.hidden | |
@echo. Description: Hidden file completions | |
@echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
@echo. Value: | |
@echo. | |
@echo.Used when Clink displays file completions with the hidden attribute. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: color.histexpand | |
@echo. Description: History expansion color | |
@echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
@echo. Value: | |
@echo. | |
@echo.The color for history expansions in the input line. When this is not set, | |
@echo.history expansions are not colored. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: color.horizscroll | |
@echo. Description: Horizontal scroll marker color | |
@echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
@echo. Value: | |
@echo. | |
@echo.Used when Clink displays ^< or ^> to indicate the input line can scroll | |
@echo.horizontally when horizontal-scroll-mode is set. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: color.input | |
@echo. Description: Input text color | |
@echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
@echo. Value: | |
@echo. | |
@echo.Used when Clink displays the input line text. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: color.interact | |
@echo. Description: For user-interaction prompts | |
@echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
@echo. Value: bold | |
@echo. | |
@echo.Used when Clink displays text or prompts such as a pager's 'More^?'. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: color.message | |
@echo. Description: Message area color | |
@echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
@echo. Value: default | |
@echo. | |
@echo.The color for the Readline message area ^(e.g. search prompt, etc^). | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: color.modmark | |
@echo. Description: Modified history line mark color | |
@echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
@echo. Value: | |
@echo. | |
@echo.Used when Clink displays the * mark on modified history lines when | |
@echo.mark-modified-lines is set. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: color.popup | |
@echo. Description: Color for popup lists and messages | |
@echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
@echo. Value: | |
@echo. | |
@echo.Used when Clink shows a text mode popup list or message, for example when | |
@echo.using the win-history-list command bound by default to F7. If not set, the | |
@echo.console's popup colors are used. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: color.popup_desc | |
@echo. Description: Color for popup description column^(s^) | |
@echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
@echo. Value: | |
@echo. | |
@echo.Used when Clink shows multiple columns of text in a text mode popup list. | |
@echo.If not set, a color is chosen to complement the console's popup colors. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: color.prompt | |
@echo. Description: Prompt color | |
@echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
@echo. Value: | |
@echo. | |
@echo.When set, this is used as the default color for the prompt. But it's | |
@echo.overridden by any colors set by prompt filter scripts. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: color.readonly | |
@echo. Description: Readonly file completions | |
@echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
@echo. Value: | |
@echo. | |
@echo.Used when Clink displays file completions with the readonly attribute. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: color.selected_completion | |
@echo. Description: Selected completion color | |
@echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
@echo. Value: | |
@echo. | |
@echo.The color for the selected completion with the clink-select-complete command. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: color.selection | |
@echo. Description: Selection color | |
@echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
@echo. Value: | |
@echo. | |
@echo.The color for selected text in the input line. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: color.suggestion | |
@echo. Description: Color for suggestion text | |
@echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
@echo. Value: bright black | |
@echo. | |
@echo.The color for suggestion text to be inserted at the end of the input line. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: color.unexpected | |
@echo. Description: Unexpected argument color | |
@echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
@echo. Value: default | |
@echo. | |
@echo.The color for unexpected arguments in the input line. An argument is | |
@echo.unexpected if an argument matcher expected there to be no more arguments | |
@echo.in the input line or if the word doesn't match any expected values. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: color.unrecognized | |
@echo. Description: Color for unrecognized command word | |
@echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
@echo. Value: | |
@echo. | |
@echo.When set, this is the color in the input line for a command word that is not | |
@echo.recognized as a command, doskey macro, directory, argmatcher, or executable | |
@echo.file. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: debug.log_terminal | |
@echo. Description: Log Readline terminal input and output | |
@echo. Value: False | |
@echo. | |
@echo.WARNING: Only turn this on for diagnostic purposes, and only temporarily! | |
@echo.Having this on significantly increases the amount of information written to | |
@echo.the log file. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: directories.dupe_mode | |
@echo. Description: Controls duplicates in directory history | |
@echo. Options: add,erase_prev | |
@echo. Value: add | |
@echo. | |
@echo.Controls how the current directory history is updated. A value of 'add' ^(the | |
@echo.default^) always adds the current directory to the directory history. A value | |
@echo.of 'erase_prev' will erase any previous entries for the current directory and | |
@echo.then add it to the directory history. | |
@echo.Note that directory history is not saved between sessions. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: doskey.enhanced | |
@echo. Description: Add enhancements to Doskey | |
@echo. Value: True | |
@echo. | |
@echo.Enhanced Doskey adds the expansion of macros that follow '^|' and '^&' | |
@echo.command separators and respects quotes around words when parsing $1...9 | |
@echo.tags. Note that these features do not apply to Doskey use in Batch files. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: exec.aliases | |
@echo. Description: Include aliases | |
@echo. Value: True | |
@echo. | |
@echo.Include doskey aliases as matches. ^(See exec.enable^) | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: exec.commands | |
@echo. Description: Include CMD commands | |
@echo. Value: True | |
@echo. | |
@echo.Include CMD commands. ^(See exec.enable^) | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: exec.cwd | |
@echo. Description: Match executables in current directory | |
@echo. Value: True | |
@echo. | |
@echo.Include executables in the current directory. This is implicit if the word | |
@echo.being completed is a relative path. ^(See exec.enable^) | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: exec.dirs | |
@echo. Description: Include directories | |
@echo. Value: True | |
@echo. | |
@echo.Include directories relative to the current working directory as matches. | |
@echo.^(See exec.enable^) | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: exec.enable | |
@echo. Description: Enable executable matching for 'complete' | |
@echo. Value: True | |
@echo. | |
@echo.When enabled, the completion commands only match executables and directories | |
@echo.when completing the first word of a line. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: exec.files | |
@echo. Description: Include files | |
@echo. Value: False | |
@echo. | |
@echo.Include files in the current working directory as matches. This includes | |
@echo.executables in the current directory even when exec.cwd is off. ^(See | |
@echo.exec.enable, and exec.cwd^) | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: exec.path | |
@echo. Description: Match executables in PATH | |
@echo. Value: True | |
@echo. | |
@echo.Completes executables found in the directories specified in the PATH | |
@echo.environment system variable. ^(See exec.enable^) | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: exec.space_prefix | |
@echo. Description: Whitespace prefix matches files | |
@echo. Value: True | |
@echo. | |
@echo.If the line begins with whitespace then Clink bypasses executable matching | |
@echo.and will do normal files matching instead. ^(See exec.enable^) | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: files.hidden | |
@echo. Description: Include hidden files | |
@echo. Value: True | |
@echo. | |
@echo.Includes or excludes files with the 'hidden' attribute set when generating | |
@echo.file lists. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: files.system | |
@echo. Description: Include system files | |
@echo. Value: False | |
@echo. | |
@echo.Includes or excludes files with the 'system' attribute set when generating | |
@echo.file lists. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: history.auto_expand | |
@echo. Description: Perform history expansion automatically | |
@echo. Value: True | |
@echo. | |
@echo.When enabled, history expansion is automatically performed when a command | |
@echo.line is accepted ^(by pressing Enter^). When disabled, history expansion is | |
@echo.performed only when a corresponding expansion command is used ^(such as | |
@echo.'clink-expand-history' Alt-^, or 'clink-expand-line' Alt-Ctrl-E^). | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: history.dont_add_to_history_cmds | |
@echo. Description: Commands not automatically added to the history | |
@echo. Value: exit history | |
@echo. | |
@echo.List of commands that aren't automatically added to the history. | |
@echo.Commands are separated by spaces, commas, or semicolons. Default is | |
@echo."exit history", to exclude both of those commands. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: history.dupe_mode | |
@echo. Description: Controls how duplicate entries are handled | |
@echo. Options: add,ignore,erase_prev | |
@echo. Value: erase_prev | |
@echo. | |
@echo.If a line is a duplicate of an existing history entry Clink will erase | |
@echo.the duplicate when this is set to 'erase_prev'. A value of 'ignore' will | |
@echo.not add a line to the history if it already exists, and a value of 'add' | |
@echo.will always add lines. | |
@echo.Note that history is not deduplicated when reading/writing to disk. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: history.expand_mode | |
@echo. Description: Sets how command history expansion is applied | |
@echo. Options: off,on,not_squoted,not_dquoted,not_quoted | |
@echo. Value: not_quoted | |
@echo. | |
@echo.The '!' character in an entered line can be interpreted to introduce | |
@echo.words from the history. That can be enabled and disable by setting this | |
@echo.value to 'on' or 'off'. Or set this to 'not_squoted', 'not_dquoted', or | |
@echo.'not_quoted' to skip any '!' character in single, double, or both quotes | |
@echo.respectively. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: history.ignore_space | |
@echo. Description: Skip adding lines prefixed with whitespace | |
@echo. Value: True | |
@echo. | |
@echo.Ignore lines that begin with whitespace when adding lines in to | |
@echo.the history. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: history.max_lines | |
@echo. Description: The number of history lines to save | |
@echo. Value: 10000 | |
@echo. | |
@echo.The number of history lines to save, or 0 for unlimited. | |
@echo. | |
@echo.Warning: The larger the history file becomes, the longer it takes to reload | |
@echo.at each prompt. If it starts taking too long, then lower this setting. Or | |
@echo.you can use 'clink history compact ^<num_lines^>' to force shrinking the | |
@echo.history file to a smaller size. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: history.save | |
@echo. Description: Save history between sessions | |
@echo. Value: True | |
@echo. | |
@echo.Changing this setting only takes effect for new instances. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: history.shared | |
@echo. Description: Share history between instances | |
@echo. Value: False | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: history.show_preview | |
@echo. Description: Show preview of history expansion at cursor | |
@echo. Value: True | |
@echo. | |
@echo.When the text at the cursor is subject to history expansion, this shows a | |
@echo.preview of the expanded result below the input line. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: history.sticky_search | |
@echo. Description: Makes it easy to replay a series of commands | |
@echo. Value: False | |
@echo. | |
@echo.When enabled, reusing a history line does not add the reused line to the end | |
@echo.of the history, and it leaves the history search position on the reused line | |
@echo.so next/prev history can continue from there ^(e.g. replaying commands via Up | |
@echo.many times, Enter, Down, Enter, Down, Enter, etc^). | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: history.time_format | |
@echo. Description: Format for showing history times | |
@echo. Value: %%F %%T | |
@echo. | |
@echo.This specifies a format string to override the default string ^("%%F %%T "^) | |
@echo.for showing timestamps for history items. Timestamps are shown when the | |
@echo.'history.show_time' setting is enabled. This can be overridden by flags in | |
@echo.the 'history' command. | |
@echo. | |
@echo.The format string may contain regular characters and special format | |
@echo.specifiers. Format specifiers begin with a percent sign ^(%%^), and are expanded | |
@echo.to their corresponding values. For a list of possible format specifiers, | |
@echo.refer to the C++ strftime^(^) documentation. | |
@echo. | |
@echo.Some common format specifiers are: | |
@echo. %%a Abbreviated weekday name for the locale ^(e.g. Thu^). | |
@echo. %%b Abbreviated month name for the locale ^(e.g. Aug^). | |
@echo. %%c Date and time representation for the locale. | |
@echo. %%D Short MM/DD/YY date ^(e.g. 08/23/01^). | |
@echo. %%F Short YYYY/MM/DD date ^(e.g. 2001-08-23^). | |
@echo. %%H Hour in 24-hour format ^(00 - 23^). | |
@echo. %%I Hour in 12-hour format ^(01 - 12^). | |
@echo. %%m Month ^(01 - 12^). | |
@echo. %%M Minutes ^(00 - 59^). | |
@echo. %%p AM or PM indicator for the locale. | |
@echo. %%r 12-hour clock time for the locale ^(e.g. 02:55:41 pm^). | |
@echo. %%R 24-hour clock time ^(e.g. 14:55^). | |
@echo. %%S Seconds ^(00 - 59^). | |
@echo. %%T ISO 8601 time format HH:MM:SS ^(e.g. 14:55:41^). | |
@echo. %%x Date representation for the locale. | |
@echo. %%X Time representation for the locale. | |
@echo. %%y Year without century ^(00 - 99^). | |
@echo. %%Y Year with century ^(e.g. 2001^). | |
@echo. %%%% A %% sign. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: history.time_stamp | |
@echo. Description: History item timestamps | |
@echo. Options: off,save,show | |
@echo. Value: off | |
@echo. | |
@echo.The default is 'off'. When set to 'save', timestamps are saved for each | |
@echo.history item but are only shown in the 'history' command when the | |
@echo.'--show-time' flag is used. When set to 'show', timestamps are saved and | |
@echo.are shown in 'history' unless the '--bare' flag is used. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: lua.break_on_error | |
@echo. Description: Breaks into Lua debugger on Lua errors | |
@echo. Value: False | |
@echo. | |
@echo.Breaks into the Lua debugger on Lua errors, if lua.debug is enabled. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: lua.break_on_traceback | |
@echo. Description: Breaks into Lua debugger on traceback | |
@echo. Value: False | |
@echo. | |
@echo.Breaks into the Lua debugger on traceback^(^) calls, if lua.debug is enabled. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: lua.debug | |
@echo. Description: Enables Lua debugging | |
@echo. Value: False | |
@echo. | |
@echo.Loads a simple embedded command line debugger when enabled. | |
@echo.The debugger can be activated by inserting a pause^(^) call, which will act | |
@echo.as a breakpoint. Or the debugger can be activated by traceback^(^) calls or | |
@echo.Lua errors by turning on the lua.break_on_traceback or lua.break_on_error | |
@echo.settings, respectively. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: lua.path | |
@echo. Description: 'require' search path | |
@echo. Value: | |
@echo. | |
@echo.Value to append to package.path. Used to search for Lua scripts specified | |
@echo.in require^(^) statements. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: lua.reload_scripts | |
@echo. Description: Reload scripts on every prompt | |
@echo. Value: False | |
@echo. | |
@echo.When true, Lua scripts are reloaded on every prompt. When false, Lua scripts | |
@echo.are loaded once. This setting can be changed while Clink is running and takes | |
@echo.effect at the next prompt. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: lua.strict | |
@echo. Description: Fail on argument errors | |
@echo. Value: True | |
@echo. | |
@echo.When enabled, argument errors cause Lua scripts to fail. This may expose | |
@echo.bugs in some older scripts, causing them to fail where they used to succeed. | |
@echo.In that case you can try turning this off, but please alert the script owner | |
@echo.about the issue so they can fix the script. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: lua.traceback_on_error | |
@echo. Description: Prints stack trace on Lua errors | |
@echo. Value: False | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: match.expand_abbrev | |
@echo. Description: Expand abbreviated paths when completing | |
@echo. Value: True | |
@echo. | |
@echo.Expands unambiguously abbreviated directories in a path when performing | |
@echo.completion. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: match.expand_envvars | |
@echo. Description: Expand envvars when completing | |
@echo. Value: False | |
@echo. | |
@echo.Expands environment variables in a word before performing completion. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: match.fit_columns | |
@echo. Description: Fits match columns to screen width | |
@echo. Value: True | |
@echo. | |
@echo.When displaying match completions, this calculates column widths to fit as | |
@echo.many as possible on the screen. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: match.ignore_accent | |
@echo. Description: Accent insensitive matching | |
@echo. Value: True | |
@echo. | |
@echo.Toggles whether accents on characters are ignored when selecting matches. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: match.ignore_case | |
@echo. Description: Case insensitive matching | |
@echo. Options: off,on,relaxed | |
@echo. Value: relaxed | |
@echo. | |
@echo.Toggles whether case is ignored when selecting matches. The 'relaxed' | |
@echo.option will also consider -/_ as equal. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: match.max_fitted_matches | |
@echo. Description: Limits fitted columns by number of matches | |
@echo. Value: 0 | |
@echo. | |
@echo.When 'match.fit_columns' is enabled, this disables calculating column widths | |
@echo.when the number of matches exceeds this value. The default is 0 ^(unlimited^). | |
@echo.Depending on the screen width and CPU speed, setting a limit may avoid delays. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: match.max_rows | |
@echo. Description: Max rows in clink-select-complete | |
@echo. Value: 0 | |
@echo. | |
@echo.The maximum number of rows the 'clink-select-complete' can use. When this | |
@echo.is 0, the limit is the terminal height. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: match.preview_rows | |
@echo. Description: Preview rows | |
@echo. Value: 5 | |
@echo. | |
@echo.The number of rows to show as a preview when using the 'clink-select-complete' | |
@echo.command ^(bound by default to Ctrl+Shift+Space^). When this is 0, all rows are | |
@echo.shown and if there are too many matches it instead prompts first like the | |
@echo.'complete' command does. Otherwise it shows the specified number of rows as | |
@echo.a preview without prompting, and it expands to show the full set of matches | |
@echo.when the selection is moved past the preview rows. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: match.sort_dirs | |
@echo. Description: Where to sort matching directories | |
@echo. Options: before,with,after | |
@echo. Value: with | |
@echo. | |
@echo.Matching directories can go before files, with files, or after files. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: match.substring | |
@echo. Description: Try substring if no prefix matches | |
@echo. Value: False | |
@echo. | |
@echo.When set, if no completions are found with a prefix search, then a substring | |
@echo.search is used. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: match.translate_slashes | |
@echo. Description: Translate slashes and backslashes | |
@echo. Options: off,system,slash,backslash | |
@echo. Value: system | |
@echo. | |
@echo.File and directory completions can be translated to use consistent slashes. | |
@echo.The default is 'system' to use the appropriate path separator for the OS host | |
@echo.^(backslashes on Windows^). Use 'slash' to use forward slashes, or 'backslash' | |
@echo.to use backslashes. Use 'off' to turn off translating slashes from custom | |
@echo.match generators. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: match.wild | |
@echo. Description: Match ^? and * wildcards when completing | |
@echo. Value: True | |
@echo. | |
@echo.Matches ^? and * wildcards and leading . characters when using any of the | |
@echo.completion commands. Turn this off to behave how bash does, and not match | |
@echo.wildcards or leading dots. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: prompt.async | |
@echo. Description: Enables asynchronous prompt refresh | |
@echo. Value: True | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: prompt.transient | |
@echo. Description: Controls when past prompts are collapsed | |
@echo. Options: off,always,same_dir | |
@echo. Value: off | |
@echo. | |
@echo.The default is 'off' which never collapses past prompts. Set to 'always' to | |
@echo.always collapse past prompts. Set to 'same_dir' to only collapse past prompts | |
@echo.when the current working directory hasn't changed since the last prompt. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: readline.hide_stderr | |
@echo. Description: Suppress stderr from the Readline library | |
@echo. Value: False | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: terminal.adjust_cursor_style | |
@echo. Description: Adjusts the cursor visibility and shape | |
@echo. Value: True | |
@echo. | |
@echo.Normally Clink adjusts the cursor visibility and shape, but that will override | |
@echo.the Cursor Shape settings for the default Windows console. Disabling this | |
@echo.lets the Cursor Shape settings work, but then Clink can't show Insert Mode via | |
@echo.the cursor shape, the 'visible bell' setting doesn't work, Clink can't support | |
@echo.the ANSI escape codes for cursor shape, and the cursor may flicker or flash | |
@echo.strangely while typing. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: terminal.color_emoji | |
@echo. Description: Color emoji support in terminal | |
@echo. Options: off,on,auto | |
@echo. Value: auto | |
@echo. | |
@echo.Set this to indicate whether the terminal program draws emoji using colored | |
@echo.double width characters. This needs to be set accurately in order for Clink | |
@echo.to display the input line properly when it contains emoji characters. | |
@echo.When set to 'off' Clink assumes emoji are rendered using 1 character cell. | |
@echo.When set to 'on' Clink assumes emoji are rendered using 2 character cells. | |
@echo.When set to 'auto' ^(the default^) Clink assumes emoji are rendered using 2 | |
@echo.character cells when using Windows Terminal or WezTerm, or otherwise using 1 | |
@echo.character cell. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: terminal.differentiate_keys | |
@echo. Description: Use special sequences for Ctrl-H, -I, -M, -[ | |
@echo. Value: False | |
@echo. | |
@echo.When enabled, pressing Ctrl-H or Ctrl-I or Ctrl-M or Ctrl-[ generate special | |
@echo.key sequences to enable binding them separately from Backspace or Tab or | |
@echo.Enter or Escape. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: terminal.east_asian_ambiguous | |
@echo. Description: East Asian Ambiguous character widths | |
@echo. Options: font,one,two,auto | |
@echo. Value: auto | |
@echo. | |
@echo.There is a group of East Asian characters whose widths are ambiguous in the | |
@echo.Unicode standard. This setting controls how to resolve the ambiguous widths. | |
@echo.By default this is set to 'auto', but some terminal hosts may require setting | |
@echo.this to a different value to work around limitations in the terminal hosts. | |
@echo. | |
@echo.Setting this to 'font' measures the East Asian Ambiguous character widths | |
@echo.using the current font. Setting it to 'one' uses 1 as the width, or 'two' | |
@echo.uses 2 as the width. When this is 'auto' ^(the default^) and the current code | |
@echo.page is 932, 936, 949, or 950 then it tries to automatically measure the width | |
@echo.based on which terminal host and font are used, or for any other code pages | |
@echo.^(including UTF8^) it uses 1 as the width. | |
@echo. | |
@echo.The %%CLINK_EAST_ASIAN_AMBIGUOUS%% environment variable overrides this setting. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: terminal.emulation | |
@echo. Description: Controls VT emulation | |
@echo. Options: native,emulate,auto | |
@echo. Value: auto | |
@echo. | |
@echo.Clink can emulate Virtual Terminal processing if the console doesn't | |
@echo.natively. When set to 'emulate' then Clink performs VT emulation and handles | |
@echo.ANSI escape codes. When 'native' then Clink passes output directly to the | |
@echo.console. Or when 'auto' then Clink performs VT emulation unless native | |
@echo.terminal support is detected ^(such as when hosted inside ConEmu, Windows | |
@echo.Terminal, WezTerm, or Windows 10 new console, or when using ANSICON^). | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: terminal.mouse_input | |
@echo. Description: Clink mouse input | |
@echo. Options: off,on,auto | |
@echo. Value: auto | |
@echo. | |
@echo.Clink can optionally respond to mouse input, instead of letting the terminal | |
@echo.respond to mouse input ^(e.g. to select text on the screen^). When mouse input | |
@echo.is enabled in Clink, clicking in the input line sets the cursor position, and | |
@echo.clicking in popup lists selects an item, etc. | |
@echo. | |
@echo.'off' lets the terminal host handle mouse input. | |
@echo.'on' lets Clink handle mouse input. | |
@echo.'auto' lets Clink handle mouse input in ConEmu and in the default Conhost | |
@echo.terminal when Quick Edit mode is unchecked in the console Properties dialog. | |
@echo. | |
@echo.NOTES: | |
@echo.- ConEmu does not let Clink respond to the mouse wheel. | |
@echo.- Windows Terminal does not let Clink scroll the terminal, but you can scroll | |
@echo. by holding Shift or Alt while using the mouse wheel. | |
@echo.- Holding Shift, Ctrl, or Alt while clicking allows the normal terminal mouse | |
@echo. input to still work ^(for example, to select text on the screen^). | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: terminal.mouse_modifier | |
@echo. Description: Modifier keys for mouse input | |
@echo. Value: | |
@echo. | |
@echo.This selects which modifier keys ^(Alt, Ctrl, Shift^) must be held in order | |
@echo.for Clink to respond to mouse input when mouse input is enabled by the | |
@echo.'terminal.mouse_input' setting. | |
@echo. | |
@echo.This is a text string that can list one or more modifier keys: 'alt', 'ctrl', | |
@echo.and 'shift'. For example, setting it to "alt shift" causes Clink to only | |
@echo.respond to mouse input when both Alt and Shift are held ^(and not Ctrl^). | |
@echo.If the %%CLINK_MOUSE_MODIFIER%% environment variable is set then its value | |
@echo.supersedes this setting. | |
@echo. | |
@echo.Note that in the default Conhost terminal when Quick Edit mode is turned off | |
@echo.then Clink will also respond to mouse input when no modifier keys are held. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: terminal.raw_esc | |
@echo. Description: Esc sends a literal escape character | |
@echo. Value: False | |
@echo. | |
@echo.When disabled ^(the default^), pressing Esc or Alt+[ or Alt+Shift+O send unique | |
@echo.key sequences to provide a predictable, reliable, and configurable input | |
@echo.experience. Use 'clink echo' to find the key sequences. | |
@echo. | |
@echo.When this setting is enabled, then pressing those keys sends the same key | |
@echo.sequences as in Unix/etc. However, they are ambiguous and conflict with the | |
@echo.beginning of many other key sequences, leading to surprising or confusing | |
@echo.input situations. | |
@echo.Changing this only affects future Clink sessions, not the current session. | |
@echo. | |
@echo.# ---------------------------------------------------------------------------- | |
@echo. Name: terminal.use_altgr_substitute | |
@echo. Description: Support Windows' Ctrl-Alt substitute for AltGr | |
@echo. Value: False | |
@echo. | |
@echo.Windows provides Ctrl-Alt as a substitute for AltGr, historically to | |
@echo.support keyboards with no AltGr key. This may collide with some of | |
@echo.Readline's bindings. | |
@goto:eof |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set CMD_PROFILE_DIR=%USERPROFILE%\cmdfiles | |
set CMD_PROFILE=%CMD_PROFILE_DIR%\user_profile.cmd | |
set CMD_ALIASES=%CMD_PROFILE_DIR%\user_aliases.txt | |
:BEGIN | |
if not exist "%CMD_PROFILE_DIR%\" mkdir "%CMD_PROFILE_DIR%\" | |
rem profile | |
if not exist "%CMD_PROFILE%" ( | |
echo.:: This file to run own startup before execution Clink. | |
echo. | |
echo.:: Uncoment and set Clink path if using portable. | |
echo.@REM set CLINK_DIR=^<path^> | |
echo. | |
echo.:: Put your script below | |
echo. | |
) >"%CMD_PROFILE%" | |
call "%CMD_PROFILE%" | |
if %errorlevel% neq 0 ( | |
echo %~n0: [Error%errorlevel%] :: Please check '%CMD_PROFILE%'. | |
exit /b %errorlevel% | |
) | |
rem utilities: https://github.com/sionta/batch.scripts/tree/master/binutils | |
for %%i in (alias,cpath,csudo) do if not exist "%CMD_PROFILE_DIR%\bin\%%~ni.cmd" ( | |
ping www.bing.com -n 1 -w 1000 >nul && ( | |
curl -Lfso "%CMD_PROFILE_DIR%\bin\%%~ni.cmd" --create-dirs https://raw.githubusercontent.com/sionta/batch.scripts/master/binutils/%%~ni.cmd | |
) | |
) | |
rem aliases | |
if not exist "%CMD_ALIASES%" ( | |
echo.== Starting with EQUALS ^(=^) will not be executed. | |
echo.== Uncoment and/or add your aliases below: | |
echo.e.=explorer . | |
echo.ls=dir /d $* | |
echo.ll=dir $* ^| findstr "^[0-9]" | |
echo.cp=copy $* | |
echo.mv=move $* | |
echo.rm=del $* | |
echo.ni=echo:$G$1:1 | |
echo. | |
) >"%CMD_ALIASES%" | |
if exist "%CMD_PROFILE_DIR%\bin\alias.cmd" ( | |
doskey alias="%CMD_PROFILE_DIR%\bin\alias.cmd" $* | |
call "%CMD_PROFILE_DIR%\bin\alias.cmd" /import "%CMD_ALIASES%" | |
) else ( | |
doskey /macrofile="%CMD_ALIASES%" >nul | |
doskey alias=if "$1"=="" ^(doskey /macros ^) else doskey $* | |
doskey unalias=if "$1"=="" ^(doskey /macros ^) else doskey $1 = | |
doskey realias=doskey /macrofile="%%CMD_ALIASES%%"$Gnul^&^&echo Alias reloaded. | |
) | |
:CLINK | |
if /i "%PROCESSOR_ARCHITECTURE%"=="AMD64" ( | |
if not defined PROCESSOR_ARCHITEW6432 ( | |
set CLINK_ARCH=x64 | |
) else ( | |
set CLINK_ARCH=x86 | |
) | |
) else if /i "%PROCESSOR_ARCHITECTURE%"=="x86" ( | |
set CLINK_ARCH=x86 | |
) else if /i "%PROCESSOR_ARCHITECTURE%"=="ARM64" ( | |
set CLINK_ARCH=arm64 | |
) | |
if not defined CLINK_DIR for %%I in (CLINK_%CLINK_ARCH%.EXE) do ( | |
if not exist "%%~f$PATH:I" ( | |
echo %~n0: First install Clink https://github.com/chrisant996/clink | |
exit /b 2 | |
) else ( | |
set "CLINK_DIR=%%~dp$PATH:I" | |
) | |
) | |
set CLINK_DIR=%CLINK_DIR:"=% | |
if "%CLINK_DIR:~-1%"=="\" set "CLINK_DIR=%CLINK_DIR:~0,-1%" | |
if not exist "%CLINK_DIR%\clink_%CLINK_ARCH%.exe" ( | |
echo %~n0: File not found '%CLINK_DIR%\clink_%CLINK_ARCH%.exe'. | |
exit /b 2 | |
) | |
set CLINK_SCRIPTS_DIR=%CMD_PROFILE_DIR%\scripts | |
rem inputrc: https://chrisant996.github.io/clink/clink.html#gettingstarted_inputrc | |
if not exist "%CMD_PROFILE_DIR%\.inputrc" call :CLINK_INPUTRC_FILE >"%CMD_PROFILE_DIR%\.inputrc" | |
rem settings: https://chrisant996.github.io/clink/clink.html#clink-settings | |
if not exist "%CMD_PROFILE_DIR%\clink_settings" ( | |
call :CLINK_SETTINGS_FILE >"%CMD_PROFILE_DIR%\clink_settings" | |
call :CLINK_SETTINGS_READ >"%CMD_PROFILE_DIR%\clink_settings_readme.txt" | |
) | |
rem clink-completions: https://github.com/vladimir-kotikov/clink-completions | |
if not exist "%CLINK_SCRIPTS_DIR%\*.lua" ( | |
if not exist "%CLINK_SCRIPTS_DIR%\" mkdir "%CLINK_SCRIPTS_DIR%\" | |
ping www.bing.com -n 1 -w 1000 >nul && ( | |
call :FindExe git && ( | |
if exist "%CLINK_SCRIPTS_DIR%\" rmdir /s /q "%CLINK_SCRIPTS_DIR%\" | |
git clone --depth=1 --branch master https://github.com/vladimir-kotikov/clink-completions.git "%CLINK_SCRIPTS_DIR%" >nul 2>&1 | |
) || ( | |
curl -Ls https://api.github.com/repos/vladimir-kotikov/clink-completions/tarball -o "%CLINK_SCRIPTS_DIR%.tar.gz" | |
tar -xzf "%CLINK_SCRIPTS_DIR%.tar.gz" -C "%CMD_PROFILE_DIR%" && for /f "tokens=*" %%j in ( | |
'dir /b /s /ad "%CMD_PROFILE_DIR%\vladimir-kotikov-clink-completions-*" 2^>nul' | |
) do if not "%%~j"=="" ( | |
move /y "%%~j" "%CLINK_SCRIPTS_DIR%" >nul | |
) | |
) | |
) | |
) | |
rem oh-my-posh: https://ohmyposh.dev/docs/installation/prompt | |
call :FindExe oh-my-posh && ( | |
if not exist "%CMD_PROFILE_DIR%\prompt.omp.json" call :POSH_THEME_FILE >"%CMD_PROFILE_DIR%\prompt.omp.json" | |
if not defined POSH_THEME set "POSH_THEME=%CMD_PROFILE_DIR%\prompt.omp.json" | |
if not exist "%CLINK_SCRIPTS_DIR%\oh-my-posh.lua" ( | |
if exist "%CLINK_SCRIPTS_DIR%\oh-my-posh.bak" ( | |
>nul move /y "%CLINK_SCRIPTS_DIR%\oh-my-posh.bak" "%CLINK_SCRIPTS_DIR%\oh-my-posh.lua" | |
) else ( | |
call echo.load^(io.popen^('oh-my-posh init cmd'^):read^("*a"^)^)^(^)>"%CLINK_SCRIPTS_DIR%\oh-my-posh.lua" | |
) | |
) | |
) || ( | |
if exist "%CLINK_SCRIPTS_DIR%\oh-my-posh.lua" move /y "%CLINK_SCRIPTS_DIR%\oh-my-posh.lua" "%CLINK_SCRIPTS_DIR%\oh-my-posh.bak" >nul | |
rem clink-flex-prompt: https://github.com/chrisant996/clink-flex-prompt | |
for %%i in (flexprompt,flexprompt_modules,flexprompt_wizard) do ( | |
if not exist "%CLINK_SCRIPTS_DIR%\%%~ni.lua" ping www.bing.com -n 1 -w 1000 >nul && ( | |
curl -Lfso "%CLINK_SCRIPTS_DIR%\%%~ni.lua" --create-dirs https://raw.githubusercontent.com/chrisant996/clink-flex-prompt/master/%%~ni.lua | |
) | |
) | |
) | |
rem fuzzy-finder: https://github.com/junegunn/fzf | |
call :FindExe fzf && ( | |
if not exist "%CLINK_SCRIPTS_DIR%\fzf.lua" ping www.bing.com -n 1 -w 1000 >nul && ( | |
curl -Lfso "%CLINK_SCRIPTS_DIR%\fzf.lua" --create-dirs https://raw.githubusercontent.com/chrisant996/clink-fzf/main/fzf.lua | |
) | |
type "%CMD_PROFILE_DIR%\.inputrc" | findstr "\"luafunc:fzf_.*"$" >nul || call :FZF_INPUTRC_FILE >>"%CMD_PROFILE_DIR%\.inputrc" | |
call set "FZF_DEFAULT_OPTS=--height=40% --reverse --info=inline --border --margin=1 --padding=1 --layout=reverse" | |
call set "FZF_DEFAULT_OPTS=%%FZF_DEFAULT_OPTS%% --color=bg+:#3c3836,bg:#32302f,spinner:#fb4934,hl:#928374,fg:#ebdbb2,header:#928374," | |
call set "FZF_DEFAULT_OPTS=%%FZF_DEFAULT_OPTS%%info:#8ec07c,pointer:#fb4934,marker:#fb4934,fg+:#ebdbb2,prompt:#fb4934,hl+:#fb4934" | |
) | |
if "%~1"=="~" cd /d "%CMD_PROFILE_DIR%\" && pushd "%USERPROFILE%\" | |
"%CLINK_DIR%\CLINK_%CLINK_ARCH%.EXE" inject --profile "%CMD_PROFILE_DIR%" --scripts "%CLINK_SCRIPTS_DIR%" --quiet | |
EXIT /B %ERRORLEVEL% | |
rem set " | |
=clink.id=5604 | |
=clink.bin=D:\dir\clink | |
=clink.profile=C:\Users\<username>\cmdfiles | |
=clink.scripts=C:\Users\<username>\cmdfiles\scripts | |
:FindExe | |
for %%I in (%~n1.exe) do if not exist "%%~f$PATH:I" exit /b 1 | |
exit /b 0 | |
:FZF_INPUTRC_FILE | |
echo.# For more see: https://github.com/chrisant996/clink-fzf | |
echo.# Default key bindings for fzf with Clink. | |
echo."\C-t": "luafunc:fzf_file" # Ctrl+T lists files recursively; choose one or multiple to insert them. | |
echo."\C-r": "luafunc:fzf_history" # Ctrl+R lists history entries; choose one to insert it. | |
echo."\M-c": "luafunc:fzf_directory" # Alt+C lists subdirectories; choose one to 'cd /d' to it. | |
echo."\M-b": "luafunc:fzf_bindings" # Alt+B lists key bindings; choose one to invoke it. | |
echo."\t": "luafunc:fzf_complete" # Tab uses fzf to filter match completions. | |
echo."\e[27;5;32~": "luafunc:fzf_complete" # Ctrl+Space uses fzf to filter match completions. | |
GOTO :EOF | |
:CLINK_INPUTRC_FILE | |
echo.# For more see: https://chrisant996.github.io/clink/clink.html#gettingstarted_inputrc | |
echo. | |
echo.# Some common Readline config settings. | |
echo. | |
echo.set colored-stats on # Turn on completion colors. | |
echo.set colored-completion-prefix on # Color the typed completion prefix. | |
echo. | |
echo.# Some config settings that only work in Clink. | |
echo. | |
echo.$if clink | |
echo.set search-ignore-case on # Case insensitive history searches. | |
echo.set completion-auto-query-items on # Prompt before showing completions if they'll exceed half the screen. | |
echo.$endif | |
echo. | |
echo.# Add your keybindings here... | |
echo. | |
GOTO :EOF | |
:CLINK_SETTINGS_FILE | |
echo.# name: Enable asynchronous suggestions | |
echo.# type: boolean | |
echo.autosuggest.async = True | |
echo. | |
echo.# name: Enable automatic suggestions | |
echo.# type: boolean | |
@REM echo.autosuggest.enable = False | |
echo.autosuggest.enable = True | |
echo. | |
echo.# name: Accept original capitalization | |
echo.# type: boolean | |
echo.autosuggest.original_case = True | |
echo. | |
echo.# name: Controls how suggestions are chosen | |
echo.# type: string | |
echo.autosuggest.strategy = match_prev_cmd history completion | |
echo. | |
echo.# name: Auto-update the Clink program files | |
echo.# type: boolean | |
echo.clink.autoupdate = True | |
echo. | |
echo.# name: Colorize the input text | |
echo.# type: boolean | |
echo.clink.colorize_input = True | |
echo. | |
echo.# name: Selects default key bindings | |
echo.# type: enum | |
echo.# options: bash,windows | |
@REM echo.clink.default_bindings = bash | |
echo.clink.default_bindings = windows | |
echo. | |
echo.# name: Controls what startup logo to show | |
echo.# type: enum | |
echo.# options: none,full,short | |
@REM echo.clink.logo = full | |
echo.clink.logo = none | |
echo. | |
echo.# name: Maximum rows for the input line | |
echo.# type: integer | |
echo.clink.max_input_rows = 0 | |
echo. | |
echo.# name: Strips CR and LF chars on paste | |
echo.# type: enum | |
echo.# options: delete,space,ampersand,crlf | |
echo.clink.paste_crlf = crlf | |
echo. | |
echo.# name: Paths to load Lua scripts from | |
echo.# type: string | |
echo.clink.path = | |
echo. | |
echo.# name: Enable prompt filtering by Lua scripts | |
echo.# type: boolean | |
echo.clink.promptfilter = True | |
echo. | |
echo.# name: Days between update checks | |
echo.# type: integer | |
echo.clink.update_interval = 5 | |
echo. | |
echo.# name: Pressing Alt-F4 exits session | |
echo.# type: boolean | |
echo.cmd.altf4_exits = True | |
echo. | |
echo.# name: Auto-answer terminate prompt | |
echo.# type: enum | |
echo.# options: off,answer_yes,answer_no | |
echo.cmd.auto_answer = off | |
echo. | |
echo.# name: Pressing Ctrl-D exits session | |
echo.# type: boolean | |
echo.cmd.ctrld_exits = True | |
echo. | |
echo.# name: Retrieve last exit code | |
echo.# type: boolean | |
echo.cmd.get_errorlevel = True | |
echo. | |
echo.# name: Argument color | |
echo.# type: color | |
echo.color.arg = bold | |
echo. | |
echo.# name: Argument info color | |
echo.# type: color | |
echo.color.arginfo = yellow | |
echo. | |
echo.# name: Shell command completions | |
echo.# type: color | |
echo.color.cmd = bold | |
echo. | |
echo.# name: Color for ^< and ^> redirection symbols | |
echo.# type: color | |
echo.color.cmdredir = bold | |
echo. | |
echo.# name: Color for ^& and ^| command separators | |
echo.# type: color | |
echo.color.cmdsep = bold | |
echo. | |
echo.# name: Color for comment row | |
echo.# type: color | |
echo.color.comment_row = bright white on cyan | |
echo. | |
echo.# name: Description completion color | |
echo.# type: color | |
echo.color.description = bright cyan | |
echo. | |
echo.# name: Doskey completions | |
echo.# type: color | |
echo.color.doskey = bold cyan | |
echo. | |
echo.# name: Color for executable command word | |
echo.# type: color | |
echo.color.executable = | |
echo. | |
echo.# name: Filtered completion color | |
echo.# type: color | |
echo.color.filtered = bold | |
echo. | |
echo.# name: Flag color | |
echo.# type: color | |
echo.color.flag = default | |
echo. | |
echo.# name: Hidden file completions | |
echo.# type: color | |
echo.color.hidden = | |
echo. | |
echo.# name: History expansion color | |
echo.# type: color | |
echo.color.histexpand = | |
echo. | |
echo.# name: Horizontal scroll marker color | |
echo.# type: color | |
echo.color.horizscroll = | |
echo. | |
echo.# name: Input text color | |
echo.# type: color | |
echo.color.input = | |
echo. | |
echo.# name: For user-interaction prompts | |
echo.# type: color | |
echo.color.interact = bold | |
echo. | |
echo.# name: Message area color | |
echo.# type: color | |
echo.color.message = default | |
echo. | |
echo.# name: Modified history line mark color | |
echo.# type: color | |
echo.color.modmark = | |
echo. | |
echo.# name: Color for popup lists and messages | |
echo.# type: color | |
echo.color.popup = | |
echo. | |
echo.# name: Color for popup description column^(s^) | |
echo.# type: color | |
echo.color.popup_desc = | |
echo. | |
echo.# name: Prompt color | |
echo.# type: color | |
echo.color.prompt = | |
echo. | |
echo.# name: Readonly file completions | |
echo.# type: color | |
echo.color.readonly = | |
echo. | |
echo.# name: Selected completion color | |
echo.# type: color | |
echo.color.selected_completion = | |
echo. | |
echo.# name: Selection color | |
echo.# type: color | |
echo.color.selection = | |
echo. | |
echo.# name: Color for suggestion text | |
echo.# type: color | |
echo.color.suggestion = bright black | |
echo. | |
echo.# name: Unexpected argument color | |
echo.# type: color | |
echo.color.unexpected = default | |
echo. | |
echo.# name: Color for unrecognized command word | |
echo.# type: color | |
echo.color.unrecognized = | |
echo. | |
echo.# name: Log Readline terminal input and output | |
echo.# type: boolean | |
echo.debug.log_terminal = False | |
echo. | |
echo.# name: Controls duplicates in directory history | |
echo.# type: enum | |
echo.# options: add,erase_prev | |
echo.directories.dupe_mode = add | |
echo. | |
echo.# name: Add enhancements to Doskey | |
echo.# type: boolean | |
echo.doskey.enhanced = True | |
echo. | |
echo.# name: Include aliases | |
echo.# type: boolean | |
echo.exec.aliases = True | |
echo. | |
echo.# name: Include CMD commands | |
echo.# type: boolean | |
echo.exec.commands = True | |
echo. | |
echo.# name: Match executables in current directory | |
echo.# type: boolean | |
echo.exec.cwd = True | |
echo. | |
echo.# name: Include directories | |
echo.# type: boolean | |
echo.exec.dirs = True | |
echo. | |
echo.# name: Enable executable matching for 'complete' | |
echo.# type: boolean | |
echo.exec.enable = True | |
echo. | |
echo.# name: Include files | |
echo.# type: boolean | |
echo.exec.files = False | |
echo. | |
echo.# name: Match executables in PATH | |
echo.# type: boolean | |
echo.exec.path = True | |
echo. | |
echo.# name: Whitespace prefix matches files | |
echo.# type: boolean | |
echo.exec.space_prefix = True | |
echo. | |
echo.# name: Include hidden files | |
echo.# type: boolean | |
echo.files.hidden = True | |
echo. | |
echo.# name: Include system files | |
echo.# type: boolean | |
echo.files.system = False | |
echo. | |
echo.# name: Perform history expansion automatically | |
echo.# type: boolean | |
echo.history.auto_expand = True | |
echo. | |
echo.# name: Commands not automatically added to the history | |
echo.# type: string | |
echo.history.dont_add_to_history_cmds = exit history | |
echo. | |
echo.# name: Controls how duplicate entries are handled | |
echo.# type: enum | |
echo.# options: add,ignore,erase_prev | |
echo.history.dupe_mode = erase_prev | |
echo. | |
echo.# name: Sets how command history expansion is applied | |
echo.# type: enum | |
echo.# options: off,on,not_squoted,not_dquoted,not_quoted | |
echo.history.expand_mode = not_quoted | |
echo. | |
echo.# name: Skip adding lines prefixed with whitespace | |
echo.# type: boolean | |
echo.history.ignore_space = True | |
echo. | |
echo.# name: The number of history lines to save | |
echo.# type: integer | |
echo.history.max_lines = 10000 | |
echo. | |
echo.# name: Save history between sessions | |
echo.# type: boolean | |
echo.history.save = True | |
echo. | |
echo.# name: Share history between instances | |
echo.# type: boolean | |
echo.history.shared = False | |
echo. | |
echo.# name: Show preview of history expansion at cursor | |
echo.# type: boolean | |
echo.history.show_preview = True | |
echo. | |
echo.# name: Makes it easy to replay a series of commands | |
echo.# type: boolean | |
echo.history.sticky_search = False | |
echo. | |
echo.# name: Format for showing history times | |
echo.# type: string | |
echo.history.time_format = %%F %%T | |
echo. | |
echo.# name: History item timestamps | |
echo.# type: enum | |
echo.# options: off,save,show | |
echo.history.time_stamp = off | |
echo. | |
echo.# name: Breaks into Lua debugger on Lua errors | |
echo.# type: boolean | |
echo.lua.break_on_error = False | |
echo. | |
echo.# name: Breaks into Lua debugger on traceback | |
echo.# type: boolean | |
echo.lua.break_on_traceback = False | |
echo. | |
echo.# name: Enables Lua debugging | |
echo.# type: boolean | |
echo.lua.debug = False | |
echo. | |
echo.# name: 'require' search path | |
echo.# type: string | |
echo.lua.path = | |
echo. | |
echo.# name: Reload scripts on every prompt | |
echo.# type: boolean | |
echo.lua.reload_scripts = False | |
echo. | |
echo.# name: Fail on argument errors | |
echo.# type: boolean | |
echo.lua.strict = True | |
echo. | |
echo.# name: Prints stack trace on Lua errors | |
echo.# type: boolean | |
echo.lua.traceback_on_error = False | |
echo. | |
echo.# name: Expand abbreviated paths when completing | |
echo.# type: boolean | |
echo.match.expand_abbrev = True | |
echo. | |
echo.# name: Expand envvars when completing | |
echo.# type: boolean | |
echo.match.expand_envvars = False | |
echo. | |
echo.# name: Fits match columns to screen width | |
echo.# type: boolean | |
echo.match.fit_columns = True | |
echo. | |
echo.# name: Accent insensitive matching | |
echo.# type: boolean | |
echo.match.ignore_accent = True | |
echo. | |
echo.# name: Case insensitive matching | |
echo.# type: enum | |
echo.# options: off,on,relaxed | |
echo.match.ignore_case = relaxed | |
echo. | |
echo.# name: Limits fitted columns by number of matches | |
echo.# type: integer | |
echo.match.max_fitted_matches = 0 | |
echo. | |
echo.# name: Max rows in clink-select-complete | |
echo.# type: integer | |
echo.match.max_rows = 0 | |
echo. | |
echo.# name: Preview rows | |
echo.# type: integer | |
echo.match.preview_rows = 5 | |
echo. | |
echo.# name: Where to sort matching directories | |
echo.# type: enum | |
echo.# options: before,with,after | |
echo.match.sort_dirs = with | |
echo. | |
echo.# name: Try substring if no prefix matches | |
echo.# type: boolean | |
echo.match.substring = False | |
echo. | |
echo.# name: Translate slashes and backslashes | |
echo.# type: enum | |
echo.# options: off,system,slash,backslash | |
echo.match.translate_slashes = system | |
echo. | |
echo.# name: Match ? and * wildcards when completing | |
echo.# type: boolean | |
echo.match.wild = True | |
echo. | |
echo.# name: Enables asynchronous prompt refresh | |
echo.# type: boolean | |
echo.prompt.async = True | |
echo. | |
echo.# name: Controls when past prompts are collapsed | |
echo.# type: enum | |
echo.# options: off,always,same_dir | |
echo.prompt.transient = off | |
echo. | |
echo.# name: Suppress stderr from the Readline library | |
echo.# type: boolean | |
echo.readline.hide_stderr = False | |
echo. | |
echo.# name: Adjusts the cursor visibility and shape | |
echo.# type: boolean | |
echo.terminal.adjust_cursor_style = True | |
echo. | |
echo.# name: Color emoji support in terminal | |
echo.# type: enum | |
echo.# options: off,on,auto | |
echo.terminal.color_emoji = auto | |
echo. | |
echo.# name: Use special sequences for Ctrl-H, -I, -M, -^[ | |
echo.# type: boolean | |
echo.terminal.differentiate_keys = False | |
echo. | |
echo.# name: East Asian Ambiguous character widths | |
echo.# type: enum | |
echo.# options: font,one,two,auto | |
echo.terminal.east_asian_ambiguous = auto | |
echo. | |
echo.# name: Controls VT emulation | |
echo.# type: enum | |
echo.# options: native,emulate,auto | |
echo.terminal.emulation = auto | |
echo. | |
echo.# name: Clink mouse input | |
echo.# type: enum | |
echo.# options: off,on,auto | |
echo.terminal.mouse_input = auto | |
echo. | |
echo.# name: Modifier keys for mouse input | |
echo.# type: string | |
echo.terminal.mouse_modifier = | |
echo. | |
echo.# name: Esc sends a literal escape character | |
echo.# type: boolean | |
echo.terminal.raw_esc = False | |
echo. | |
echo.# name: Support Windows' Ctrl-Alt substitute for AltGr | |
echo.# type: boolean | |
echo.terminal.use_altgr_substitute = False | |
echo. | |
GOTO :EOF | |
:CLINK_SETTINGS_READ | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: autosuggest.async | |
echo. Description: Enable asynchronous suggestions | |
echo. Value: True | |
echo. | |
echo.The default is 'true'. When this is 'true' matches are generated | |
echo.asynchronously for suggestions. This helps to keep typing responsive. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: autosuggest.enable | |
echo. Description: Enable automatic suggestions | |
echo. Value: False | |
echo. | |
echo.The default is 'false'. When this is 'true' a suggested command may appear | |
echo.in the 'color.suggestion' color after the cursor. If the suggestion isn't | |
echo.what you want, just ignore it. Or accept the whole suggestion with the Right | |
echo.arrow or End key, accept the next word of the suggestion with Ctrl+Right, or | |
echo.accept the next full word of the suggestion up to a space with Shift+Right. | |
echo.The 'autosuggest.strategy' setting determines how a suggestion is chosen. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: autosuggest.original_case | |
echo. Description: Accept original capitalization | |
echo. Value: True | |
echo. | |
echo.When this is enabled ^(the default^), accepting a suggestion uses the | |
echo.original capitalization from the suggestion. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: autosuggest.strategy | |
echo. Description: Controls how suggestions are chosen | |
echo. Value: match_prev_cmd history completion | |
echo. | |
echo.This determines how suggestions are chosen. The suggestion generators are | |
echo.tried in the order listed, until one provides a suggestion. There are three | |
echo.built-in suggestion generators, and scripts can provide new ones. | |
echo.'history' chooses the most recent matching command from the history. | |
echo.'completion' chooses the first of the matching completions. | |
echo.'match_prev_cmd' chooses the most recent matching command whose preceding | |
echo.history entry matches the most recently invoked command, but only when | |
echo.the 'history.dupe_mode' setting is 'add'. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: clink.autostart | |
echo. Description: Command to run when injected | |
echo. Value: | |
echo. | |
echo.This command is automatically run when the first CMD prompt is shown after | |
echo.Clink is injected. If this is blank ^(the default^), then Clink instead looks | |
echo.for clink_start.cmd in the binaries directory and profile directory and runs | |
echo.them. Set it to "nul" to not run any autostart command. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: clink.autoupdate | |
echo. Description: Auto-update the Clink program files | |
echo. Value: True | |
echo. | |
echo.When enabled, periodically checks for updates for the Clink program files. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: clink.colorize_input | |
echo. Description: Colorize the input text | |
echo. Value: True | |
echo. | |
echo.When enabled, this colors the words in the input line based on the argmatcher | |
echo.Lua scripts. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: clink.default_bindings | |
echo. Description: Selects default key bindings | |
echo. Options: bash,windows | |
echo. Value: bash | |
echo. | |
echo.Clink uses bash key bindings when this is set to 'bash' ^(the default^). | |
echo.When this is set to 'windows' Clink overrides some of the bash defaults with | |
echo.familiar Windows key bindings for Tab, Ctrl+F, Ctrl+M, and some others. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: clink.logo | |
echo. Description: Controls what startup logo to show | |
echo. Options: none,full,short | |
echo. Value: full | |
echo. | |
echo.The default is 'full' which shows the full copyright logo when Clink is | |
echo.injected. A value of 'short' shows an abbreviated startup logo with version | |
echo.information. A value of 'none' omits the startup logo entirely. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: clink.max_input_rows | |
echo. Description: Maximum rows for the input line | |
echo. Value: 0 | |
echo. | |
echo.This limits how many rows the input line can use, up to the terminal height. | |
echo.When this is 0, the terminal height is the limit. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: clink.paste_crlf | |
echo. Description: Strips CR and LF chars on paste | |
echo. Options: delete,space,ampersand,crlf | |
echo. Value: crlf | |
echo. | |
echo.Setting this to 'space' makes Clink strip CR and LF characters from text | |
echo.pasted into the current line. Set this to 'delete' to strip all newline | |
echo.characters to replace them with a space. Set this to 'ampersand' to replace | |
echo.all newline characters with an ampersand. Or set this to 'crlf' to paste all | |
echo.newline characters as-is ^(executing commands that end with newline^). | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: clink.path | |
echo. Description: Paths to load Lua scripts from | |
echo. Value: | |
echo. | |
echo.These paths will be searched for Lua scripts that provide custom | |
echo.match generation, prompt filtering, and etc. Multiple paths should be | |
echo.delimited by semicolons. Setting this loads scripts from here INSTEAD of | |
echo.from the Clink binaries directory and profile directory. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: clink.promptfilter | |
echo. Description: Enable prompt filtering by Lua scripts | |
echo. Value: True | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: clink.update_interval | |
echo. Description: Days between update checks | |
echo. Value: 5 | |
echo. | |
echo.The Clink autoupdater will wait this many days between update checks. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: cmd.admin_title_prefix | |
echo. Description: Replaces the console title prefix when elevated | |
echo. Value: | |
echo. | |
echo.This replaces the console title prefix when cmd.exe is elevated. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: cmd.altf4_exits | |
echo. Description: Pressing Alt-F4 exits session | |
echo. Value: True | |
echo. | |
echo.When enabled ^(the default^), pressing Alt-F4 exits cmd.exe. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: cmd.auto_answer | |
echo. Description: Auto-answer terminate prompt | |
echo. Options: off,answer_yes,answer_no | |
echo. Value: off | |
echo. | |
echo.Automatically answers cmd.exe's 'Terminate batch job ^(Y/N^)^?' prompts. | |
echo. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: cmd.ctrld_exits | |
echo. Description: Pressing Ctrl-D exits session | |
echo. Value: True | |
echo. | |
echo.Ctrl-D exits cmd.exe when used on an empty line. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: cmd.get_errorlevel | |
echo. Description: Retrieve last exit code | |
echo. Value: True | |
echo. | |
echo.When this is enabled, Clink runs a hidden 'echo %%errorlevel%%' command before | |
echo.each interactive input prompt to retrieve the last exit code for use by Lua | |
echo.scripts. If you experience problems, try turning this off. This is on by | |
echo.default. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: color.arg | |
echo. Description: Argument color | |
echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
echo. Value: bold | |
echo. | |
echo.The color for arguments in the input line. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: color.arginfo | |
echo. Description: Argument info color | |
echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
echo. Value: yellow | |
echo. | |
echo.Some argmatchers may show that some flags or arguments accept additional | |
echo.arguments, when listing possible completions. This color is used for those | |
echo.additional arguments. ^(E.g. the "dir" in a "-x dir" listed completion.^) | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: color.argmatcher | |
echo. Description: Argmatcher color | |
echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
echo. Value: | |
echo. | |
echo.The color for a command name that has an argmatcher. If a command name has | |
echo.an argmatcher available, then this color will be used for the command name, | |
echo.otherwise the doskey, cmd, or input color will be used. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: color.cmd | |
echo. Description: Shell command completions | |
echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
echo. Value: bold | |
echo. | |
echo.Used when Clink displays shell ^(CMD.EXE^) command completions. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: color.cmdredir | |
echo. Description: Color for ^< and ^> redirection symbols | |
echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
echo. Value: bold | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: color.cmdsep | |
echo. Description: Color for ^& and ^| command separators | |
echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
echo. Value: bold | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: color.comment_row | |
echo. Description: Color for comment row | |
echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
echo. Value: bright white on cyan | |
echo. | |
echo.The color for the comment row. During 'clink-select-complete' the comment | |
echo.row shows the "and N more matches" or "rows X to Y of Z" messages. It | |
echo.can also show how history expansion will be applied at the cursor. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: color.description | |
echo. Description: Description completion color | |
echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
echo. Value: bright cyan | |
echo. | |
echo.The default color for descriptions of completions. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: color.doskey | |
echo. Description: Doskey completions | |
echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
echo. Value: bold cyan | |
echo. | |
echo.Used when Clink displays doskey macro completions. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: color.executable | |
echo. Description: Color for executable command word | |
echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
echo. Value: | |
echo. | |
echo.When set, this is the color in the input line for a command word that is | |
echo.recognized as an executable file. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: color.filtered | |
echo. Description: Filtered completion color | |
echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
echo. Value: bold | |
echo. | |
echo.The default color for filtered completions. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: color.flag | |
echo. Description: Flag color | |
echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
echo. Value: default | |
echo. | |
echo.The color for flags in the input line. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: color.hidden | |
echo. Description: Hidden file completions | |
echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
echo. Value: | |
echo. | |
echo.Used when Clink displays file completions with the hidden attribute. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: color.histexpand | |
echo. Description: History expansion color | |
echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
echo. Value: | |
echo. | |
echo.The color for history expansions in the input line. When this is not set, | |
echo.history expansions are not colored. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: color.horizscroll | |
echo. Description: Horizontal scroll marker color | |
echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
echo. Value: | |
echo. | |
echo.Used when Clink displays ^< or ^> to indicate the input line can scroll | |
echo.horizontally when horizontal-scroll-mode is set. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: color.input | |
echo. Description: Input text color | |
echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
echo. Value: | |
echo. | |
echo.Used when Clink displays the input line text. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: color.interact | |
echo. Description: For user-interaction prompts | |
echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
echo. Value: bold | |
echo. | |
echo.Used when Clink displays text or prompts such as a pager's 'More^?'. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: color.message | |
echo. Description: Message area color | |
echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
echo. Value: default | |
echo. | |
echo.The color for the Readline message area ^(e.g. search prompt, etc^). | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: color.modmark | |
echo. Description: Modified history line mark color | |
echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
echo. Value: | |
echo. | |
echo.Used when Clink displays the * mark on modified history lines when | |
echo.mark-modified-lines is set. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: color.popup | |
echo. Description: Color for popup lists and messages | |
echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
echo. Value: | |
echo. | |
echo.Used when Clink shows a text mode popup list or message, for example when | |
echo.using the win-history-list command bound by default to F7. If not set, the | |
echo.console's popup colors are used. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: color.popup_desc | |
echo. Description: Color for popup description column^(s^) | |
echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
echo. Value: | |
echo. | |
echo.Used when Clink shows multiple columns of text in a text mode popup list. | |
echo.If not set, a color is chosen to complement the console's popup colors. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: color.prompt | |
echo. Description: Prompt color | |
echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
echo. Value: | |
echo. | |
echo.When set, this is used as the default color for the prompt. But it's | |
echo.overridden by any colors set by prompt filter scripts. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: color.readonly | |
echo. Description: Readonly file completions | |
echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
echo. Value: | |
echo. | |
echo.Used when Clink displays file completions with the readonly attribute. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: color.selected_completion | |
echo. Description: Selected completion color | |
echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
echo. Value: | |
echo. | |
echo.The color for the selected completion with the clink-select-complete command. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: color.selection | |
echo. Description: Selection color | |
echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
echo. Value: | |
echo. | |
echo.The color for selected text in the input line. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: color.suggestion | |
echo. Description: Color for suggestion text | |
echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
echo. Value: bright black | |
echo. | |
echo.The color for suggestion text to be inserted at the end of the input line. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: color.unexpected | |
echo. Description: Unexpected argument color | |
echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
echo. Value: default | |
echo. | |
echo.The color for unexpected arguments in the input line. An argument is | |
echo.unexpected if an argument matcher expected there to be no more arguments | |
echo.in the input line or if the word doesn't match any expected values. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: color.unrecognized | |
echo. Description: Color for unrecognized command word | |
echo. Syntax: 'sgr SGR_params' or '[underline bright] color on [bright] color' | |
echo. Value: | |
echo. | |
echo.When set, this is the color in the input line for a command word that is not | |
echo.recognized as a command, doskey macro, directory, argmatcher, or executable | |
echo.file. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: debug.log_terminal | |
echo. Description: Log Readline terminal input and output | |
echo. Value: False | |
echo. | |
echo.WARNING: Only turn this on for diagnostic purposes, and only temporarily! | |
echo.Having this on significantly increases the amount of information written to | |
echo.the log file. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: directories.dupe_mode | |
echo. Description: Controls duplicates in directory history | |
echo. Options: add,erase_prev | |
echo. Value: add | |
echo. | |
echo.Controls how the current directory history is updated. A value of 'add' ^(the | |
echo.default^) always adds the current directory to the directory history. A value | |
echo.of 'erase_prev' will erase any previous entries for the current directory and | |
echo.then add it to the directory history. | |
echo.Note that directory history is not saved between sessions. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: doskey.enhanced | |
echo. Description: Add enhancements to Doskey | |
echo. Value: True | |
echo. | |
echo.Enhanced Doskey adds the expansion of macros that follow '^|' and '^&' | |
echo.command separators and respects quotes around words when parsing $1...9 | |
echo.tags. Note that these features do not apply to Doskey use in Batch files. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: exec.aliases | |
echo. Description: Include aliases | |
echo. Value: True | |
echo. | |
echo.Include doskey aliases as matches. ^(See exec.enable^) | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: exec.commands | |
echo. Description: Include CMD commands | |
echo. Value: True | |
echo. | |
echo.Include CMD commands. ^(See exec.enable^) | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: exec.cwd | |
echo. Description: Match executables in current directory | |
echo. Value: True | |
echo. | |
echo.Include executables in the current directory. This is implicit if the word | |
echo.being completed is a relative path. ^(See exec.enable^) | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: exec.dirs | |
echo. Description: Include directories | |
echo. Value: True | |
echo. | |
echo.Include directories relative to the current working directory as matches. | |
echo.^(See exec.enable^) | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: exec.enable | |
echo. Description: Enable executable matching for 'complete' | |
echo. Value: True | |
echo. | |
echo.When enabled, the completion commands only match executables and directories | |
echo.when completing the first word of a line. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: exec.files | |
echo. Description: Include files | |
echo. Value: False | |
echo. | |
echo.Include files in the current working directory as matches. This includes | |
echo.executables in the current directory even when exec.cwd is off. ^(See | |
echo.exec.enable, and exec.cwd^) | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: exec.path | |
echo. Description: Match executables in PATH | |
echo. Value: True | |
echo. | |
echo.Completes executables found in the directories specified in the PATH | |
echo.environment system variable. ^(See exec.enable^) | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: exec.space_prefix | |
echo. Description: Whitespace prefix matches files | |
echo. Value: True | |
echo. | |
echo.If the line begins with whitespace then Clink bypasses executable matching | |
echo.and will do normal files matching instead. ^(See exec.enable^) | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: files.hidden | |
echo. Description: Include hidden files | |
echo. Value: True | |
echo. | |
echo.Includes or excludes files with the 'hidden' attribute set when generating | |
echo.file lists. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: files.system | |
echo. Description: Include system files | |
echo. Value: False | |
echo. | |
echo.Includes or excludes files with the 'system' attribute set when generating | |
echo.file lists. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: history.auto_expand | |
echo. Description: Perform history expansion automatically | |
echo. Value: True | |
echo. | |
echo.When enabled, history expansion is automatically performed when a command | |
echo.line is accepted ^(by pressing Enter^). When disabled, history expansion is | |
echo.performed only when a corresponding expansion command is used ^(such as | |
echo.'clink-expand-history' Alt-^, or 'clink-expand-line' Alt-Ctrl-E^). | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: history.dont_add_to_history_cmds | |
echo. Description: Commands not automatically added to the history | |
echo. Value: exit history | |
echo. | |
echo.List of commands that aren't automatically added to the history. | |
echo.Commands are separated by spaces, commas, or semicolons. Default is | |
echo."exit history", to exclude both of those commands. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: history.dupe_mode | |
echo. Description: Controls how duplicate entries are handled | |
echo. Options: add,ignore,erase_prev | |
echo. Value: erase_prev | |
echo. | |
echo.If a line is a duplicate of an existing history entry Clink will erase | |
echo.the duplicate when this is set to 'erase_prev'. A value of 'ignore' will | |
echo.not add a line to the history if it already exists, and a value of 'add' | |
echo.will always add lines. | |
echo.Note that history is not deduplicated when reading/writing to disk. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: history.expand_mode | |
echo. Description: Sets how command history expansion is applied | |
echo. Options: off,on,not_squoted,not_dquoted,not_quoted | |
echo. Value: not_quoted | |
echo. | |
echo.The '!' character in an entered line can be interpreted to introduce | |
echo.words from the history. That can be enabled and disable by setting this | |
echo.value to 'on' or 'off'. Or set this to 'not_squoted', 'not_dquoted', or | |
echo.'not_quoted' to skip any '!' character in single, double, or both quotes | |
echo.respectively. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: history.ignore_space | |
echo. Description: Skip adding lines prefixed with whitespace | |
echo. Value: True | |
echo. | |
echo.Ignore lines that begin with whitespace when adding lines in to | |
echo.the history. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: history.max_lines | |
echo. Description: The number of history lines to save | |
echo. Value: 10000 | |
echo. | |
echo.The number of history lines to save, or 0 for unlimited. | |
echo. | |
echo.Warning: The larger the history file becomes, the longer it takes to reload | |
echo.at each prompt. If it starts taking too long, then lower this setting. Or | |
echo.you can use 'clink history compact ^<num_lines^>' to force shrinking the | |
echo.history file to a smaller size. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: history.save | |
echo. Description: Save history between sessions | |
echo. Value: True | |
echo. | |
echo.Changing this setting only takes effect for new instances. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: history.shared | |
echo. Description: Share history between instances | |
echo. Value: False | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: history.show_preview | |
echo. Description: Show preview of history expansion at cursor | |
echo. Value: True | |
echo. | |
echo.When the text at the cursor is subject to history expansion, this shows a | |
echo.preview of the expanded result below the input line. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: history.sticky_search | |
echo. Description: Makes it easy to replay a series of commands | |
echo. Value: False | |
echo. | |
echo.When enabled, reusing a history line does not add the reused line to the end | |
echo.of the history, and it leaves the history search position on the reused line | |
echo.so next/prev history can continue from there ^(e.g. replaying commands via Up | |
echo.many times, Enter, Down, Enter, Down, Enter, etc^). | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: history.time_format | |
echo. Description: Format for showing history times | |
echo. Value: %%F %%T | |
echo. | |
echo.This specifies a format string to override the default string ^("%%F %%T "^) | |
echo.for showing timestamps for history items. Timestamps are shown when the | |
echo.'history.show_time' setting is enabled. This can be overridden by flags in | |
echo.the 'history' command. | |
echo. | |
echo.The format string may contain regular characters and special format | |
echo.specifiers. Format specifiers begin with a percent sign ^(%%^), and are expanded | |
echo.to their corresponding values. For a list of possible format specifiers, | |
echo.refer to the C++ strftime^(^) documentation. | |
echo. | |
echo.Some common format specifiers are: | |
echo. %%a Abbreviated weekday name for the locale ^(e.g. Thu^). | |
echo. %%b Abbreviated month name for the locale ^(e.g. Aug^). | |
echo. %%c Date and time representation for the locale. | |
echo. %%D Short MM/DD/YY date ^(e.g. 08/23/01^). | |
echo. %%F Short YYYY/MM/DD date ^(e.g. 2001-08-23^). | |
echo. %%H Hour in 24-hour format ^(00 - 23^). | |
echo. %%I Hour in 12-hour format ^(01 - 12^). | |
echo. %%m Month ^(01 - 12^). | |
echo. %%M Minutes ^(00 - 59^). | |
echo. %%p AM or PM indicator for the locale. | |
echo. %%r 12-hour clock time for the locale ^(e.g. 02:55:41 pm^). | |
echo. %%R 24-hour clock time ^(e.g. 14:55^). | |
echo. %%S Seconds ^(00 - 59^). | |
echo. %%T ISO 8601 time format HH:MM:SS ^(e.g. 14:55:41^). | |
echo. %%x Date representation for the locale. | |
echo. %%X Time representation for the locale. | |
echo. %%y Year without century ^(00 - 99^). | |
echo. %%Y Year with century ^(e.g. 2001^). | |
echo. %%%% A %% sign. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: history.time_stamp | |
echo. Description: History item timestamps | |
echo. Options: off,save,show | |
echo. Value: off | |
echo. | |
echo.The default is 'off'. When set to 'save', timestamps are saved for each | |
echo.history item but are only shown in the 'history' command when the | |
echo.'--show-time' flag is used. When set to 'show', timestamps are saved and | |
echo.are shown in 'history' unless the '--bare' flag is used. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: lua.break_on_error | |
echo. Description: Breaks into Lua debugger on Lua errors | |
echo. Value: False | |
echo. | |
echo.Breaks into the Lua debugger on Lua errors, if lua.debug is enabled. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: lua.break_on_traceback | |
echo. Description: Breaks into Lua debugger on traceback | |
echo. Value: False | |
echo. | |
echo.Breaks into the Lua debugger on traceback^(^) calls, if lua.debug is enabled. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: lua.debug | |
echo. Description: Enables Lua debugging | |
echo. Value: False | |
echo. | |
echo.Loads a simple embedded command line debugger when enabled. | |
echo.The debugger can be activated by inserting a pause^(^) call, which will act | |
echo.as a breakpoint. Or the debugger can be activated by traceback^(^) calls or | |
echo.Lua errors by turning on the lua.break_on_traceback or lua.break_on_error | |
echo.settings, respectively. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: lua.path | |
echo. Description: 'require' search path | |
echo. Value: | |
echo. | |
echo.Value to append to package.path. Used to search for Lua scripts specified | |
echo.in require^(^) statements. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: lua.reload_scripts | |
echo. Description: Reload scripts on every prompt | |
echo. Value: False | |
echo. | |
echo.When true, Lua scripts are reloaded on every prompt. When false, Lua scripts | |
echo.are loaded once. This setting can be changed while Clink is running and takes | |
echo.effect at the next prompt. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: lua.strict | |
echo. Description: Fail on argument errors | |
echo. Value: True | |
echo. | |
echo.When enabled, argument errors cause Lua scripts to fail. This may expose | |
echo.bugs in some older scripts, causing them to fail where they used to succeed. | |
echo.In that case you can try turning this off, but please alert the script owner | |
echo.about the issue so they can fix the script. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: lua.traceback_on_error | |
echo. Description: Prints stack trace on Lua errors | |
echo. Value: False | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: match.expand_abbrev | |
echo. Description: Expand abbreviated paths when completing | |
echo. Value: True | |
echo. | |
echo.Expands unambiguously abbreviated directories in a path when performing | |
echo.completion. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: match.expand_envvars | |
echo. Description: Expand envvars when completing | |
echo. Value: False | |
echo. | |
echo.Expands environment variables in a word before performing completion. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: match.fit_columns | |
echo. Description: Fits match columns to screen width | |
echo. Value: True | |
echo. | |
echo.When displaying match completions, this calculates column widths to fit as | |
echo.many as possible on the screen. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: match.ignore_accent | |
echo. Description: Accent insensitive matching | |
echo. Value: True | |
echo. | |
echo.Toggles whether accents on characters are ignored when selecting matches. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: match.ignore_case | |
echo. Description: Case insensitive matching | |
echo. Options: off,on,relaxed | |
echo. Value: relaxed | |
echo. | |
echo.Toggles whether case is ignored when selecting matches. The 'relaxed' | |
echo.option will also consider -/_ as equal. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: match.max_fitted_matches | |
echo. Description: Limits fitted columns by number of matches | |
echo. Value: 0 | |
echo. | |
echo.When 'match.fit_columns' is enabled, this disables calculating column widths | |
echo.when the number of matches exceeds this value. The default is 0 ^(unlimited^). | |
echo.Depending on the screen width and CPU speed, setting a limit may avoid delays. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: match.max_rows | |
echo. Description: Max rows in clink-select-complete | |
echo. Value: 0 | |
echo. | |
echo.The maximum number of rows the 'clink-select-complete' can use. When this | |
echo.is 0, the limit is the terminal height. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: match.preview_rows | |
echo. Description: Preview rows | |
echo. Value: 5 | |
echo. | |
echo.The number of rows to show as a preview when using the 'clink-select-complete' | |
echo.command ^(bound by default to Ctrl+Shift+Space^). When this is 0, all rows are | |
echo.shown and if there are too many matches it instead prompts first like the | |
echo.'complete' command does. Otherwise it shows the specified number of rows as | |
echo.a preview without prompting, and it expands to show the full set of matches | |
echo.when the selection is moved past the preview rows. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: match.sort_dirs | |
echo. Description: Where to sort matching directories | |
echo. Options: before,with,after | |
echo. Value: with | |
echo. | |
echo.Matching directories can go before files, with files, or after files. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: match.substring | |
echo. Description: Try substring if no prefix matches | |
echo. Value: False | |
echo. | |
echo.When set, if no completions are found with a prefix search, then a substring | |
echo.search is used. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: match.translate_slashes | |
echo. Description: Translate slashes and backslashes | |
echo. Options: off,system,slash,backslash | |
echo. Value: system | |
echo. | |
echo.File and directory completions can be translated to use consistent slashes. | |
echo.The default is 'system' to use the appropriate path separator for the OS host | |
echo.^(backslashes on Windows^). Use 'slash' to use forward slashes, or 'backslash' | |
echo.to use backslashes. Use 'off' to turn off translating slashes from custom | |
echo.match generators. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: match.wild | |
echo. Description: Match ^? and * wildcards when completing | |
echo. Value: True | |
echo. | |
echo.Matches ^? and * wildcards and leading . characters when using any of the | |
echo.completion commands. Turn this off to behave how bash does, and not match | |
echo.wildcards or leading dots. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: prompt.async | |
echo. Description: Enables asynchronous prompt refresh | |
echo. Value: True | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: prompt.transient | |
echo. Description: Controls when past prompts are collapsed | |
echo. Options: off,always,same_dir | |
echo. Value: off | |
echo. | |
echo.The default is 'off' which never collapses past prompts. Set to 'always' to | |
echo.always collapse past prompts. Set to 'same_dir' to only collapse past prompts | |
echo.when the current working directory hasn't changed since the last prompt. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: readline.hide_stderr | |
echo. Description: Suppress stderr from the Readline library | |
echo. Value: False | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: terminal.adjust_cursor_style | |
echo. Description: Adjusts the cursor visibility and shape | |
echo. Value: True | |
echo. | |
echo.Normally Clink adjusts the cursor visibility and shape, but that will override | |
echo.the Cursor Shape settings for the default Windows console. Disabling this | |
echo.lets the Cursor Shape settings work, but then Clink can't show Insert Mode via | |
echo.the cursor shape, the 'visible bell' setting doesn't work, Clink can't support | |
echo.the ANSI escape codes for cursor shape, and the cursor may flicker or flash | |
echo.strangely while typing. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: terminal.color_emoji | |
echo. Description: Color emoji support in terminal | |
echo. Options: off,on,auto | |
echo. Value: auto | |
echo. | |
echo.Set this to indicate whether the terminal program draws emoji using colored | |
echo.double width characters. This needs to be set accurately in order for Clink | |
echo.to display the input line properly when it contains emoji characters. | |
echo.When set to 'off' Clink assumes emoji are rendered using 1 character cell. | |
echo.When set to 'on' Clink assumes emoji are rendered using 2 character cells. | |
echo.When set to 'auto' ^(the default^) Clink assumes emoji are rendered using 2 | |
echo.character cells when using Windows Terminal or WezTerm, or otherwise using 1 | |
echo.character cell. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: terminal.differentiate_keys | |
echo. Description: Use special sequences for Ctrl-H, -I, -M, -[ | |
echo. Value: False | |
echo. | |
echo.When enabled, pressing Ctrl-H or Ctrl-I or Ctrl-M or Ctrl-[ generate special | |
echo.key sequences to enable binding them separately from Backspace or Tab or | |
echo.Enter or Escape. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: terminal.east_asian_ambiguous | |
echo. Description: East Asian Ambiguous character widths | |
echo. Options: font,one,two,auto | |
echo. Value: auto | |
echo. | |
echo.There is a group of East Asian characters whose widths are ambiguous in the | |
echo.Unicode standard. This setting controls how to resolve the ambiguous widths. | |
echo.By default this is set to 'auto', but some terminal hosts may require setting | |
echo.this to a different value to work around limitations in the terminal hosts. | |
echo. | |
echo.Setting this to 'font' measures the East Asian Ambiguous character widths | |
echo.using the current font. Setting it to 'one' uses 1 as the width, or 'two' | |
echo.uses 2 as the width. When this is 'auto' ^(the default^) and the current code | |
echo.page is 932, 936, 949, or 950 then it tries to automatically measure the width | |
echo.based on which terminal host and font are used, or for any other code pages | |
echo.^(including UTF8^) it uses 1 as the width. | |
echo. | |
echo.The %%CLINK_EAST_ASIAN_AMBIGUOUS%% environment variable overrides this setting. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: terminal.emulation | |
echo. Description: Controls VT emulation | |
echo. Options: native,emulate,auto | |
echo. Value: auto | |
echo. | |
echo.Clink can emulate Virtual Terminal processing if the console doesn't | |
echo.natively. When set to 'emulate' then Clink performs VT emulation and handles | |
echo.ANSI escape codes. When 'native' then Clink passes output directly to the | |
echo.console. Or when 'auto' then Clink performs VT emulation unless native | |
echo.terminal support is detected ^(such as when hosted inside ConEmu, Windows | |
echo.Terminal, WezTerm, or Windows 10 new console, or when using ANSICON^). | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: terminal.mouse_input | |
echo. Description: Clink mouse input | |
echo. Options: off,on,auto | |
echo. Value: auto | |
echo. | |
echo.Clink can optionally respond to mouse input, instead of letting the terminal | |
echo.respond to mouse input ^(e.g. to select text on the screen^). When mouse input | |
echo.is enabled in Clink, clicking in the input line sets the cursor position, and | |
echo.clicking in popup lists selects an item, etc. | |
echo. | |
echo.'off' lets the terminal host handle mouse input. | |
echo.'on' lets Clink handle mouse input. | |
echo.'auto' lets Clink handle mouse input in ConEmu and in the default Conhost | |
echo.terminal when Quick Edit mode is unchecked in the console Properties dialog. | |
echo. | |
echo.NOTES: | |
echo.- ConEmu does not let Clink respond to the mouse wheel. | |
echo.- Windows Terminal does not let Clink scroll the terminal, but you can scroll | |
echo. by holding Shift or Alt while using the mouse wheel. | |
echo.- Holding Shift, Ctrl, or Alt while clicking allows the normal terminal mouse | |
echo. input to still work ^(for example, to select text on the screen^). | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: terminal.mouse_modifier | |
echo. Description: Modifier keys for mouse input | |
echo. Value: | |
echo. | |
echo.This selects which modifier keys ^(Alt, Ctrl, Shift^) must be held in order | |
echo.for Clink to respond to mouse input when mouse input is enabled by the | |
echo.'terminal.mouse_input' setting. | |
echo. | |
echo.This is a text string that can list one or more modifier keys: 'alt', 'ctrl', | |
echo.and 'shift'. For example, setting it to "alt shift" causes Clink to only | |
echo.respond to mouse input when both Alt and Shift are held ^(and not Ctrl^). | |
echo.If the %%CLINK_MOUSE_MODIFIER%% environment variable is set then its value | |
echo.supersedes this setting. | |
echo. | |
echo.Note that in the default Conhost terminal when Quick Edit mode is turned off | |
echo.then Clink will also respond to mouse input when no modifier keys are held. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: terminal.raw_esc | |
echo. Description: Esc sends a literal escape character | |
echo. Value: False | |
echo. | |
echo.When disabled ^(the default^), pressing Esc or Alt+[ or Alt+Shift+O send unique | |
echo.key sequences to provide a predictable, reliable, and configurable input | |
echo.experience. Use 'clink echo' to find the key sequences. | |
echo. | |
echo.When this setting is enabled, then pressing those keys sends the same key | |
echo.sequences as in Unix/etc. However, they are ambiguous and conflict with the | |
echo.beginning of many other key sequences, leading to surprising or confusing | |
echo.input situations. | |
echo.Changing this only affects future Clink sessions, not the current session. | |
echo. | |
echo.# ---------------------------------------------------------------------------- | |
echo. Name: terminal.use_altgr_substitute | |
echo. Description: Support Windows' Ctrl-Alt substitute for AltGr | |
echo. Value: False | |
echo. | |
echo.Windows provides Ctrl-Alt as a substitute for AltGr, historically to | |
echo.support keyboards with no AltGr key. This may collide with some of | |
echo.Readline's bindings. | |
echo. | |
GOTO :EOF | |
:POSH_THEME_FILE | |
echo.{ | |
echo. "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
echo. "blocks": [ | |
echo. { | |
echo. "alignment": "left", | |
echo. "segments": [ | |
echo. { | |
echo. "foreground": "#FFEE58", | |
echo. "style": "plain", | |
echo. "template": " \uf0e7 ", | |
echo. "type": "root" | |
echo. }, | |
echo. { | |
echo. "foreground": "#ffffff", | |
echo. "style": "plain", | |
echo. "template": "{{ .UserName }}@{{ .HostName }} ", | |
echo. "type": "session" | |
echo. }, | |
echo. { | |
echo. "background": "#91ddff", | |
echo. "foreground": "#100e23", | |
echo. "powerline_symbol": "\ue0b0", | |
echo. "properties": { | |
echo. "style": "full" | |
echo. }, | |
echo. "style": "powerline", | |
echo. "template": " {{ .Path }} ", | |
echo. "type": "path" | |
echo. }, | |
echo. { | |
echo. "background": "#95ffa4", | |
echo. "foreground": "#193549", | |
echo. "powerline_symbol": "\ue0b0", | |
echo. "style": "powerline", | |
echo. "template": " {{ .HEAD }} ", | |
echo. "type": "git" | |
echo. }, | |
echo. { | |
echo. "background": "#906cff", | |
echo. "foreground": "#100e23", | |
echo. "powerline_symbol": "\ue0b0", | |
echo. "style": "powerline", | |
echo. "template": " \ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }} ", | |
echo. "type": "python" | |
echo. }, | |
echo. { | |
echo. "background": "#ff8080", | |
echo. "foreground": "#ffffff", | |
echo. "powerline_symbol": "\ue0b0", | |
echo. "style": "powerline", | |
echo. "template": " \ue20f ", | |
echo. "type": "exit" | |
echo. } | |
echo. ], | |
echo. "type": "prompt" | |
echo. } | |
echo. ], | |
echo. "final_space": true, | |
echo. "version": 2 | |
echo.} | |
GOTO :EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment