Skip to content

Commit 69dd2fe

Browse files
committed
template: shellcheck
- and generally comment out useless varbls
1 parent 720c5db commit 69dd2fe

File tree

2 files changed

+22
-20
lines changed

2 files changed

+22
-20
lines changed

template/bashrc.template.bash

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#!/usr/bin/env bash
1+
# shellcheck shell=bash
2+
# shellcheck disable=SC2034
23

34
# If not running interactively, don't do anything
45
case $- in
@@ -7,27 +8,27 @@ case $- in
78
esac
89

910
# Path to the bash it configuration
10-
export BASH_IT="{{BASH_IT}}"
11+
BASH_IT="{{BASH_IT}}"
1112

1213
# Lock and Load a custom theme file.
1314
# Leave empty to disable theming.
14-
# location /.bash_it/themes/
15-
export BASH_IT_THEME='bobby'
15+
# location ~/.bash_it/themes/
16+
BASH_IT_THEME='bobby'
1617

1718
# Some themes can show whether `sudo` has a current token or not.
1819
# Set `$THEME_CHECK_SUDO` to `true` to check every prompt:
1920
#THEME_CHECK_SUDO='true'
2021

2122
# (Advanced): Change this to the name of your remote repo if you
2223
# cloned bash-it with a remote other than origin such as `bash-it`.
23-
# export BASH_IT_REMOTE='bash-it'
24+
#BASH_IT_REMOTE='bash-it'
2425

2526
# (Advanced): Change this to the name of the main development branch if
2627
# you renamed it or if it was changed for some reason
27-
# export BASH_IT_DEVELOPMENT_BRANCH='master'
28+
#BASH_IT_DEVELOPMENT_BRANCH='master'
2829

2930
# Your place for hosting Git repos. I use this for private repos.
30-
export GIT_HOSTING='[email protected]'
31+
#GIT_HOSTING='[email protected]'
3132

3233
# Don't check mail when opening terminal.
3334
unset MAILCHECK
@@ -36,49 +37,50 @@ unset MAILCHECK
3637
export IRC_CLIENT='irssi'
3738

3839
# Set this to the command you use for todo.txt-cli
39-
export TODO="t"
40+
TODO="t"
4041

4142
# Set this to the location of your work or project folders
4243
#BASH_IT_PROJECT_PATHS="${HOME}/Projects:/Volumes/work/src"
4344

4445
# Set this to false to turn off version control status checking within the prompt for all themes
45-
export SCM_CHECK=true
46+
#SCM_CHECK=true
47+
4648
# Set to actual location of gitstatus directory if installed
47-
#export SCM_GIT_GITSTATUS_DIR="$HOME/gitstatus"
49+
#SCM_GIT_GITSTATUS_DIR="$HOME/gitstatus"
4850
# per default gitstatus uses 2 times as many threads as CPU cores, you can change this here if you must
4951
#export GITSTATUS_NUM_THREADS=8
5052

5153
# Set Xterm/screen/Tmux title with only a short hostname.
5254
# Uncomment this (or set SHORT_HOSTNAME to something else),
5355
# Will otherwise fall back on $HOSTNAME.
54-
#export SHORT_HOSTNAME=$(hostname -s)
56+
#SHORT_HOSTNAME=$(hostname -s)
5557

5658
# Set Xterm/screen/Tmux title with only a short username.
5759
# Uncomment this (or set SHORT_USER to something else),
5860
# Will otherwise fall back on $USER.
59-
#export SHORT_USER=${USER:0:8}
61+
#SHORT_USER=${USER:0:8}
6062

6163
# If your theme use command duration, uncomment this to
6264
# enable display of last command duration.
63-
#export BASH_IT_COMMAND_DURATION=true
65+
#BASH_IT_COMMAND_DURATION=true
6466
# You can choose the minimum time in seconds before
6567
# command duration is displayed.
66-
#export COMMAND_DURATION_MIN_SECONDS=1
68+
#COMMAND_DURATION_MIN_SECONDS=1
6769

6870
# Set Xterm/screen/Tmux title with shortened command and directory.
6971
# Uncomment this to set.
70-
#export SHORT_TERM_LINE=true
72+
#SHORT_TERM_LINE=true
7173

7274
# Set vcprompt executable path for scm advance info in prompt (demula theme)
7375
# https://github.com/djl/vcprompt
74-
#export VCPROMPT_EXECUTABLE=~/.vcprompt/bin/vcprompt
76+
#VCPROMPT_EXECUTABLE=~/.vcprompt/bin/vcprompt
7577

7678
# (Advanced): Uncomment this to make Bash-it reload itself automatically
7779
# after enabling or disabling aliases, plugins, and completions.
78-
# export BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE=1
80+
# BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE=1
7981

8082
# Uncomment this to make Bash-it create alias reload.
81-
# export BASH_IT_RELOAD_LEGACY=1
83+
# BASH_IT_RELOAD_LEGACY=1
8284

8385
# Load Bash It
84-
source "$BASH_IT"/bash_it.sh
86+
source "${BASH_IT?}/bash_it.sh"

test/install/install.bats

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,5 @@ function local_setup_file() {
7676
run cat "$HOME/$BASH_IT_CONFIG_FILE"
7777

7878
assert_line "test file content"
79-
assert_line "source \"\$BASH_IT\"/bash_it.sh"
79+
assert_line 'source "${BASH_IT?}/bash_it.sh"'
8080
}

0 commit comments

Comments
 (0)