Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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


Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: