echo $HISTCONTROL
ignoreboth
man bash:
HISTCONTROL
A colon-separated list of values controlling how commands are saved on the history list. If the list of values includes
ignorespace, lines which begin with a space character are not saved in the history list. A value ofignoredupscauses lines matching the previous history entry to not be saved. A value ofignorebothis shorthand forignorespaceandignoredups.