Re:My Windows Computer Just Doesn't Feel Like Mine Anymore
by blooalien on Saturday June 22, 2024 @02:47AM
(#40756958)
Starship is just a fancy prompt that just happens to be crazy cross-platform (works on Linux, MacOS, and Windows shells), but it's super-informative, and easy to install/configure. Beyond that, you'll still need to choose a shell you prefer for when you want/need to use a terminal/console window for things. Contrary to popular belief, the shell is not obsolete by a longshot, even on Windows. On Windows, PowerShell is probably gonna be your best bet, as it's the current standard going forward. I use Starship on Fish shell on Linux and love it.
Re:My Windows Computer Just Doesn't Feel Like Mine Anymore
by d_tr on Saturday June 22, 2024 @04:04AM
(#40757299)
Have you tried MSYS2? It even uses pacman for package management!
Re:My Windows Computer Just Doesn't Feel Like Mine Anymore
by sandreas on Saturday June 22, 2024 @05:30AM
(#40757646)
Besides git bash you could also use wsl, like in:
wsl ls -lsa
wsl cat file.txt
Basically, starship is a config generator for your shell. It transforms a cross platform config file (starship.toml) into a platform specific configuration shell script, e.g.: starship init zsh
will output something like zmodload zsh/parameter # Needed to access jobstates variable for STARSHIP_JOBS_COUNT
# Defines a function `__starship_get_time` that sets the time since epoch in millis in STARSHIP_CAPTURED_TIME.
if [[ $ZSH_VERSION == ([1-4]*) ]]; then
# ZSH <= 5; Does not have a built-in variable so we will rely on Starship's inbuilt time function.
__starship_get_time() {
STARSHIP_CAPTURED_TIME=$(/home/andreas/bin/starship time)
}
else
zmodload zsh/datetime
zmodload zsh/mathfunc
__starship_get_time() {
(( STARSHIP_CAPTURED_TIME = int(rint(EPOCHREALTIME * 1000)) ))
}
fi
# ...
# ...
For PowerShell the output will look accordingly - the config stays the same. I've had a bunch of custom zsh / powershell config dotfiles for years now, starship just eases it out :-)
Re:My Windows Computer Just Doesn't Feel Like Mine Anymore
by red-iron-pine on Saturday June 22, 2024 @08:36AM
(#40758682)
powershell is light years easier than bash. like, im fluent in bash enough to get stuff done, but i only got there over years, while i picked up powershell fairly quickly. also wayyyyy more readable.
i'll admit the object vs text thing is annoying, i feel like bash is more straightforward there, but PS will let you do the same thing eventually.
Re:My Windows Computer Just Doesn't Feel Like Mine Anymore
by nativeit on Saturday June 22, 2024 @12:49PM
(#40760355)
My experience is almost exactly inverted. WTF is Invoke? Am I a sorcerer? I want to call a function, I think…
Re:My Windows Computer Just Doesn't Feel Like Mine Anymore
by sandreas on Saturday June 22, 2024 @01:38PM
(#40760698)
I would have thought Microsoft on is dotnet multi-platform journey would find a way to make PowerShell just POSIX compatible, supporting at least standard all day commands like `grep`, `wc`, `find` and others. All it would have taken is to create aliases or replacements for the top 50 shell commands.
Instead they re-invented the wheel. It's not a bad wheel, but the wheel is completely different than most people would expected to be and for POSIX enthusiast it just does not feel right.
With wsl or git bash you can do this but it feels slow and clunky most of the time.
Starship seems quite promising, this is the first time I'm seeing it. But I'm a bit confused on how it works, can you go into a bit more details?
Can I use starship+ps to get all Unix and git tools or should I stick with my existing workflow with windows git bash?