From 51cc1520ee19b241813ecdce82ff26bd84225eeb Mon Sep 17 00:00:00 2001
From: Melkor333 <samuel@ton-kunst.ch>
Date: Wed, 26 Dec 2018 20:21:13 +0100
Subject: [PATCH] fix 'cat /dev/urandom' not closing

---
 mcfly.bash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mcfly.bash b/mcfly.bash
index f2b5be7..84261cd 100644
--- a/mcfly.bash
+++ b/mcfly.bash
@@ -5,7 +5,7 @@ if [[ "$__MCFLY_LOADED" == "loaded" ]]; then
   return 0
 fi
 __MCFLY_LOADED="loaded"
-export MCFLY_SESSION_ID=$(cat /dev/urandom | env LC_ALL=C tr -dc 'a-zA-Z0-9' | fold -w 24 | head -n 1)
+export MCFLY_SESSION_ID=$(cat /dev/urandom | env LC_ALL=C tr -dc 'a-zA-Z0-9' | head -c 24)
 export MCFLY_HISTORY=$(mktemp -t mcfly.XXXX)
 export HISTFILE="${HISTFILE:-$HOME/.bash_history}"
 
