mridgers / clink

Bash's powerful command line editing in cmd.exe
mridgers.github.io/clink
GNU General Public License v3.0
3.22k stars 283 forks source link

[QUESTION] Is it possible to set environment variables via Lua scripts? #484

Open YigitDincer opened 6 years ago

YigitDincer commented 6 years ago

I want to set an environment variable if a specific command is entered in Clink shell. Is it somehow possible?

E.g. the user enters in Clink 'start'. This command should set the environment variable START_CALLED to 1. This value will be read later on and set back to 0. So I need a possibility to read the given command and react to it via lua scripts/functions.

chrisant996 commented 3 years ago

That's possible in the fork at chrisant996/clink. See the clink.onendedit() Lua function.