runex 0.1.3

Cross-shell abbreviation engine that expands short tokens into full commands
runex-0.1.3 is not a library.

runex

Turn runes into commands.

runex is a cross-shell abbreviation engine that expands short tokens into full commands in real time.

runex demo

Install

cargo install runex

If runex is not found after install, make sure Cargo's bin directory is on your PATH:

  • Unix-like shells: ~/.cargo/bin
  • Windows: %USERPROFILE%\.cargo\bin

Shells

  • bash
  • zsh
  • pwsh
  • cmd via Clink
  • nu is currently experimental

Setup

bash

~/.bashrc:

eval "$(runex export bash)"

zsh

~/.zshrc:

eval "$(runex export zsh)"

PowerShell

$PROFILE:

Invoke-Expression ((& runex export pwsh) -join "`n")

cmd (Clink)

%LOCALAPPDATA%\clink\runex.lua:

runex export clink > %LOCALAPPDATA%\clink\runex.lua

Config

version = 1

[keybind]
trigger = "space"

[[abbr]]
key = "gcm"
expand = "git commit -m"

[[abbr]]
key = "ll"
expand = "lsd -l"

expand is passed through as shell-native text. If you need literal $ or other metacharacters, quote or escape them for the shell that will execute the command.

Commands

runex expand --token gcm
runex list
runex doctor
runex export bash

Generated shell scripts and your config.toml become part of your local shell environment. Only load files you trust.

Full documentation: https://github.com/ShortArrow/runex