function command( repl ) {
	return onCommand;

	/**
	* Returns all (or select) keybindings.
	*
	* @private
	* @param {string} [action] - action name
	* @returns {(Object|Array<Object>)} keybindings object or a list of keybindings
	*/
	function onCommand() {
		var action;
		var nargs;

		nargs = arguments.length;
		if ( nargs === 0 ) {
			return repl.keybindings();
		}
		if ( nargs === 1 ) {
			action = arguments[ 0 ];
			if ( !isString( action ) ) {
				repl._ostream.write( format( 'Error: invalid argument. First argument must be a string. Value: `%s`.', action ) );
				return;
			}
			if ( !isAction( action ) ) {
				repl._ostream.write( format( 'Error: invalid argument. First argument must be a valid action name. Value: `%s`.', action ) );
				return;
			}
			return repl.keybindings()[ action ];
		}
	}
}
Returns a callback to be invoked upon calling the `keybindings` command.

@private
@param {REPL} repl - REPL instance
@returns {Function} callback