Skip to content

Commit

Permalink
chore: shell formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
snelling-a committed Sep 9, 2024
1 parent f491bab commit b557859
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions shell/onefetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
# git repository greeter
last_repository=
check_directory_for_new_repository() {
current_repository=$(git rev-parse --show-toplevel 2>/dev/null)
current_repository=$(git rev-parse --show-toplevel 2>/dev/null)

if [ "$current_repository" ] &&
[ "$current_repository" != "$last_repository" ]; then
onefetch
fi
last_repository=$current_repository
if [ "$current_repository" ] &&
[ "$current_repository" != "$last_repository" ]; then
onefetch
fi
last_repository=$current_repository
}

cd() {
builtin cd "$@" || exit
check_directory_for_new_repository
builtin cd "$@" || exit
check_directory_for_new_repository
}

# optional, greet also when opening shell directly in repository directory
Expand Down

0 comments on commit b557859

Please sign in to comment.