diff options
Diffstat (limited to 'dot_config/xonsh')
| -rw-r--r-- | dot_config/xonsh/rc.xsh | 23 |
1 files changed, 23 insertions, 0 deletions
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' |