1.2.1.4. rezplugins.shell package

1.2.1.4.1. Submodules

1.2.1.4.2. rezplugins.shell.bash module

Bash shell

class rezplugins.shell.bash.Bash[source]

Bases: rezplugins.shell.sh.SH

alias(key, value)[source]
classmethod get_startup_sequence(rcfile, norc, stdin, command)[source]

Return a dict containing: - ‘stdin’: resulting stdin setting. - ‘command’: resulting command setting. - ‘do_rcfile’: True if a file should be sourced directly. - ‘envvar’: Env-var that points at a file to source at startup. Can be None. - ‘files’: Existing files that will be sourced (non-user-expanded), in source

order. This may also incorporate rcfile, and file pointed at via envvar. Can be empty.
  • ‘bind_files’: Files to inject Rez binding into, even if that file doesn’t
    already exist.
  • ‘source_bind_files’: Whether to source bind files, if they exist.
classmethod name()[source]

Plugin name.

norc_arg = '--norc'
rcfile_arg = '--rcfile'
classmethod startup_capabilities(rcfile=False, norc=False, stdin=False, command=False)[source]

Given a set of options related to shell startup, return the actual options that will be applied. @returns 4-tuple representing applied value of each option.

rezplugins.shell.bash.register_plugin()[source]

1.2.1.4.3. rezplugins.shell.csh module

CSH shell

class rezplugins.shell.csh.CSH[source]

Bases: rez.shells.UnixShell

alias(key, value)[source]
escape_string(value)[source]

Escape a string.

Escape the given string so that special characters (such as quotes and whitespace) are treated properly. If value is a string, assume that this is an expandable string in this interpreter.

Note

This default implementation returns the string with no escaping applied.

Parameters:value (str or EscapedString) – String to escape.
classmethod file_extension()[source]

Get the file extension associated with the shell.

Returns:Shell file extension.
Return type:str
classmethod get_startup_sequence(rcfile, norc, stdin, command)[source]

Return a dict containing: - ‘stdin’: resulting stdin setting. - ‘command’: resulting command setting. - ‘do_rcfile’: True if a file should be sourced directly. - ‘envvar’: Env-var that points at a file to source at startup. Can be None. - ‘files’: Existing files that will be sourced (non-user-expanded), in source

order. This may also incorporate rcfile, and file pointed at via envvar. Can be empty.
  • ‘bind_files’: Files to inject Rez binding into, even if that file doesn’t
    already exist.
  • ‘source_bind_files’: Whether to source bind files, if they exist.
classmethod get_syspaths()[source]
histfile = '~/.history'
histvar = 'histfile'
last_command_status = '$status'
classmethod name()[source]

Plugin name.

norc_arg = '-f'
setenv(key, value)[source]
source(value)[source]
classmethod startup_capabilities(rcfile=False, norc=False, stdin=False, command=False)[source]

Given a set of options related to shell startup, return the actual options that will be applied. @returns 4-tuple representing applied value of each option.

unsetenv(key)[source]
rezplugins.shell.csh.register_plugin()[source]

1.2.1.4.4. rezplugins.shell.sh module

SH shell

class rezplugins.shell.sh.SH[source]

Bases: rez.shells.UnixShell

alias(key, value)[source]
escape_string(value)[source]

Escape a string.

Escape the given string so that special characters (such as quotes and whitespace) are treated properly. If value is a string, assume that this is an expandable string in this interpreter.

Note

This default implementation returns the string with no escaping applied.

Parameters:value (str or EscapedString) – String to escape.
classmethod file_extension()[source]

Get the file extension associated with the shell.

Returns:Shell file extension.
Return type:str
classmethod get_startup_sequence(rcfile, norc, stdin, command)[source]

Return a dict containing: - ‘stdin’: resulting stdin setting. - ‘command’: resulting command setting. - ‘do_rcfile’: True if a file should be sourced directly. - ‘envvar’: Env-var that points at a file to source at startup. Can be None. - ‘files’: Existing files that will be sourced (non-user-expanded), in source

order. This may also incorporate rcfile, and file pointed at via envvar. Can be empty.
  • ‘bind_files’: Files to inject Rez binding into, even if that file doesn’t
    already exist.
  • ‘source_bind_files’: Whether to source bind files, if they exist.
classmethod get_syspaths()[source]
histfile = '~/.bash_history'
histvar = 'HISTFILE'
classmethod name()[source]

Plugin name.

norc_arg = '--noprofile'
setenv(key, value)[source]
source(value)[source]
classmethod startup_capabilities(rcfile=False, norc=False, stdin=False, command=False)[source]

Given a set of options related to shell startup, return the actual options that will be applied. @returns 4-tuple representing applied value of each option.

unsetenv(key)[source]
rezplugins.shell.sh.register_plugin()[source]

1.2.1.4.5. rezplugins.shell.tcsh module

TCSH shell

class rezplugins.shell.tcsh.TCSH[source]

Bases: rezplugins.shell.csh.CSH

escape_string(value)[source]

Escape a string.

Escape the given string so that special characters (such as quotes and whitespace) are treated properly. If value is a string, assume that this is an expandable string in this interpreter.

Note

This default implementation returns the string with no escaping applied.

Parameters:value (str or EscapedString) – String to escape.
classmethod name()[source]

Plugin name.

rezplugins.shell.tcsh.register_plugin()[source]

1.2.1.4.6. rezplugins.shell.windows module

1.2.1.4.7. Module contents