Utility function for eshell