Fix issues reported by shellcheck

This commit is contained in:
Daniel - 2020-07-25 12:25:06 +02:00
parent 4b73aa626d
commit daa67974bf
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
1 changed files with 9 additions and 3 deletions

12
bashrc
View File

@ -1,3 +1,4 @@
#!/bin/bash
# -*- bash -*- # -*- bash -*-
# Based on example .bashrc as provided by Debian # Based on example .bashrc as provided by Debian
@ -11,7 +12,7 @@ export PATH=${HOME}/.local/share/perl5/bin:${HOME}/.local/bin:/usr/local/bin:/us
# History control # History control
HISTCONTROL=ignoreboth HISTCONTROL=ignoreboth
HISTZIE=20000 HISTSIZE=20000
# Append to the history file, don't overwrite it # Append to the history file, don't overwrite it
shopt -s histappend shopt -s histappend
@ -42,13 +43,18 @@ else
else else
GIT_PROMPT='' GIT_PROMPT=''
fi fi
PS1="┌[\e[0;32m\u@\h\e[m] [\e[0;31m\w\e[m] [\t] $GIT_PROMPT\n└── " PS1="┌[\[\e[0;32m\u@\h\e[m\] [\[\e[0;31m\w\e[m\]] [\t] $GIT_PROMPT\n└── "
unset GIT_PROMPT unset GIT_PROMPT
fi fi
# Enable color support of ls and also add handy aliases # Enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" if [[ -r ~/.dircolors ]]; then
eval "$(dircolors -b ~/.dircolors)"
else
eval "$(dircolors -b)"
fi
alias ls='ls --color=auto' alias ls='ls --color=auto'
alias grep='grep --color=auto' alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto' alias fgrep='fgrep --color=auto'