/* * ----------------------------------------------------------------- * Execution of this macro requires a license for uni-XEDIT Extended * for each concurrent user of the macro. * ----------------------------------------------------------------- * * * * shellfile.xedit - macro to replace the "file" command that * includes support for expanding shell variables * and shorthand * * To use this, you must set a synonym with * * set synonym file shellfile * * This may be added to your .profile.xedit if you wish to use * this replacement at all times. * * shellfile.xedit calls three other external Rexx programs: * "expand", "justone", and "expmsg". These routines as well as * "shellfile.xedit", must be in a directory that is specified * in the XEDITPATH environment variable. * * Modification History: * * 25 Jul 94 twg Initial implementation * */ parse arg inparms /* get calling arguments */ filename = '' /* default for filename is null */ if inparms \= '' then do /* if a filename was specified on command line */ filename = expand(inparms) /* try to expand command line filespec */ if \justone(filename) then do /* error if filename is not single file */ call expmsg 'shellfile', msg /* print error message */ 'cmsg file' inparms /* restore command line for modification */ exit end end 'command file' filename /* do the file command */