Info= “-c cmdstring”

In addition to passing the Parm value and the edit file name, Info can specify commands to be executed, with the -c option. The -c is followed by the commands to be executed. If those commands contain a space, they must be enclosed in one of the Qedit quote characters; otherwise, the quotes are optional. Note that the -c must be lowercase, as in UNIX.

The Parm value, if any, is specified before the -c option, and the file name to edit, if specified, must be placed after the -c option. When both -c and a file name occur, the -c commands are executed after the file is accessed for editing. Here are some examples:

  qedit "-c visual myfile"  qedit "-c :visual: myfile"  qedit '-c "set vis ab 3 bel 12;visual" myfile'  qedit "-c 'text abc;use fixit;k,y;e'"  qedit "-p 64 -c visual myfile"  

The underscore character can be used as a string delimiter and as as valid character in a Posix filename. If you enter a filename containing an underscore in the INFO= string parameter, Qedit interprets the underscore as a string delimiter. This is a known problem and we are working on a permanent fix for it. For example, if you enter:

  run qedit.pub.robelle;info='-c "t my_history;vi"'  

This command should start up Qedit, have it open the Posix file called my_history and go into full-screen mode automatically. However, since the underscore is seen as a string delimiter, whatever follows is basically ignored during command processing. Thus, the file is opened but Qedit stays at the line-mode prompt.

We hope to have a permanent fix in a future release. In the meantime, the workaround is to explicitly identify the underscore as being part of the filename. You can do this in different ways. Here are two examples.

  run qedit.pub.robelle;info='-c t $file \my_history\;vi"'  

The $file keyword and the backslash characters are used to clearly identify the filename. The other approach is remove the underscore from the list of valid delimiters using the Set StringDelimiters command.

  run qedit.pub.robelle;info='set stringd posix;-c "t my_history;vi"'  

The $file approach is simpler as it only affects that particular command. The Set StringDelimiters approach should be used with caution as it might affect other commands during the edit session.

Info= "-c cmdstring"