From 90bd8c6b46a467b26972f5ecac5c2f05ed321f49 Mon Sep 17 00:00:00 2001 From: Adam Dinwoodie Date: Sat, 5 Mar 2022 13:14:42 +0000 Subject: [PATCH] Correct HISTCONTROL in .bashrc Per bash.1, HISTCONTROL values should be colon-separated, not comma-separated, so correct the sample line for adding "ignoredups" to HISTCONTROL to use the correct separator. At the same time, use the separator if and only if there is a non-null value already set in HISTCONTROL. The previous version of this sample code would insert the separator if HISTCONTROL were defined as the empty string, where it'd be exactly as unnecessary as if it weren't defined at all. --- etc/defaults/etc/skel/.bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/defaults/etc/skel/.bashrc b/etc/defaults/etc/skel/.bashrc index 3a4f59a..b6a48cf 100644 --- a/etc/defaults/etc/skel/.bashrc +++ b/etc/defaults/etc/skel/.bashrc @@ -54,7 +54,7 @@ # History Options # # Don't put duplicate lines in the history. -# export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups +# export HISTCONTROL=$HISTCONTROL${HISTCONTROL:+:}ignoredups # # Ignore some controlling instructions # HISTIGNORE is a colon-delimited list of patterns which should be excluded. -- 2.35.1