From 2140ab51deed88e90eafebf9520fa5f9995dc7c9 Mon Sep 17 00:00:00 2001 From: twells46 <173561638+twells46@users.noreply.github.com> Date: Wed, 31 Dec 2025 13:28:05 -0600 Subject: Migrate from stow --- dot_config/xonsh/rc.xsh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 dot_config/xonsh/rc.xsh (limited to 'dot_config/xonsh') diff --git a/dot_config/xonsh/rc.xsh b/dot_config/xonsh/rc.xsh new file mode 100644 index 0000000..4ebeb66 --- /dev/null +++ b/dot_config/xonsh/rc.xsh @@ -0,0 +1,23 @@ +# XONSH WEBCONFIG START +$PROMPT = '{YELLOW}{env_name}{RESET}{GREEN}{cwd}{RESET} {RED}{last_return_code_if_nonzero:[{BOLD_INTENSE_RED}{}{RED}] }{RESET}{BOLD_BLUE}{prompt_end}{RESET} ' +# XONSH WEBCONFIG END + +xontrib load coreutils +#xontrib load fish_completer + +$CARAPACE_BRIDGES='zsh,fish,bash,inshellisense' +$COMPLETIONS_CONFIRM=True +exec($(carapace _carapace)) + +@aliases.register +@aliases.return_command +def _lfcd(args): + # This returns a command + # The outer $() runs a subshell, very similar to bash and co. + # The @$(cmd) is a shorthand for @([i.strip() for i in $(cmd).split()]). + # Essentially, it runs the output of the command as a command. + # In this case, `which -s lf` gets the `lf` binary, + # rather than the alias defined below. + return ['cd', $(@$(which -s lf) -print-last-dir @(args))] + +aliases['lf'] = 'lfcd' -- cgit v1.2.3