diff options
author | sanmiguel <[email protected]> | 2017-08-03 18:45:26 -0500 |
---|---|---|
committer | sanmiguel <[email protected]> | 2017-08-03 18:45:26 -0500 |
commit | 4986ebe61e8a0f3aafacee2a027ea89feaed1bf7 (patch) | |
tree | 557977a441b6136b7123d2b4e239c4f9093d7b48 | |
parent | 5daa0345916cea13ae0e82ddf7b03f58503910f8 (diff) | |
download | kerl-4986ebe61e8a0f3aafacee2a027ea89feaed1bf7.tar.gz kerl-4986ebe61e8a0f3aafacee2a027ea89feaed1bf7.tar.bz2 kerl-4986ebe61e8a0f3aafacee2a027ea89feaed1bf7.zip |
Always add shell_history to ERL_AFLAGSkerl-shell_history_otp_20
Even for erlangs before 20.0 - it should have no effect
-rwxr-xr-x | kerl | 19 |
1 files changed, 6 insertions, 13 deletions
@@ -768,6 +768,12 @@ REBAR_PLT_DIR="$absdir" export REBAR_PLT_DIR _KERL_ACTIVE_DIR="$absdir" export _KERL_ACTIVE_DIR +# https://twitter.com/mononcqc/status/877544929496629248 +export _KERL_SAVED_ERL_AFLAGS=" \$ERL_AFLAGS" +kernel_history=\$(echo "\$ERL_AFLAGS" | grep "kernel shell_history") +if [ -z "\$kernel_history" ]; then + export ERL_AFLAGS="-kernel shell_history enabled \$ERL_AFLAGS" +fi if [ -f "$KERL_CONFIG" ]; then . "$KERL_CONFIG"; fi if [ -n "\$KERL_ENABLE_PROMPT" ]; then _KERL_SAVED_PS1="\$PS1" @@ -900,19 +906,6 @@ endif rehash ACTIVATE_CSH - otpver=$(get_otp_version "$rel") - if [ $otpver -ge 20 ]; then - # https://twitter.com/mononcqc/status/877544929496629248 - cat << OTP_20_ADDITION >> "$absdir/activate" -_KERL_SAVED_ERL_AFLAGS=" \$ERL_AFLAGS" -export _KERL_SAVED_ERL_AFLAGS -kernel_history=\$(echo "\$ERL_AFLAGS" | grep "kernel shell_history") -if [ -z "\$kernel_history" ]; then - export ERL_AFLAGS="-kernel shell_history enabled \$ERL_AFLAGS" -fi -OTP_20_ADDITION - fi - if [ -n "$KERL_BUILD_DOCS" ]; then DOC_DIR="$KERL_BUILD_DIR/$1/release_$rel/lib/erlang" if [ -d "$DOC_DIR" ]; then |