diff options
| -rw-r--r-- | exports/.exports | 21 | ||||
| -rwxr-xr-x | initsh/.initsh | 33 |
2 files changed, 39 insertions, 15 deletions
diff --git a/exports/.exports b/exports/.exports index 5bc59e1..7ad755b 100644 --- a/exports/.exports +++ b/exports/.exports @@ -8,6 +8,27 @@ [ -d "$HOME/dotnet" ] && export PATH="$HOME/dotnet:$PATH" && export DOTNET_ROOT="$HOME/dotnet" [ -d "$HOME/.dotnet/tools" ] && export PATH="$HOME/.dotnet/tools:$PATH" +# Colors for BSD tools +export CLICOLOR=1 + +# Editor +## Some applications expect the full path +if [ -x "$(command -v nvim)" ]; then + VISUAL="$(command -v nvim)" +else + VISUAL="$(command -v nano)" +fi +export VISUAL +## Some applications only accept EDITOR +EDITOR="$(command -v nano)" +export EDITOR + +# C/C++ +if [ -x "$(command -v clang)" ]; then + export CC="clang" + export CXX="clang++" +fi + # DOTNET export DOTNET_CLI_TELEMETRY_OPTOUT=1 diff --git a/initsh/.initsh b/initsh/.initsh index eece39b..1f048fa 100755 --- a/initsh/.initsh +++ b/initsh/.initsh @@ -2,29 +2,32 @@ KERNEL=$(uname -s) -# EDITORS -export EDITOR="nano" -export VISUAL="nvim" -## C/C++ -export CC="clang" -export CXX="clang++" -export DCMAKE_C_COMPILER=$CC -export DCMAKE_CXX_COMPILER=$CXX - # Aliases -## Replace ls with exa if installed +alias e=\$VISUAL +## Replace vi and vim with neovim if installed +if [ -x "$(command -v nvim)" ]; then + alias vi='nvim' + alias vim='nvim' +fi +## Replace ls and tree with exa if installed if [ -x "$(command -v exa)" ]; then alias ls='exa' alias tree='exa --tree' -else - alias ls='ls --color=auto' fi -## Editors -alias e=$VISUAL -alias vim=$VISUAL ## Colors +if [ -x "$(command -v dircolors)" ]; then + if [ -f ~/.dircolors ]; then + eval "$(dircolors ~/.dircolors)" + else + eval "$(dircolors)" + fi +fi +ls --color=auto > /dev/null 2>&1 && alias ls='ls --color=auto' alias dir='dir --color=auto' +alias vdir='vdir --color=auto' alias grep='grep --color=auto' +alias fgrep='fgrep --color=auto' +alias egrep='egrep --color=auto' alias hexedit='hexedit --color' ## Some more ls aliases alias ll='ls -Al' |
