-
Notifications
You must be signed in to change notification settings - Fork 282
Getting Started
Ossama Hjaji edited this page Mar 12, 2022
·
24 revisions
Onefetch is installed, then what?
> onefetch /path/of/your/repo
Or
> cd /path/of/your/repo
> onefetch
By @spenserblack
# Runs `onefetch -a Assembly`, `onefetch -a C`, etc.
onefetch -l | while read line; do echo "$line"; onefetch -a $line; done;
By @Quazar_omega
A little function to put in .bashrc
I came up with to run this whenever you cd into a repo, making sure that it's different from the last one you were in:
LAST_REPO=""
cd() {
builtin cd "$@";
git rev-parse 2>/dev/null;
if [ $? -eq 0 ]; then
if [ "$LAST_REPO" != $(basename $(git rev-parse --show-toplevel)) ]; then
onefetch
LAST_REPO=$(basename $(git rev-parse --show-toplevel))
fi
fi
}
By @mbrehin
# Add Git alias for onefetch.
git config --global alias.project-summary '!which onefetch && onefetch'