Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
The second part of the image is also custom bash logic that if git returns nothing.
-
Bubbles68264yHonestly I haven’t messed with piping but I want to but I don’t know how and what resources are a good help. Side note I’m still new to using Linux
-
Gimme gimme github
I need this for professional work when people are looking over my shoulder yet again -
@010001111
Add this to .bashrc , reset source, then use 'g' instead of 'git'. If there is 'more' it dumps the whole thing to ~/fullcow.txt
Just make sure to apt or yum cowsay and lolcat
For extra credit change you can change the cow into another animal, from the default list, or make your own.(see cowsay docs)
function cs() {
$@ > ~/fullcow.txt
if [ -s ~/fullcow.txt ]
then
cat ~/fullcow.txt | awk 'NR<33 { print } NR==33 {print "...more"}' | cowsay -W 150 -T " U" -n
else
cowthink -T " U" -e "--" "8=D"
fi
}
export -f cs
function lcs() {
less ~/fullcow.txt
}
export -f lcs
function g() {
cs git $@ | lolcat
}
export -f g
my best use of Linux's ability to pipe together commands
git | cowsay | lolcats
I also have a custom bash script written that if the message is longer than 50 lines it writes cuts it off with a '...more' and outputs to a file where I can read the full details if needs be.
rant