Skip to content

Instantly share code, notes, and snippets.

@clementi
Last active June 27, 2025 15:18
Show Gist options
  • Select an option

  • Save clementi/12866b615a1936a209d3b1ba75f14674 to your computer and use it in GitHub Desktop.

Select an option

Save clementi/12866b615a1936a209d3b1ba75f14674 to your computer and use it in GitHub Desktop.
// Show what Starship thinks the current shell is.
// To be used in starship.toml to show the current shell in the prompt.
#include <stdio.h>
#include <stdlib.h>
int main() {
const char* shell = getenv("STARSHIP_SHELL");
printf("%s\n", shell ? shell : "unk");
return EXIT_SUCCESS;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment