Comments (2)
Other shells, like Powershell or Bash, have profiles loaded on every startup that could set environment variables.
Clink isn't a shell. Clink adds a few enhancements to CMD, but the question here is more of a question about CMD itself.
so the official way to define environment variables would be inside one of those lua scripts, for example os.setenv("EDITOR", "vim") ?
There is no "official" way to define environment variables in CMD or Windows or Clink. What you noted is one way, out of many different ways.
Since you compared to .bashrc
: The way to have a script run every time CMD is launched is to use the AutoRun
regkey. But that can be dangerous, as noted in this comment where a subtle bug in an AutoRun script caused an infinite loop of launching thousands of new cmd.exe processes per second.
Clink adds another way to run a kind of "startup" script, but it's only run in a cmd.exe that injects Clink and shows a prompt at least once. See Startup Cmd Script for more information.
from clink.
(This question was originally posted in a very old issue, so I've moved it to a new issue. The original issue answers the question, but there's a newer feature that is only indirectly mentioned there.)
from clink.
Related Issues (20)
- how to insert next word from auto-suggestion ? HOT 8
- Loop bug fatal error (how to fix mistake in CMD AutoRun regkey?) HOT 6
- How to remove startup messages from CMD and Clink? HOT 6
- CTRL-C does not copy text selected using conhost mouse selection HOT 9
- Incorrect shell type in the window title: `Windows PowerShell` HOT 6
- Excessive clink execution even if `cmd.exe` called without interactive input HOT 18
- Why are commands starting with "history" always excluded from history? HOT 7
- Replace unix path separator on complete HOT 6
- Update fails with Clink 1.6.19 HOT 9
- clink_start.cmd is run twice when clink is installed in %localappdata%\clink HOT 4
- Clink incorrectly shows certain commands as quoted HOT 2
- Error in update.lua Script: Attempt to Index Local 'line' (a Number Value) at Line 106 HOT 2
- the default ocmmand line experience allows wildcard based autocompletion on hitting tab key but after installing clink it doesn't HOT 5
- How can I make argmatchers for the arguments to specific perl scripts? HOT 8
- Incremental tab completion on auto-suggestion HOT 3
- Color brightness in CMD prompt, different between Win11 and Server 2016 HOT 3
- Trouble emulating Ctrl-D as EOF HOT 6
- Not recieving 'a' key is down HOT 3
- How to override autorun for clink? HOT 14
- Wrong cursor position when CD contains non-printable characters HOT 23
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clink.