Skip to content

Commit

Permalink
Fix sh lint
Browse files Browse the repository at this point in the history
  • Loading branch information
deniscostadsc committed Sep 29, 2023
1 parent 3056102 commit be75c83
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
1 change: 1 addition & 0 deletions roles/bash/files/.bash_profile
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# shellcheck disable=SC2148,SC1090
source ~/.bashrc
5 changes: 1 addition & 4 deletions roles/bash/files/.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ shopt -s checkwinsize
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
# shellcheck disable=SC1091
[ -f /etc/bash_completion ] && . /etc/bash_completion

# Checking for colors support
Expand All @@ -55,10 +56,6 @@ PATH=~/.bin/:$PATH

export PROJECT_PATH="$HOME/projects/"

# I know, some weird things from work,
# who assumes zsh as default shell
[ -f ~/.zshrc ] && . ~/.zshrc

# no zsh here!
export BASH_SILENCE_DEPRECATION_WARNING=1

Expand Down
1 change: 1 addition & 0 deletions roles/bash/files/bash_aliases.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# shellcheck disable=SC2148
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
Expand Down
1 change: 1 addition & 0 deletions roles/bash/files/bash_aliases_linux.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# shellcheck disable=SC2148
alias pbcopy='xsel --clipboard --input'
alias pbpaste='xsel --clipboard --output'
1 change: 1 addition & 0 deletions roles/bash/files/bash_functions.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# shellcheck disable=SC2148
function mkcd {
mkdir -p "$1" && cd "$1" || return 1
}
11 changes: 5 additions & 6 deletions roles/git/files/git_functions.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
# shellcheck disable=SC2148
function __git_arrows {
git rev-parse --abbrev-ref @"{u}" &>/dev/null || return
local branch_status

branch_status="$(git rev-list --left-right --count HEAD...@"{u}" 2>/dev/null)"

[ "$?" == 0 ] || return
git rev-list --left-right --count HEAD...@"{u}" 2>/dev/null || return
local left_arrow
local right_arrow

left_arrow=$(echo $branch_status | cut -f 1 -d " ")
right_arrow=$(echo $branch_status | cut -f 2 -d " ")
left_arrow=$(echo "$branch_status" | cut -f 1 -d " ")
right_arrow=$(echo "$branch_status" | cut -f 2 -d " ")

local arrows
[ "$left_arrow" != 0 ] && arrows=""
Expand All @@ -19,5 +18,5 @@ function __git_arrows {
}

function __git_branch {
echo -n "$(git branch 2>/dev/null | grep "^*" | sed "s/* //g")"
echo -n "$(git branch 2>/dev/null | grep "^\*" | sed "s/* //g")"
}

0 comments on commit be75c83

Please sign in to comment.