eshell-input-filter-initial-space was introduced in Emacs 26. I've inlined its definition, at least until we drop 25.x support.