From fa5b7afba2f60046e3d85adeb5054586df5f5875 Mon Sep 17 00:00:00 2001 From: "flyingscorpio@arch-desktop" Date: Sat, 27 Jun 2020 17:44:49 +0200 Subject: [PATCH] Add aliases and EDITOR condition --- dotfiles/bash/bash_aliases | 12 +++++++++--- dotfiles/bash/profile | 6 ++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/dotfiles/bash/bash_aliases b/dotfiles/bash/bash_aliases index 4d4bcd4..4f7bb40 100644 --- a/dotfiles/bash/bash_aliases +++ b/dotfiles/bash/bash_aliases @@ -1,15 +1,21 @@ alias lime2connect='ssh flyingscorpio@2px.info.tm' alias fish='fish ~/.config/fish/functions/my_aliases.fish && fish' + alias rm='rm -I --preserve-root' alias ll='ls -lh' alias lla='ls -lArth' alias la='ls -A' alias l='ls -CF' -alias ccat='highlight --out-format=ansi' # Color cat with syntax highlighting -alias vi='vim' -alias netstat='ss' +alias pdf='zathura' +alias ccat='highlight --out-format=ansi' # color cat with syntax highlighting +alias netstat='ss' # for compatibility +if [ -x /bin/vim ] && [ ! -x /bin/vi ]; then + alias vi='vim' +fi + +# For common errors alias :q=' exit' alias :x=' exit' alias cd..='cd ..' diff --git a/dotfiles/bash/profile b/dotfiles/bash/profile index 2a9b3ea..c449249 100644 --- a/dotfiles/bash/profile +++ b/dotfiles/bash/profile @@ -1,9 +1,11 @@ -# # ~/.bash_profile # [[ -f ~/.bashrc ]] && . ~/.bashrc -export EDITOR="/bin/vim" +if [ -x /bin/vim ]; then + export EDITOR="/bin/vim" +fi + export PATH="$HOME/.cargo/bin:$PATH" export PATH="$PATH:$HOME/.local/bin"