mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-02 15:17:47 +00:00
refactor: ✨ (#418)
* refactor: ✨ move in one commit Eveything in modules should probably be changed to `exported` defs. The idea is to move everything first to keep proper history. * refactor: 📝 add modules readme (wip) * refactor: ✨ small move * refactor: 📝 changed nestring, updated modules readme * refactor: 📝 to document or not to document * fix: 🐛 themes replaced the template to use `main` and regenerated them from lemnos themes. * Revert "fix: 🐛 themes" This reverts commit 4918d3633c8d2d81950a0ed0cfd9eb84241bc886. * refactor: ✨ introduce sourced - Created a source `root` in which sourcable demos are stored. Some might get converted to modules later on. - Moved some files to bin too. * fix: 🐛 fehbg.nu * fix: 🐛 modules/after.nu * moved some other stuff around --------- Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
This commit is contained in:
parent
382696cd21
commit
c47ccd42b8
128 changed files with 185 additions and 12 deletions
43
modules/virtual_environments/nu_msvs/README.md
Normal file
43
modules/virtual_environments/nu_msvs/README.md
Normal file
|
@ -0,0 +1,43 @@
|
|||
# MSVS Module for Nushell
|
||||
A module for Using Microsoft Visual Studio (MSVS) command line tools from Nushell.
|
||||
|
||||
|
||||
## Prerequisites
|
||||
- [nushell](https://github.com/nushell/nushell) >= 0.73.0
|
||||
- [vswhere](https://github.com/microsoft/vswhere) standalone or comes with VS
|
||||
|
||||
|
||||
## Installation
|
||||
Put `nu_msvs.nu` into the module folder of your nushell configuration workspace.
|
||||
|
||||
|
||||
## Usage
|
||||
```nu
|
||||
use nu_msvs.nu
|
||||
nu_msvs activate # Use 'nu_msvs activate --help' to see all available options
|
||||
nu_msvs deactivate
|
||||
```
|
||||
|
||||
|
||||
## How It Works
|
||||
MSVS provides scripts (such as `vsdevcmd.bat` and `vsvarsall.bat`) for
|
||||
developers to use its command line tools (such as `cl.exe`) in Command Prompt
|
||||
and Powershell, but these scripts are not available for nushell. One method to
|
||||
use MSVS command line tools in nushell was described in nushell/nushell#5803,
|
||||
which requires launching nushell within an Command Prompt/Powershell instance.
|
||||
However, running `vsdevcmd.bat` or launching Powershell is quite slow.
|
||||
Therefore, `nu_msvs.nu` is introduced and works similar to a virtual
|
||||
environment.
|
||||
|
||||
When activating the MSVS environment (take MSVC tools for example):
|
||||
1. Necessary path are added to `PATH`/`Path` to allow command line tools (e.g.
|
||||
`cl.exe`) to be run in nushell.
|
||||
2. An environment variable `INCLUDE` is defined and consists of Win32 header
|
||||
directories, which will be used by `cl.exe`.
|
||||
3. An environment variable `LIB` is defined and consists of Win32 library
|
||||
directories, which will be used by `link.exe`.
|
||||
|
||||
|
||||
## Supported Tools
|
||||
- [x] MSVC
|
||||
- [ ] ...
|
Loading…
Add table
Add a link
Reference in a new issue