              (while (pcomplete-here*
                      (funcall pcomplete-command-completion-function)
                      (pcomplete-arg 'last) t))))))
+  (when (require 'bash-completion nil t)
+    (setq eshell-default-completion-function 'eshell-bash-completion))
+  (defun eshell-bash-completion ()
+    "Use bash-completion for Eshell."
+    (while (pcomplete-here (nth 2 (bash-completion-dynamic-complete-nocomint (save-excursion (eshell-bol) (point)) (point))))))
+  (setq bash-completion-nospace t)
   ;; Neotree
   (setq neo-show-updir-line nil)
   (setq neo-banner-message nil)

   ;; configuration in `dotspacemacs/user-config'.
   dotspacemacs-additional-packages
   '(
     beacon
     editorconfig
     emojify

  (defun eshell/e (filename &optional wildcards)
    "Find file alias"
    (find-file filename wildcards))
  (defun eshell/t (&rest command)
    "Run the command (with bash) in an external terminal emulator."
    ;; Support only terminal emulators supporting `--hold` like `xfce4-terminal`
