Eshell already has a clear function: eshell/clear. You'd have to be more specific about how you invoke the binding if you want help; e.g., eshell specific, running it as a command on eshell, using a binding – for the latter-most, you can't bind it with bind-key due to a long-standing bug. You have to use local-set-key define them at loading time using a hook, so it looks something like this:
(defun my-eshell-bindings ()
(local-set-key (kbd "C-d") 'ha/eshell-quit-or-delete-char))
And then add that function to eshell-mode-hook. Otherwise, you can add functions to be used as commands by prefixing "eshell/" to their names.
(defalias 'eshell/ff 'find-file)
(defalias 'eshell/x 'eshell-life-is-too-much)
(defun eshell/d (&optional file) (dired file))