Please enable JavaScript to view this site.

A-Shell Reference

Navigation: Subroutines > HOSTEX

Command Modifiers

Scroll Prev Top Next More

Modified March 2017; see History

By default, the current program is suspended while waiting for the command to finish executing. In other words, the command is executed like it was a subroutine. However, this can be modified by appending a modifier to the end of the cmd string, from the following table:

Modifier

Function

<none>

Current process is suspended while waiting for the command to complete

&

Command executes in background (or in the case of Windows, minimized) and in parallel with current job. (Current job not suspended.)

%

(Windows only) Command executes in a minimized window, but current job is suspended while waiting for it to complete. This is most useful for minimizing the screen flash which would otherwise accompany a command that executed very quickly.

$

(Windows only) Command executes in a normal window, but current job is not suspended.

#

(Windows only) Similar to "$", except that it allows the child process to inherit the handles opened by the parent. This is mainly only of interest for passing a socket opened by the parent to the child, so that the parent can close it and accept another on the same port.

^

(Windows only) Allows for a slight variation in the Windows behavior that you otherwise would get without specifying any suffix character. In both cases, the parent session waits for the child to exit, but in the case of the "^" suffix, it does not try to get the focus back when the child returns, and it doesn't notify any sibling A-Shell sessions when the user transmits keystrokes or mouse events while waiting that are ignored by the child while the parent is waiting.

This addresses an exotic situation with child processes that have no user interface support but which take long enough that it becomes likely for the user to either switch to another session in the meantime, or to try mouse or keyboard actions in the suspended parent session which then interfered with a  sibling A-Shell session.

 

The command modifier, if present, should be separated from the end of the cmd string by a space. For example, to launch the Windows calculator without suspending the current job, you would use:

xcall HOSTEX,"CALC.EXE $"

History

2017 March, A-Shell A-Shell 6.3.1545:  added ^ switch

2006 July, A-Shell A-Shell 4.9.960:  added # switch