mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 16:34:47 +01:00
Example of 3-tuple alias retval added to tutorial.
This commit is contained in:
parent
20520c17d6
commit
08c727efaf
1 changed files with 5 additions and 0 deletions
|
@ -791,6 +791,11 @@ must have the following signature:
|
||||||
stderr = None
|
stderr = None
|
||||||
return stdout, stderr
|
return stdout, stderr
|
||||||
|
|
||||||
|
# Lastly, a 3-tuple return value can be used to include an integer
|
||||||
|
# return code indicating failure (> 0 return code). In the previous
|
||||||
|
# examples the return code would be 0/success.
|
||||||
|
return (None, "I failed", 2)
|
||||||
|
|
||||||
We can dynamically alter the aliases present simply by modifying the
|
We can dynamically alter the aliases present simply by modifying the
|
||||||
built-in mapping. Here is an example using a function value:
|
built-in mapping. Here is an example using a function value:
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue