profile (.bash_profile, .zprofile, etc.)

User avatar
GekkoP
Emacs Sancho Panza
Posts: 5877
Joined: Tue Sep 03, 2013 7:05 am

profile (.bash_profile, .zprofile, etc.)

Unread post by GekkoP » Wed Mar 02, 2016 11:07 am

Tired of typing my passphrase every time I push a commit, I added this to my .zprofile:

Code: Select all

[[ -f $(which keychain 2> /dev/null) ]] && \
    eval `keychain --nogui --quiet --eval id_rsa`

[[ -f $HOME/.keychain/$HOSTNAME-sh ]] && \
    source $HOME/.keychain/$HOSTNAME-sh
It requires keychain, of course. A slight variant of something I found online.

User avatar
franksinistra
Ivana Fukalot
Posts: 1093
Joined: Mon Jan 27, 2014 2:03 am
Location: 印尼国

Re: profile (.bash_profile, .zprofile, etc.)

Unread post by franksinistra » Wed Mar 02, 2016 12:18 pm

^ I love keychain.

A little extra tip: In case any of you run slackware-based linuxbbq variant you need to add --nolock in it.

my .zprofile is a one-liner

Code: Select all

emulate sh -c '. ~/.profile' 
rice no more.

Post Reply