function onCommand( name, options ) {
		var opts;
		var list;
		var type;
		var err;
		var tmp;
		var out;
		var FLG;
		var v;
		var n;
		var i;
		var j;

		if ( arguments.length === 0 ) {
			return setdiff( repl._workspace, properties( repl._context ).sort( propertyComparator ) ); // eslint-disable-line max-len
		}
		if ( arguments.length === 1 ) {
			if ( isString( name ) ) {
				n = name;
				opts = {};
			} else if ( isPlainObject( name ) ) {
				opts = name;
			} else {
				err = new TypeError( format( 'invalid argument. Must provide either an options object or a workspace name. Value: `%s`.', name ) );
				debug( 'Error: %s', err.message );
				repl._ostream.write( 'Error: '+err.message+'\n' );
				return;
			}
		} else {
			if ( !isString( name ) ) {
				err = new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', name ) );
				debug( 'Error: %s', err.message );
				repl._ostream.write( 'Error: '+err.message+'\n' );
				return;
			}
			n = name;
			if ( !isPlainObject( options ) ) {
				err = new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', name ) );
				debug( 'Error: %s', err.message );
				repl._ostream.write( 'Error: '+err.message+'\n' );
				return;
			}
			opts = options;
		}
		if ( hasOwnProp( opts, 'include' ) && !isRegExp( opts.include ) ) {
			err = new TypeError( format( 'invalid option. `%s` option must be a regular expression. Option: `%s`.', 'include', opts.include ) );
			debug( 'Error: %s', err.message );
			repl._ostream.write( 'Error: '+err.message+'\n' );
			return;
		}
		if ( hasOwnProp( opts, 'exclude' ) && !isRegExp( opts.exclude ) ) {
			err = new TypeError( format( 'invalid option. `%s` option must be a regular expression. Option: `%s`.', 'exclude', opts.include ) );
			debug( 'Error: %s', err.message );
			repl._ostream.write( 'Error: '+err.message+'\n' );
			return;
		}
		if ( hasOwnProp( opts, 'types' ) && !isArrayLike( opts.types ) ) {
			err = new TypeError( format( 'invalid option. `%s` option must be an array-like object. Option: `%s`.', 'types', opts.types ) );
			debug( 'Error: %s', err.message );
			repl._ostream.write( 'Error: '+err.message+'\n' );
			return;
		}
		if ( hasOwnProp( opts, 'details' ) && !isBoolean( opts.details ) ) {
			err = new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'details', opts.details ) );
			debug( 'Error: %s', err.message );
			repl._ostream.write( 'Error: '+err.message+'\n' );
			return;
		}
		if ( n === void 0 || n === repl._currentWorkspace ) {
			tmp = properties( repl._context ).sort( propertyComparator );
			tmp = setdiff( repl._workspace, tmp );
			list = [];
			for ( i = 0; i < tmp.length; i++ ) {
				if ( isReadableProperty( repl._context, tmp[ i ] ) ) {
					list.push( tmp[ i ], repl._context[ tmp[ i ] ] );
				} else {
					// The variable can be set, but not retrieved (i.e., is write-only), so value inspection is not possible without triggering an error...
					list.push( tmp[ i ], void 0 );
				}
			}
		} else {
			if ( !hasOwnProp( repl._workspaces, n ) ) {
				err = new Error( format( 'invalid argument. Unrecognized workspace name. Value: `%s`.', n ) );
				debug( 'Error: %s', err.message );
				repl._ostream.write( 'Error: '+err.message+'\n' );
				return;
			}
			list = repl._workspaces[ n ].slice();
			for ( i = 1; i < list.length; i += 2 ) {
				if ( typeof list[ i ].get === 'function' ) {
					// WARNING: the `this` context is not defined, as the variable is not actually bound to a global instance!
					list[ i ] = list[ i ].get.call( null );
				} else if ( typeof list[ i ].set === 'function' ) {
					// The variable can be set, but not retrieved (i.e., is write-only), so value inspection is not possible without triggering an error...
					list[ i ] = void 0;
				} else {
					list[ i ] = list[ i ].value;
				}
			}
		}
		out = [];
		for ( i = 0; i < list.length; i += 2 ) {
			v = list[ i ];
			FLG = false;
			type = '';
			if ( opts.include && !opts.include.test( v ) ) {
				continue;
			}
			if ( opts.exclude && opts.exclude.test( v ) ) {
				continue;
			}
			if ( opts.types ) {
				type = typeOf( list[ i+1 ] );
				for ( j = 0; j < opts.types.length; j++ ) {
					if ( type === opts.types[ j ] ) {
						FLG = true;
						break;
					}
				}
				if ( FLG === false ) {
					continue;
				}
			}
			// If we've made it this far, the variable should have passed all filters...
			out.push( v );
			if ( opts.details ) {
				j = out.length - 1;
				out[ j ] = {
					'name': out[ j ],
					'type': type || typeOf( list[ i+1 ] ),
					'data': String( list[ i+1 ] ) // WARNING: for large datasets, this could be expensive!!! TODO: may want to consider alternative strategies for serialization based on a value's type.
				};
				v = out[ j ].data;
				if ( v.length > 20 ) {
					out[ j ].data = v.slice( 0, 9 ) + '...' + v.slice( v.length-8 );
				}
			}
		}
		return out;
	}
Returns a list of variable names in a specified workspace.

@private
@param {string} [name] - workspace name
@param {Options} [options] - function options
@param {RegExp} [options.include] - name inclusion filter
@param {RegExp} [options.exclude] - name exclusion filter
@param {ArrayLikeObject} [options.types] - type inclusion filter(s)
@param {boolean} [options.details] - boolean indicating whether to include additional variable details, such as variable type, contents, etc
@returns {(Array|void)} workspace variable names