I bind C-x h to 'mark-whole-buffer (which works in any mode/buffer) then just use C-w to kill the region. The above global-set-key will rebind C-f in all modes, not just your shell, which will hide the default C-f forward-char binding.
– djbOct 6 '17 at 20:23