diff --git a/private_Library/private_Application Support/nushell/config.nu b/private_Library/private_Application Support/nushell/config.nu deleted file mode 100644 index 94f287d..0000000 --- a/private_Library/private_Application Support/nushell/config.nu +++ /dev/null @@ -1,98 +0,0 @@ -# Nushell Config File - -module completions { - # Custom completions for external commands (those outside of Nushell) - # Each completions has two parts: the form of the external command, including its flags and parameters - # and a helper command that knows how to complete values for those flags and parameters - # - # This is a simplified version of completions for git branches and git remotes - def "nu-complete git branches" [] { - ^git branch | lines | each { |line| $line | str replace '[\*\+] ' '' | str trim } - } - - def "nu-complete git remotes" [] { - ^git remote | lines | each { |line| $line | str trim } - } - - export extern "git checkout" [ - branch?: string@"nu-complete git branches" # name of the branch to checkout - -b: string # create and checkout a new branch - -B: string # create/reset and checkout a branch - -l # create reflog for new branch - --guess # second guess 'git checkout ' (default) - --overlay # use overlay mode (default) - --quiet(-q) # suppress progress reporting - --recurse-submodules: string # control recursive updating of submodules - --progress # force progress reporting - --merge(-m) # perform a 3-way merge with the new branch - --conflict: string # conflict style (merge or diff3) - --detach(-d) # detach HEAD at named commit - --track(-t) # set upstream info for new branch - --force(-f) # force checkout (throw away local modifications) - --orphan: string # new unparented branch - --overwrite-ignore # update ignored files (default) - --ignore-other-worktrees # do not check if another worktree is holding the given ref - --ours(-2) # checkout our version for unmerged files - --theirs(-3) # checkout their version for unmerged files - --patch(-p) # select hunks interactively - --ignore-skip-worktree-bits # do not limit pathspecs to sparse entries only - --pathspec-from-file: string # read pathspec from file - ] - - export extern "git push" [ - remote?: string@"nu-complete git remotes", # the name of the remote - refspec?: string@"nu-complete git branches"# the branch / refspec - --verbose(-v) # be more verbose - --quiet(-q) # be more quiet - --repo: string # repository - --all # push all refs - --mirror # mirror all refs - --delete(-d) # delete refs - --tags # push tags (can't be used with --all or --mirror) - --dry-run(-n) # dry run - --porcelain # machine-readable output - --force(-f) # force updates - --force-with-lease: string # require old value of ref to be at this value - --recurse-submodules: string # control recursive pushing of submodules - --thin # use thin pack - --receive-pack: string # receive pack program - --exec: string # receive pack program - --set-upstream(-u) # set upstream for git pull/status - --progress # force progress reporting - --prune # prune locally removed refs - --no-verify # bypass pre-push hook - --follow-tags # push missing but relevant tags - --signed: string # GPG sign the push - --atomic # request atomic transaction on remote side - --push-option(-o): string # option to transmit - --ipv4(-4) # use IPv4 addresses only - --ipv6(-6) # use IPv6 addresses only - ] -} - -# Get just the extern definitions without the custom completion commands -use completions * - - -# Custom settings -let-env config = { - rm_always_trash: true, - edit_mode: vi, - max_history_size: 100000, - footer_mode: auto, - history_file_format: "sqlite", -} - -### Setup aliases -alias edit = ^($env.EDITOR) -alias start = ^open -alias less = bat -alias set-light-theme = kitty +kitten themes Breakers -alias set-dark-theme = kitty +kitten themes Mariana -alias brew-backup = brew bundle dump --global --no-lock --cask --mas --tap --force -alias brew-cleanup = brew bundle cleanup --global --no-lock --force --zap -alias brew-restore = brew bundle install --global --no-lock -alias packer-sync = nvim --headless -c "autocmd User PackerComplete quitall" -c "PackerSync" - -# Load autojump plugin "zoxide" -source ~/.cache/zoxide/zoxide.nu diff --git a/private_Library/private_Application Support/nushell/env.nu b/private_Library/private_Application Support/nushell/env.nu deleted file mode 100644 index 560f43f..0000000 --- a/private_Library/private_Application Support/nushell/env.nu +++ /dev/null @@ -1,70 +0,0 @@ -# Nushell Environment Config File - -# Load standardised prompt "starship" -# TEMP: Custom vi prompt indicators -let-env PROMPT_INDICATOR_VI_INSERT = "" -let-env PROMPT_INDICATOR_VI_NORMAL = "" -source ~/.cache/starship/init.nu - -# Specifies how environment variables are: -# - converted from a string to a value on Nushell startup (from_string) -# - converted from a value back to a string when running external commands (to_string) -# Note: The conversions happen *after* config.nu is loaded -let-env ENV_CONVERSIONS = { - "PATH": { - from_string: { |s| $s | split row (char esep) } - to_string: { |v| $v | str collect (char esep) } - } - "Path": { - from_string: { |s| $s | split row (char esep) } - to_string: { |v| $v | str collect (char esep) } - } -} - -# Directories to search for scripts when calling source or use -# -# By default, /scripts is added -let-env NU_LIB_DIRS = [ - ($nu.config-path | path dirname | path join 'scripts') -] - -# Directories to search for plugin binaries when calling register -# -# By default, /plugins is added -let-env NU_PLUGIN_DIRS = [ - ($nu.config-path | path dirname | path join 'plugins') -] - -# To add entries to PATH (on Windows you might use Path), you can use the following pattern: -# From MacOS helper (/usr/libexec/path_helper) -let-env PATH = ($env.PATH | append "/Library/TeX/texbin") -let-env PATH = ($env.PATH | append "/Library/Apple/usr/bin") -let-env PATH = ($env.PATH | append "/opt/homebrew/bin") -let-env PATH = ($env.PATH | append "/opt/homebrew/sbin") -let-env PATH = ($env.PATH | append "/usr/local/bin") -# Optional Homebrew packages -let-env PATH = ($env.PATH | prepend $"(brew --prefix | str trim)/opt/bison/bin") -let-env PATH = ($env.PATH | prepend $"(brew --prefix | str trim)/opt/flex/bin") -let-env PATH = ($env.PATH | prepend $"(brew --prefix | str trim)/opt/llvm/bin") -let-env PATH = ($env.PATH | prepend $"(brew --prefix | str trim)/opt/openjdk/bin") -# Other package managers -let-env PATH = ($env.PATH | prepend $"($env.HOME)/.local/bin") -let-env PATH = ($env.PATH | prepend $"($env.HOME)/.cargo/bin") - -# --- user custom --- -# Set default editor -let-env EDITOR = "nvim" -# Alias for Monash compute cluster -let-env BIGBAD = "compute.optimisation-2020.cloud.edu.au" -# CMake settings -let-env CMAKE_EXPORT_COMPILE_COMMANDS = "1" # output compile-commands.json for clangd -let-env CMAKE_GENERATOR = "Sublime Text 2 - Ninja" # use Ninja generator by default -# Default find command for FZF -let-env FZF_DEFAULT_COMMAND = "fd --type f" -# Homebrew shell setup (brew shellenv) -let-env HOMEBREW_PREFIX = "/opt/homebrew" -let-env HOMEBREW_CELLAR = "/opt/homebrew/Cellar" -let-env HOMEBREW_REPOSITORY = "/opt/homebrew" -let-env INFOPATH = "/opt/homebrew/share/info" -# Set MANPATH -let-env MANPATH = "/usr/share/man:/usr/local/share/man:/Library/TeX/Distributions/.DefaultTeX/Contents/Man:/opt/homebrew/share/man" diff --git a/run_nushell_generation.nu b/run_nushell_generation.nu deleted file mode 100644 index 5110f7c..0000000 --- a/run_nushell_generation.nu +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env nu - -# Generate zoxide configuration -if (which zoxide | empty?) == false { - mkdir ~/.cache/zoxide/ - zoxide init nushell --hook prompt | save ~/.cache/zoxide/zoxide.nu -} - -if (which starship | empty?) == false { - mkdir ~/.cache/starship/ - starship init nu | save ~/.cache/starship/init.nu -}