Skip to content

Commit cb0916b

Browse files
authored
Update callias.xsh
1 parent d51935d commit cb0916b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

callias.xsh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ def _print_to_tty(message):
1717

1818
def _printer(a,i,o,e):
1919
"""Print into all kinds of streams."""
20-
alias_name = XSH.env.get('__ALIAS_NAME', inspect.stack()[0][3])
20+
func_name = inspect.stack()[0][3]
21+
alias_name = XSH.env.get('__ALIAS_NAME', func_name)
2122
name = alias_name
2223
print(f"{name}: alias.stdout", file=o)
2324
print(f"{name}: alias.stderr", file=e)

0 commit comments

Comments
 (0)