Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support default user; use emojis and fallback to Nerd Font #8

Merged
merged 1 commit into from
Jan 25, 2025

Conversation

patrickdappollonio
Copy link
Owner

This PR performs two main changes:

gc-rust now can find if a GC_GITHUB_USERNAME or GITHUB_USERNAME is set, and if so, use that as the username of the command-line prompt. So for me, if I want to clone this repo or, say, http-server I can simply set my GITHUB_USERNAME to `patrickdappollonio and run:

# set my username
export GITHUB_USERNAME=patrickdappollonio

# to clone github.com/patrickdappollonio/gc-rust
gc-rust gc-rust 

# to clone github.com/patrickdappollonio/http-server
gc-rust http-server 

(If you're using the bash function, you need to replace gc-rust with `gc).

The second change is that several users reported issues with the Nerd Font glyphs used in their terminals. Not everyone has a patched Nerd Font set. To keep this behaviour backwards-compatible, we'll do the following:

  • We'll prefer rendering emojis whenever your terminal reports emojis are supported
  • We'll fallback to Nerd Font glyphs whenever possible

This makes it friendly for use on new versions of the Gnome shell, Konsole or even the default Terminal.app on macOS (or the new Ghostty).

@patrickdappollonio patrickdappollonio self-assigned this Jan 25, 2025
@patrickdappollonio patrickdappollonio merged commit cf119a8 into main Jan 25, 2025
1 check passed
@patrickdappollonio patrickdappollonio deleted the use-emoji-nerd-font branch January 25, 2025 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant