mirror of
https://github.com/starship/starship.git
synced 2024-11-22 16:23:17 +01:00
perf(init): use $RANDOM env-var instead of starship session to generate session-key (#1755)
This commit is contained in:
parent
30db07aaf3
commit
7450510327
@ -86,4 +86,6 @@ STARSHIP_START_TIME=$(::STARSHIP:: time)
|
||||
export STARSHIP_SHELL="bash"
|
||||
|
||||
# Set up the session key that will be used to store logs
|
||||
export STARSHIP_SESSION_KEY=$(::STARSHIP:: session)
|
||||
STARSHIP_SESSION_KEY="$RANDOM$RANDOM$RANDOM$RANDOM$RANDOM"; # Random generates a number b/w 0 - 32767
|
||||
STARSHIP_SESSION_KEY="${STARSHIP_SESSION_KEY}0000000000000000" # Pad it to 16+ chars.
|
||||
export STARSHIP_SESSION_KEY=${STARSHIP_SESSION_KEY:0:16}; # Trim to 16-digits if excess.
|
||||
|
@ -78,4 +78,6 @@ STARSHIP_START_TIME=$(::STARSHIP:: time)
|
||||
export STARSHIP_SHELL="zsh"
|
||||
|
||||
# Set up the session key that will be used to store logs
|
||||
export STARSHIP_SESSION_KEY=$(::STARSHIP:: session)
|
||||
STARSHIP_SESSION_KEY="$RANDOM$RANDOM$RANDOM$RANDOM$RANDOM"; # Random generates a number b/w 0 - 32767
|
||||
STARSHIP_SESSION_KEY="${STARSHIP_SESSION_KEY}0000000000000000" # Pad it to 16+ chars.
|
||||
export STARSHIP_SESSION_KEY=${STARSHIP_SESSION_KEY:0:16}; # Trim to 16-digits if excess.
|
||||
|
Loading…
Reference in New Issue
Block a user