Remove extra stuff from .profile

This commit is contained in:
Evie Litherland-Smith 2023-02-25 09:51:18 +00:00
parent 704ba0da49
commit dbd3247ba0

View file

@ -1,13 +1,5 @@
# Start keychain # Start keychain
if [[ -e $HOME/.ssh/id_ed25519 ]] command -v keychain > /dev/null && eval $(keychain --eval --quiet --noask -Q id_ed25519 id_rsa)
then
command -v keychain > /dev/null && eval $(keychain --eval --quiet --noask $HOME/.ssh/id_ed25519)
fi
if [[ -e $HOME/.ssh/id_rsa ]]
then
command -v keychain > /dev/null && eval $(keychain --eval --quiet --noask $HOME/.ssh/id_rsa)
fi
# Set local paths # Set local paths
LOCAL_BIN="$HOME/.local/bin" LOCAL_BIN="$HOME/.local/bin"
@ -15,35 +7,3 @@ echo $PATH | grep -i "$LOCAL_BIN" - > /dev/null || export PATH=$PATH:$LOCAL_BIN
DOTFILES_BIN="$(dirname $(dirname $(readlink -f $0)))/bin" DOTFILES_BIN="$(dirname $(dirname $(readlink -f $0)))/bin"
echo $PATH | grep -i "$DOTFILES_BIN" - > /dev/null || export PATH=$PATH:$DOTFILES_BIN echo $PATH | grep -i "$DOTFILES_BIN" - > /dev/null || export PATH=$PATH:$DOTFILES_BIN
# Set some useful aliases and functions
poetry_installed()
{
command -v poetry > /dev/null 2>&1 && return 0 || echo "Poetry not installed"
return 1
}
poetry_env_exists()
{
poetry_installed && {
poetry env info > /dev/null 2>&1 && return 0\
|| echo "No poetry environment configured for $(pwd)"
}
return 1
}
penv()
{
poetry_env_exists && source "$(poetry env info --path)/bin/activate" || return 1
}
pshell()
{
poetry_env_exists && poetry shell || return 1
}
prun()
{
poetry_env_exists && poetry run $@ || return 1
}
alias vim="nvim"
alias vimdiff="nvim -d"
alias nvimdiff="nvim -d"
alias lg="lazygit"