1
Fork 0
mirror of https://github.com/thegeneralist01/config.git synced 2026-05-30 08:37:01 +02:00

Compare commits

..

No commits in common. "0505ec375b045e17cdc5f9c744303b01a82d593a" and "65ad4a6d6bd14bfbafe2091d6b3471cc788577b4" have entirely different histories.

2 changed files with 39 additions and 51 deletions

View file

@ -219,10 +219,6 @@ do --env {
if ($env.IN_NIX_SHELL? | is-not-empty) { if ($env.IN_NIX_SHELL? | is-not-empty) {
$suffix ++= [ $"(ansi light_blue_bold)nix" ] $suffix ++= [ $"(ansi light_blue_bold)nix" ]
} }
# .VENV
if ($env.VIRTUAL_ENV? | is-not-empty) {
$suffix ++= [ $"(ansi light_green_bold)($env.VIRTUAL_ENV_PROMPT)" ]
}
$suffix | each { $'(ansi light_yellow_bold)•(ansi reset) ($in)(ansi reset)' } | str join " " $suffix | each { $'(ansi light_yellow_bold)•(ansi reset) ($in)(ansi reset)' } | str join " "
} }
@ -230,7 +226,6 @@ do --env {
([ $prefix, $body, $suffix ] | str join " ") + (char newline) ([ $prefix, $body, $suffix ] | str join " ") + (char newline)
} }
$env.VIRTUAL_ENV_DISABLE_PROMPT = true
$env.PROMPT_INDICATOR = $"(ansi light_yellow_bold)┃(ansi reset) " $env.PROMPT_INDICATOR = $"(ansi light_yellow_bold)┃(ansi reset) "
$env.PROMPT_INDICATOR_VI_NORMAL = $env.PROMPT_INDICATOR $env.PROMPT_INDICATOR_VI_NORMAL = $env.PROMPT_INDICATOR
$env.PROMPT_INDICATOR_VI_INSERT = $env.PROMPT_INDICATOR $env.PROMPT_INDICATOR_VI_INSERT = $env.PROMPT_INDICATOR

View file

@ -1,19 +1,15 @@
{ lib, pkgs, ... }: { lib, pkgs, ... }: let
let
inherit (lib) getExe; inherit (lib) getExe;
zoxide = getExe pkgs.zoxide; zoxide = getExe pkgs.zoxide;
in in {
{ home-manager.sharedModules = [{
home-manager.sharedModules = [
{
programs.zoxide = { programs.zoxide = {
enable = true; enable = true;
options = [ "--cmd cd" ]; options = [ "--cmd cd" ];
enableNushellIntegration = false; enableNushellIntegration = false;
}; };
programs.nushell.extraConfig = # nu programs.nushell.extraConfig = /* nu */ ''
''
# Zoxide integration with full path # Zoxide integration with full path
$env.config = ($env.config? | default {}) $env.config = ($env.config? | default {})
$env.config.hooks = ($env.config.hooks? | default {}) $env.config.hooks = ($env.config.hooks? | default {})
@ -33,8 +29,6 @@ in
$env.HOME $env.HOME
} else if ($rest | length) == 1 and ($rest.0 == "-") { } else if ($rest | length) == 1 and ($rest.0 == "-") {
$env.OLDPWD $env.OLDPWD
} else if ($rest | length) == 1 and (($rest.0 | path expand) | path exists) {
$rest.0
} else { } else {
${zoxide} query --exclude (pwd) -- ...$rest | str trim -r -c (char newline) ${zoxide} query --exclude (pwd) -- ...$rest | str trim -r -c (char newline)
} }
@ -49,6 +43,5 @@ in
alias cd = __zoxide_z alias cd = __zoxide_z
alias cdi = __zoxide_zi alias cdi = __zoxide_zi
''; '';
} }];
];
} }