Skip to content

Instantly share code, notes, and snippets.

View tom-un's full-sized avatar

Tom Underhill tom-un

  • Microsoft
  • Redmond, WA
View GitHub Profile
@tom-un
tom-un / code-switch.sh
Created September 2, 2025 07:42
Script to switch between macOS Code and Code Insiders
#!/bin/zsh
# VS Code Switcher Script
# Switches the /usr/local/bin/code symlink between VS Code Stable and Insiders
STABLE_PATH="/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code"
INSIDERS_PATH="/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/bin/code"
SYMLINK_PATH="/usr/local/bin/code"
show_usage() {
@tom-un
tom-un / .prompt-line.sh
Last active September 19, 2025 08:52
Zsh prompt line with arrow like segments
# Zsh/Bash prompt line with arrow like segments
# Git branch and Node.js version prompt segment functions
# Tom Underhill, 2023
#
# The `prompt_line` function takes a list of arguments and prints them as segments with an arrow separator.
# The arguments are fg color, bg color, text, fg color, bg color, text, ...
#
# The `os_prompt` function returns a symbol for the running OS.
# The `node_version_prompt` function returns the Node.js version prompt.
# The `git_branch_prompt` function returns the current Git branch and status or nothing if not in a Git repo.