When running on Unix and Windows NT/2000/XP, the system shell lets you access and change operating system-specific environment variables. On other systems, you can define and use variables, but they are runmcconsole-specific.
To accommodate both Windows and Unix users, three forms of variable syntax are supported by the system shell:
%name%
$name
${name}
The following variables are defined under all circumstances, independent of operating system-specific environment variables being available or not:
${c} - if the current buffer is a Java file, the current buffer's fully qualified class name, including the package (if the buffer contains a package statement).
${d} - the current buffer's directory.
${f} - the current buffer's path name.
${n} - the current buffer's name.
${BROWSER_DIR} - the current directory displayed in the file system browser, or an empty string if the file system browser is not visible.
${JEDIT_HOME} - the full path of the directory where jEdit is installed.
${JEDIT_SETTINGS} - the full path of the jEdit settings directory.
${PKG} - if the current buffer is a Java file, the current buffer's package name (or if the buffer doesn't contain a package statement, an empty string).
${PWD} - the current working directory.
${ROOT} - the package root of the current buffer. For example, if the current buffer's fully qualified class name is org.gjt.sp.jedit.jEdit and it is contained in the /home/slava/jEdit/org/gjt/sp/jedit/ directory, this will return /home/slava/jEdit/.
~ - this is not a "variable" per-se, and it is specified using a different syntax, but it makes sense to mention it here. It expands to the full path of the user's home directory.
The following system shell built-ins deal with environment variables:
%env: prints a list of all environment variables, excluding the dynamic ones documented above.
%set name value: sets the value of the specified environment variable. Note that if the desired value contains whitespace, you will need to quote it, otherwise it will be treated as several arguments.
%unset name: clears the value of the specified environment variable.
To insert a "$" or "%" literally in the command string, you can write "$$" and "%%".