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
-
What exactly is happening? I'm curious about bash scripting, and kinda want to know what's going on here.
-
@iam13islucky I don't know how much you know about bash, so here goes:
First I open the file ~/bin/foo.sh which contains a function "foo". That function echoes the result of the "which foo" command. The "which" command normally displays the location of a program on a user's $PATH env variable (e.g. "which bash" gives "/bin/bash").
Then I load the function(s) from that script into my current terminal using the "source" command.
Finally I call "foo", which executes the function from the script, which echoes the contents of the function "foo". What I thought would happen was that "foo not found" would be printed because foo is not a program. I was actually trying this with Maven (mvn) to see if I could override the command using a script and still call the original program from within the script. -
OH. I got most of that, it was the which command that lost me until you explained it. That's really cool!
-
netroxen2437yEnough of the command, lets talk about your terminal... That's some dank looking theme you got going there, especially that full width tab bar...
-
boom5217ySomething doesnt feel right there.. Its obviously ohmyzsh but the top menu has a windows look and feel..?
-
@boom The top menu as in the terminal tab? That's just gnome terminal with the numix gtk theme. I actually had 2 tabs open so that's why that's there.
Related Rants
-
gururaju56*Now that's what I call a Hacker* MOTHER OF ALL AUTOMATIONS This seems a long post. but you will definitely ...
-
linuxxx70This guy at my last internship. A windows fanboy to the fucking max! He was saying how he'd never use anythi...
-
creedasaurus62Another dev on my team just got a new machine. Before he came in today I made two separate USB installers and ...
Learning something new every day! This is pretty cool.
undefined
bash
linux