Wanted to get an MSYS2 shell inside ConsoleZ rather than being forced to use whatever the fuck terminal emulator it has by default.

Figured out I can do that with 2 lines of cursed bullshit in a Windows batch script:

set PATH=C:\msys64\usr\bin;C:\msys64\usr\local\bin;%PATH:;;=;%
bash -c 'cd ^&^& exec $(getent passwd "%USERNAME%" ^| cut -d: -f7) --login'

This cursed batch script
+ creating an /etc/passwd in MSYS2 and changing my shell
+ setting up Starship (which required some weird bullshit)

= nice shell environment in Windows

:blobcatsip:

Follow

The aforementioned weird bullshit to get Starship to work nicely is because Starship on Windows doesn't know jack shit about MSYS2 (even when compiled with Cargo inside MSYS2), so there's a couple little config changes, plus explicitly setting the STARSHIP_CONFIG environment variable in ~/.profile

starship.toml:

[directory]
use_logical_path = false
[directory.substitutions]
"C:/msys64/" = "/"
"/home/Iris System" = "~"

· · Web · 0 · 0 · 1
Sign in to participate in the conversation
Cybrespace

the mastodon instance at cybre.space is retiring

see the end-of-life plan for details: https://cybre.space/~chr/cybre-space-eol