Skip to content

Commit

Permalink
refactor(crystal): Simplify version retreival
Browse files Browse the repository at this point in the history
  • Loading branch information
denysdovhan committed Sep 22, 2022
1 parent 135defa commit 1b7c053
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sections/crystal.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spaceship_crystal() {
local is_crystal_project="$(spaceship::upsearch shard.yml)"
[[ -n "$is_crystal_project" || -n *.cr(#qN^/) ]] || return

local crystal_version=$(crystal --version | sed -En 's/Crystal ([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]).*/\1/p')
local crystal_version=$(crystal --version | awk '/Crystal*/ {print $2}')

spaceship::section \
--color "$SPACESHIP_CRYSTAL_COLOR" \
Expand Down

0 comments on commit 1b7c053

Please sign in to comment.