function onCommand( workspace, variable, value ) {
		var list;
		var desc;
		var err;
		var i;
		if ( !isString( workspace ) ) {
			err = new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', workspace ) );
			debug( 'Error: %s', err.message );
			repl._ostream.write( 'Error: '+err.message+'\n' );
			return;
		}
		if ( workspace === repl._currentWorkspace ) {
			repl._context[ variable ] = value;
			return;
		}
		if ( !hasOwnProp( repl._workspaces, workspace ) ) {
			err = new Error( format( 'invalid argument. Unrecognized workspace name. Value: `%s`.', workspace ) );
			debug( 'Error: %s', err.message );
			repl._ostream.write( 'Error: '+err.message+'\n' );
			return;
		}
		list = repl._workspaces[ workspace ];
		for ( i = 0; i < list.length; i += 2 ) {
			if ( list[ i ] === variable ) {
				desc = list[ i+1 ];

				// Check if descriptor has a setter:
				if ( typeof desc.set === 'function' ) {
					// WARNING: the `this` context is not defined, as the variable is not actually bound to a global instance!
					desc.set.call( null, value );
					return;
				}
				// Check if the variable is read-only:
				if ( typeof desc.get === 'function' || desc.writable === false ) {
					err = new Error( format( 'Cannot assign to read only property %s of object #<Object>', variable ) ); // Note: this mirrors the built-in environment error message
					debug( 'Error: %s', err.message );
					repl._ostream.write( 'Error: '+err.message+'\n' );
					return;
				}
				desc.value = value;
				return;
			}
		}
		// Create a workspace variable by defining a property descriptor equivalent to when a user defines a variable within a global context (e.g., `var x = 3.14`):
		list.push( variable, {
			'configurable': true,
			'enumerable': true,
			'writable': true,
			'value': value
		});
	}
Assigns a value to a variable in a specified workspace.

@private
@param {string} workspace - workspace name
@param {(string|symbol)} variable - variable name
@param {*} value - value to assign
@returns {void}