add mcrcon aliases
This commit is contained in:
parent
54c863c4a7
commit
42edb52b80
2 changed files with 19 additions and 3 deletions
16
.xonshrc
16
.xonshrc
|
@ -75,6 +75,20 @@ def _alias():
|
|||
else:
|
||||
print(alias + " =", " ".join(aliases[alias]))
|
||||
|
||||
def _mcrcon(args: list):
|
||||
if p"~/.mcrcon".exists():
|
||||
source "~/.mcrcon"
|
||||
else:
|
||||
raise FileNotFoundError("~/.mcrcon")
|
||||
$(mcrcon @(" ".join(args)))
|
||||
|
||||
def _mcterm():
|
||||
if p"~/.mcrcon".exists():
|
||||
source "~/.mcrcon"
|
||||
else:
|
||||
raise FileNotFoundError("~/.mcrcon")
|
||||
mcrcon -t
|
||||
|
||||
# aliases
|
||||
aliases.update({
|
||||
'bwg': _bwc,
|
||||
|
@ -83,6 +97,8 @@ aliases.update({
|
|||
'config': '/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME',
|
||||
'debug': _debug,
|
||||
'ls': 'ls -alhs --color=auto',
|
||||
'mc': _mcrcon,
|
||||
'mct': _mcterm,
|
||||
':q': 'exit',
|
||||
'owo': 'echo uwu',
|
||||
'ensure-tmux': _ensure_tmux,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue