Code Monkey home page Code Monkey logo

Comments (2)

chrisant996 avatar chrisant996 commented on September 24, 2024 1

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.

chrisant996 avatar chrisant996 commented on September 24, 2024

(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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.