mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-11-22 03:09:22 +01:00
parent
64d5fef6f3
commit
1e707dd586
18
rc/bashrc
18
rc/bashrc
@ -214,9 +214,21 @@ if [[ $USER = "root" ]]; then
|
|||||||
echo 'APT::Color "1";' > /etc/apt/apt.conf.d/99color
|
echo 'APT::Color "1";' > /etc/apt/apt.conf.d/99color
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Copied from https://homepages.see.leeds.ac.uk/~eeaol/notes/2012/03/how_to_only_type_ssh_passphrase_once/
|
# if gpg[-agent] has sshcontrol file, use it as ssh-agent. sshcontrol should
|
||||||
export SSH_AUTH_SOCK=/tmp/$USER.agent
|
# include the authentication subkey keygrip from
|
||||||
(ssh-agent -a /tmp/$USER.agent > /dev/null 2>&1&)
|
# `gpg --with-keygrip --list-keys`
|
||||||
|
# Assumption: there is not going to be a sshcontrol file if `gpgconf` is not
|
||||||
|
# installed or `sshcontrol` is trivial to remove.
|
||||||
|
if [ -f ~/.gnupg/sshcontrol ]; then
|
||||||
|
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||||
|
gpgconf --launch gpg-agent
|
||||||
|
gpg-connect-agent updatestartuptty /bye >/dev/null 2>&1
|
||||||
|
# otherwise use the normal ssh-agent
|
||||||
|
else
|
||||||
|
# if the output is going to /dev/null, it's non/existence doesn't matter
|
||||||
|
(ssh-agent -a /tmp/$USER.agent > /dev/null 2>&1)
|
||||||
|
export SSH_AUTH_SOCK=/tmp/$USER.agent
|
||||||
|
fi
|
||||||
|
|
||||||
# OS X ls colours (copied from https://apple.stackexchange.com/questions/33677/
|
# OS X ls colours (copied from https://apple.stackexchange.com/questions/33677/
|
||||||
export CLICOLOR=1
|
export CLICOLOR=1
|
||||||
|
18
rc/zshrc
18
rc/zshrc
@ -165,9 +165,21 @@ export LESS_TERMCAP_us=$'\E[01;32m'
|
|||||||
# Sets environment variable CPUARCH to output of "uname -p" & UNAME to "uname"
|
# Sets environment variable CPUARCH to output of "uname -p" & UNAME to "uname"
|
||||||
CPUARCH=$(uname -p)
|
CPUARCH=$(uname -p)
|
||||||
|
|
||||||
# Copied from https://homepages.see.leeds.ac.uk/~eeaol/notes/2012/03/how_to_only_type_ssh_passphrase_once/
|
# if gpg[-agent] has sshcontrol file, use it as ssh-agent. sshcontrol should
|
||||||
export SSH_AUTH_SOCK=/tmp/$USER.agent
|
# include the authentication subkey keygrip from
|
||||||
ssh-agent -a /tmp/$USER.agent > /dev/null 2>&1
|
# `gpg --with-keygrip --list-keys`
|
||||||
|
# Assumption: there is not going to be a sshcontrol file if `gpgconf` is not
|
||||||
|
# installed or `sshcontrol` is trivial to remove.
|
||||||
|
if [ -f ~/.gnupg/sshcontrol ]; then
|
||||||
|
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||||
|
gpgconf --launch gpg-agent
|
||||||
|
gpg-connect-agent updatestartuptty /bye >/dev/null 2>&1
|
||||||
|
# otherwise use the normal ssh-agent
|
||||||
|
else
|
||||||
|
# if the output is going to /dev/null, it's non/existence doesn't matter
|
||||||
|
(ssh-agent -a /tmp/$USER.agent > /dev/null 2>&1)
|
||||||
|
export SSH_AUTH_SOCK=/tmp/$USER.agent
|
||||||
|
fi
|
||||||
|
|
||||||
# If we are on Linux, enable apt progress bar and colours
|
# If we are on Linux, enable apt progress bar and colours
|
||||||
if [[ $USER = "root" ]]; then
|
if [[ $USER = "root" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user