From f60125be8999be68f97f2d31e56310d5a55aa405 Mon Sep 17 00:00:00 2001 From: Toby Vincent Date: Sat, 26 Mar 2022 20:25:06 -0500 Subject: feat: move to sheldon plugin manager --- bash/.bashrc | 26 ++++++-------------------- bash/.profile | 30 +++++++++++++++--------------- 2 files changed, 21 insertions(+), 35 deletions(-) (limited to 'bash') diff --git a/bash/.bashrc b/bash/.bashrc index 24c8780..25d092d 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -1,3 +1,5 @@ +#!/usr/bin/bash + # Aliases alias ls='ls --color=tty' alias l='ls -lah' @@ -26,26 +28,10 @@ alias dclf="docker compose logs -f" alias dct="docker context" alias dcu="docker context use" -if [ $PS1 && -d "$BASHCOMPDIR" ]; then - for f in $BASHCOMPDIR/*; do - source $f +if [[ $- == *i* ]] && [ -d "$BASHCOMPDIR" ]; then + for f in "$BASHCOMPDIR"/*; do + source "$f" done fi -command -v starship >/dev/null 2>&1 && eval "$(starship init bash)" - -set_win_title() { - local prefix - - if [ "$USER" != "tobyv" ]; then - prefix="${USER} in " - fi - - if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then - prefix="${prefix/in/on}${HOST} in " - fi - - echo -ne "\033]0;${prefix}${PWD/$HOME/~}\007" -} - -starship_precmd_user_func="set_win_title" +command -v starship >/dev/null 2>&1 && source <(starship init bash) diff --git a/bash/.profile b/bash/.profile index 4188ba5..281033c 100644 --- a/bash/.profile +++ b/bash/.profile @@ -1,20 +1,20 @@ # XDG -export XDG_CONFIG_HOME=$HOME/.config -export XDG_CACHE_HOME=$HOME/.cache -export XDG_DATA_HOME=$HOME/.local/share -export XDG_RUNTIME_DIR=$HOME/.xdg +export XDG_CONFIG_HOME="$HOME"/.config +export XDG_CACHE_HOME="$HOME"/.cache +export XDG_DATA_HOME="$HOME"/.local/share +export XDG_RUNTIME_DIR="$HOME"/.xdg # Shell -export ZDOTDIR=$XDG_CONFIG_HOME/zsh -export BASH_COMPLETION_USER_DIR=$XDG_DATA_HOME/bash-completion/completions +export ZDOTDIR="$XDG_CONFIG_HOME"/zsh +export BASH_COMPLETION_USER_DIR="$XDG_DATA_HOME"/bash-completion/completions # Misc -export EDITOR="$(command -v vim 2>/dev/null || command -v vi)" +export EDITOR="$( command -v nvim 2>/dev/null || command -v vim 2>/dev/null || command -v vi )" export VISUAL="code --wait" export MANPAGER="sh -c 'col -bx | bat -l man -p'" export MANROFFOPT="-c" -export GOPATH=$HOME/.go -export GPG_TTY=$(tty) +export GOPATH="$HOME"/.go +export GPG_TTY=$( tty ) export STARSHIP_LOG="error" export FZF_PREVIEW_COMMAND="bat --style=numbers,changes --wrap never --color always {} || cat {} || tree -C {}" export FZF_DEFAULT_COMMAND="fd --type f || git ls-tree -r --name-only HEAD || rg --files || find ." @@ -22,9 +22,9 @@ export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" export FZF_CTRL_T_OPTS="--min-height 30 --preview-window down:60% --preview-window noborder --preview '($FZF_PREVIEW_COMMAND) 2> /dev/null'" # Path -export PATH=$PATH:$HOME/.local/bin -export PATH=$PATH:$HOME/.scripts -export PATH=$PATH:$HOME/.go/bin -export PATH=$PATH:$HOME/.dotnet/tools -export PATH=$PATH:$HOME/.cargo/bin -export PATH=$PATH:/usr/local/texlive/2021/bin/x86_64-linux +export PATH="$PATH":"$HOME"/.local/bin +export PATH="$PATH":"$HOME"/.scripts +export PATH="$PATH":"$HOME"/.go/bin +export PATH="$PATH":"$HOME"/.dotnet/tools +export PATH="$PATH":"$HOME"/.cargo/bin +export PATH="$PATH":/usr/local/texlive/2021/bin/x86_64-linux -- cgit v1.2.3-70-g09d2