Skip to content

RadAd/RadLine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

5c63c30 · May 19, 2025
Apr 14, 2025
Nov 10, 2022
May 19, 2025
Mar 26, 2025
May 19, 2025
Jul 28, 2020
Mar 5, 2024
Apr 15, 2025
May 19, 2025
May 19, 2025
Mar 5, 2024
Apr 9, 2025
May 19, 2025
Apr 9, 2025
May 19, 2025

Repository files navigation

RadLine

Improved command line completion for cmd.exe

Windows Releases commits-since Build

Dependencies

Minhook

Details

RLoadDll.exe injects the RadLine.dll into cmd.exe process.

On startup the RadLine.dll replaces the ReadConsole function with its own. This allows it to intercept the command line completion behaviour.

Command line completion

This was the main reason for creating this utility. Completion is looked up using the lua script RadLine.lua. The function FindPotential is called with the current command line and returns an array of potential matches. The matches are then listed under the current line.

Auto terminate batch file

To enable:

set RADLINE_AUTO_TERMINATE_BATCH=1

This setting will auto-respond y to the Terminate batch job (Y/N)? prompt.

Expand Tilde

The ~ at the start of an argument is expanded to %USERPROFILE%.

Pre command execution

The contents of the environment variable RADLINE_PRE are prepended to the current command.

For example:

set RADLINE_PRE=echo Start

Post command execution

The contents of the environment variable RADLINE_POST are appended to the current command.

For example:

set RADLINE_POST=echo Error: ^%ERRORLEVEL^%

Dynamic environment variables

__PID__ will show the process id of the cmd process.

PROMPT environment variables in the prompt variable will also be expanded.

set foo=%(cmd /c echo bar)% the command in the brackets will expand to the output of the command.

Install

To install, download the zip and decompress to %APPDATA%\Radsoft\RadLine

Add the following lines to your cmd startup script:

set RADLINEDIR=%APPDATA%\Radsoft\RadLine
"%RADLINEDIR%\RLoadDll.exe" /d - "%RADLINEDIR%\RadLine.dll"

About

Improved command line completion for cmd.exe

Topics

Resources

Stars

Watchers

Forks