blog

TIL: How to re-run bashrc script

My bashrc contains small function that asks for my SSH password and keeps it while I’m logged so I don’t have to re-type it every time I make a GitHub command. Sometimes my terminal fails while or before I get to enter my password.

Now, when that happens I can run . ~/.bashrc; start_agent. Calling just . ~/.bashrc would run the whole file but there is a conditional in there that I don’t understand fully but it prevents start_agent function from running so I’m calling it explicitly.