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

Username module displays Administrator instead of my username in Windows MSYS2 shell. #6339

Open
Mossop opened this issue Oct 21, 2024 · 0 comments
Labels
🐛 bug Something isn't working as expected.

Comments

@Mossop
Copy link

Mossop commented Oct 21, 2024

pkg_version:1.20.1
branch:master
commit_hash:f505324
build_time:2024-07-27 09:12:42 +00:00
build_env:rustc 1.80.0 (051478957 2024-07-21),stable-x86_64-pc-windows-msvc

Generated bug report:

Current Behavior

The username module displays Administrator on Windows. While my user account is in the administrator group I would prefer it display my actual username.

Expected Behavior

Displays Dave

Additional context/Screenshots

Possible Solution

Environment

  • Starship version: 1.20.1
  • bash version: GNU bash, version 5.2.21(1)-release (x86_64-pc-msys)
    Copyright (C) 2022 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

  • Operating system: Windows 10.0.22631
  • Terminal emulator: vscode 1.94.2
  • Git Commit Hash: f505324
  • Branch/Tag: master
  • Rust Version: rustc 1.80.0 (051478957 2024-07-21)
  • Rust channel: stable-x86_64-pc-windows-msvc release
  • Build Time: 2024-07-27 09:12:42 +00:00

Relevant Shell Configuration

source "/c/Users/Dave/dotfiles/scripts/bashrc.sh" # dotfiles-init

Starship Configuration

"$schema" = 'https://starship.rs/config-schema.json'

format = '''$username[@](bold green)$hostname$custom
$git_branch$git_state$directory$character'''

[hostname]
ssh_only = false
style = 'bold green'
format = '[$hostname$ssh_symbol]($style) '
ssh_symbol = ' 🌐'

[username]
show_always = true
format = '[$user]($style)'
style_user = 'bold green'

[directory]
format = '[$path]($style)[$read_only]($read_only_style)'
truncation_length = 1

[git_branch]
format = '[\[$branch(:$remote_branch)\]]($style) '
style = 'bold yellow'

[custom.mozbuild]
command = "$BUILD_BASE/bin/prompt"
when = '[ ! -z "$BUILD_BASE" ]'
style = 'bold yellow'

[character]
success_symbol = '[❯](bold green)'
error_symbol = '[❯](bold green)'
@Mossop Mossop added the 🐛 bug Something isn't working as expected. label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working as expected.
Projects
None yet
Development

No branches or pull requests

1 participant