mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-05 17:00:58 +01:00
10 lines
268 B
Python
10 lines
268 B
Python
"""Bash-like interface extensions for xonsh."""
|
|
|
|
|
|
@events.on_precommand
|
|
def bash_preproc(cmd):
|
|
if not __xonsh_history__.inps:
|
|
if cmd.strip() == '!!':
|
|
return ''
|
|
return cmd
|
|
return cmd.replace('!!', __xonsh_history__.inps[-1].strip())
|