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

git_state showing symbols outside of git repo #5957

Open
PedroJoaoPereira opened this issue May 3, 2024 · 1 comment
Open

git_state showing symbols outside of git repo #5957

PedroJoaoPereira opened this issue May 3, 2024 · 1 comment
Labels
🐛 bug Something isn't working as expected.

Comments

@PedroJoaoPereira
Copy link

Current Behavior

git_status module is showing a deleted file outside a git repo - inside /etc/portage

Expected Behavior

git_status module to be disabled

Additional context/Screenshots

NA

Possible Solution

NA

Environment

  • Starship version: 1.17.1
  • bash version: GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)
    Copyright (C) 2020 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: Gentoo Linux 2.15
  • Terminal emulator: Alacritty
  • Git Commit Hash:
  • Branch/Tag:
  • Rust Version: rustc 1.77.1 (7cf61ebde 2024-03-27)
  • Rust channel: release
  • Build Time: 2024-04-29 15:49:43 +01:00

Relevant Shell Configuration

# /etc/skel/.bashrc
#
# This file is sourced by all *interactive* bash shells on startup,
# including some apparently interactive shells such as scp and rcp
# that can't tolerate any output.  So make sure this doesn't display
# anything or bad things will happen !


# Test for an interactive shell.  There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
# outputting anything in those cases.
if [[ $- != *i* ]] ; then
	# Shell is non-interactive.  Be done now!
	return
fi


# Put your fun stuff here.
# ----- ----- ----- -----

# start hyprland on boot
if [[ -z "${WAYLAND_DISPLAY}" && "${XDG_VTNR}" -eq 1 ]]; then
	2>/dev/null 1>&2 dbus-run-session Hyprland
fi

# change starship configuration location
export STARSHIP_CONFIG=~/.config/starship/starship.toml
# add starship prompt customization
eval "$(starship init bash)"
# add zoxide to shell - a smarter cd
eval "$(zoxide init --cmd cd bash)"

# alias
alias ls='eza --long --icons=always --all --git' # alias for ls with eza
alias vi='nvim' # alias for neovim

Starship Configuration

# starship prompt customization
# https://starship.rs/config/

# add padded timeout to avoid boot warnings
command_timeout = 1000
# inserts a blank line between shell prompts
add_newline = false

# customize prompt
format = '$directory$git_branch$git_commit$git_state$git_status$cmd_duration$character'

# https://starship.rs/config/#directory
[directory]
truncation_length = 0

# https://starship.rs/config/#git-branch
[git_branch]
format = '[$branch(:$remote_branch)]($style) '
only_attached = true

# https://starship.rs/config/#git-commit
[git_commit]
format = '[$hash](purple)[$tag]($style)'
style = 'bold purple'
tag_disabled = false
tag_symbol = ' '

# https://starship.rs/config/#git-state
[git_state]
format = '[ $state( $progress_current/$progress_total)]($style) '

# https://starship.rs/config/#git-status
[git_status]
format = '([$conflicted$stashed]($style)[$deleted$renamed$modified$typechanged$staged$untracked](bold yellow)[$ahead_behind](bold cyan) )'
conflicted = '!'
modified = '*'

# https://starship.rs/config/#command-duration
[cmd_duration]
format = '[$duration]($style) '
style = 'bold yellow'

@PedroJoaoPereira PedroJoaoPereira added the 🐛 bug Something isn't working as expected. label May 3, 2024
@CodeConnoisseur74
Copy link

I'm also having the same issue.

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

2 participants