Skip to content

Instantly share code, notes, and snippets.

@takscape
Created January 27, 2022 14:00
Show Gist options
  • Save takscape/927e9e9aefa4934fcae28ac4ac59326d to your computer and use it in GitHub Desktop.
Save takscape/927e9e9aefa4934fcae28ac4ac59326d to your computer and use it in GitHub Desktop.
.xonshrc example
# vim: ft=python
def _init():
import os.path as p
$XONSH_ENCODING = "utf-8"
$XONSH_SHOW_TRACEBACK = False
$FORCE_POSIX_PATHS = True
$XONSH_COLOR_STYLE = "monokai"
$XONSH_HISTORY_BACKEND = 'sqlite'
$PROMPT = "{env_name:{} }{BOLD_CYAN}{cwd_base}{branch_color}{curr_branch: {}}{RESET} ${RESET} "
if "del" in aliases:
del aliases["del"]
if "dir" in aliases:
aliases["di"] = aliases["dir"]
del aliases["dir"]
aliases["vi"] = ["C:/tools/neovim/Neovim/bin/nvim.exe"]
aliases["p"] = ["powershell.exe", "-ExecutionPolicy", "RemoteSigned"]
aliases["ps"] = ["busybox.exe", "ps"]
aliases["kill"] = ["busybox.exe", "kill"]
aliases["uname"] = ["busybox.exe", "uname"]
aliases["env"] = ["busybox.exe", "env"]
aliases["ls"] = ["busybox.exe", "ls"]
aliases["la"] = ["busybox.exe", "ls", "-al"]
aliases["rm"] = ["busybox.exe", "rm"]
aliases["cp"] = ["busybox.exe", "cp"]
aliases["mv"] = ["busybox.exe", "mv"]
aliases["touch"] = ["busybox.exe", "touch"]
aliases["cat"] = ["busybox.exe", "cat"]
aliases["pwd"] = ["busybox.exe", "pwd"]
aliases["less"] = ["busybox.exe", "less"]
aliases["grep"] = ["busybox.exe", "grep"]
aliases["sed"] = ["busybox.exe", "sed"]
aliases["awk"] = ["busybox.exe", "awk"]
aliases["head"] = ["busybox.exe", "head"]
aliases["tail"] = ["busybox.exe", "tail"]
aliases["wget"] = ["busybox.exe", "wget"]
aliases["bash"] = ["busybox.exe", "bash"]
aliases["man"] = ["busybox.exe", "man"]
try:
_init()
finally:
del _init
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment