Few bash changes

This commit is contained in:
2021-02-02 09:03:51 +00:00
parent fe6bc16e1e
commit 4da248eadc
2 changed files with 20 additions and 8 deletions

View File

@@ -1,4 +1,3 @@
# Git pulls latest dotfiles
function update-dotfiles() {
prevdir=$PWD
@@ -14,15 +13,15 @@ function update-dotfiles() {
}
function add-sshkey() {
TIMEOUT="1h"
TIMEOUT="2h"
NAME=$1
if [ -z "$NAME" ]; then
echo "Current Keys"
ssh-add -L
else
if [ -f "$HOME/.ssh/id_ed25519_${NAME}" ]; then
ssh-add -t $TIMEOUT "$HOME/.ssh/id_ed25519_${NAME}"
if [ -f "${HOME}/.ssh/id_ed25519_${NAME}" ]; then
ssh-add -t $TIMEOUT "${HOME}/.ssh/id_ed25519_${NAME}"
else
echo "No key named ${NAME} found..."
fi

View File

@@ -8,8 +8,14 @@ fi
# User specific environment and startup programs
export TZ=GB
export LANG=en_GB.UTF-8
if [ -x /usr/bin/nano ]; then
export EDITOR=nano
export VISUAL=nano
else
export EDITOR=vi
export VISUAL=vi
fi
# OSX Specific envs
if [ $(uname) == "Darwin" ]; then
@@ -23,4 +29,11 @@ if [ $(uname) == "Darwin" ]; then
fi
fi
# Go stuff
if [ -d /usr/local/go ]; then
export GOROOT=/usr/local/go/
export GOPATH=$HOME/go/
export PATH=$PATH:/usr/local/go/bin
fi
export PS1="\[\e[0;90m\][\[\e[0;37m\]\u\[\e[0;37m\]@\[\e[0;37m\]\H\[\e[0;90m\]] \[\e[0;90m\](\[\e[0;37m\]\W\[\e[0;90m\]) \[\e[0;37m\]\$\[\e[0m\] "