Skip to content

Commit

Permalink
gitsecret
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien COSMAO committed Aug 29, 2024
1 parent 12c6751 commit c488028
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions blox.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ source "$__BLOX_ROOT/src/blocks/docker.zsh"
source "$__BLOX_ROOT/src/blocks/kube.zsh"
source "$__BLOX_ROOT/src/blocks/netns.zsh"
source "$__BLOX_ROOT/src/blocks/terraform.zsh"
source "$__BLOX_ROOT/src/blocks/gitsecret.zsh"

source "$__BLOX_ROOT/src/title.zsh"
source "$__BLOX_ROOT/src/segments.zsh"
Expand Down
16 changes: 16 additions & 0 deletions src/blocks/gitsecret.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# ---------------------------------------------
# GITSECRET block configurations

BLOX_BLOCK__GITSECRET_COLOR="${BLOX_BLOCK__GITSECRET_COLOR:-148}"
BLOX_BLOCK__GITSECRET_SYMBOL="${BLOX_BLOCK__GITSECRET_SYMBOL:- }"

# ---------------------------------------------

function blox_block__gitsecret() {
if [[ -n $SECRET_DIR ]]; then
secret_name=$(basename $SECRET_DIR)
blox_helper__build_block \
"${BLOX_BLOCK__GITSECRET_COLOR}" \
"${BLOX_BLOCK__GITSECRET_SYMBOL} $secret_name"
fi
}

0 comments on commit c488028

Please sign in to comment.