rezplugins.shell.csh

CSH shell

class rezplugins.shell.csh.CSH[source]

Bases: rez.shells.UnixShell

alias(key, value)[source]
escape_string(value, is_path=False)[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 that is_path provided because of the special case where a path-like envvar is set. In this case, path normalization, if it needs to occur, has to be part of the string escaping process.

Note

This default implementation returns the string with no escaping applied.

Parameters
  • value (str or EscapedString) – String to escape.

  • is_path (bool) – True if the value is path-like.

Returns

The escaped string.

Return type

str

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'
classmethod join(command)[source]

Note: Default to unix sh/bash- friendly behaviour.

Parameters

command – A sequence of program arguments to be joined into a single string that can be executed in the current shell.

Returns

A string object representing the command.

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]