hsh :: command :: JobReference :: Class JobReference
[hide private]
[frames] | no frames]

Class JobReference

object --+            
         |            
     Token --+        
             |        
     LeafToken --+    
                 |    
       BracedToken --+
                     |
                    JobReference

A reference to some feature of a job, starting with a % and optionally using braces to surround the value.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
_parse(self)
Break up the string into component parts.
 
_expand_feature(self, job, feature)
 
_expand_feature_filetype(self, ftype)
 
expand(self)
Return the expanded version of this token.
 
completions(self, cloc)
Return a list of completions for this token from the specified cursor location.

Inherited from BracedToken: terminated, terminates

Inherited from BracedToken (private): _braced, _completions, _text

Inherited from LeafToken: __len__, __str__, dump, modify

Inherited from Token: commences, expand_directives

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  dquotable = True
  commencer_ch = '%'
  parsere = re.compile(r'^([0-9]*)([a-zA-Z,]*)$')
  feature_list = ['p', 'fo', 'fe', 'fi', 'to', 'te', 'ti']
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

expand(self)

 

Return the expanded version of this token. Return value is a list of strings in which any special shell syntax is replaced with its expanded value, appropriate for passing as an arg in a process invocation.

Arg tokens will perform glob expansion on the results of this value, so other tokens should protect their response using escape_glob_chars() if appropriate.

The default implementation returns an array with one element containing the raw token.

Overrides: Token.expand
(inherited documentation)

completions(self, cloc)

 

Return a list of completions for this token from the specified cursor location. If no possible completions exist, [] is returned. If possible completions exist, a list of strings is returned. The first item is the root of the completions, the rest are possible extensions of the root. Most tokens will return None if the cursor is not at the end. The default implementation returns nothing.

Overrides: Token.completions
(inherited documentation)