# === Environment and Alias Setup === $env.PATH = ($env.PATH | prepend '~/.fzf/bin' | prepend '~/.local/bin' | prepend '/snap/bin') source $"($nu.home-path)/.cargo/env.nu" $env.EDITOR = "nvim" $env.VISUAL = "nvim" alias ls = eza --icons --git alias ll = eza -l --icons --git alias la = eza -la --icons --git alias tree = eza --tree alias carapace = carapace-bin # === Source Application Scripts === source ~/.config/nushell/atuin.nu source ~/.config/nushell/carapace.nu source ~/.config/nushell/zoxide.nu # === Configure Starship Prompt (Corrected Syntax) === # The modern syntax checks if the variable exists. $env.PROMPT_COMMAND = {|| starship prompt --cmd-duration $env.CMD_DURATION_MS? } $env.PROMPT_COMMAND_RIGHT = {|| starship prompt --right } # === Define Final Keybindings === $env.config = ($env.config | update keybindings ( $env.config.keybindings | where name != 'history-menu' | where name != 'history-search-backward' | append { name: fzf-file-widget modifier: control keycode: char_t mode: [emacs, vi_normal, vi_insert] event: { send: executehostcommand cmd: $"commandline edit (fzf)" } } ) )