From 57b514ec88678dd41b29606fe754956f971f4bba Mon Sep 17 00:00:00 2001 From: Cian Hughes Date: Fri, 13 Feb 2026 11:15:09 +0000 Subject: [PATCH] Updated completions --- dot_config/nushell/completions/nu_scripts.nu | 138 ++++++++- dot_config/nushell/completions/rbw.nu | 289 +++++++++++++++++++ dot_config/nushell/completions/zoxide.nu | 70 ----- dot_config/nushell/config.nu | 2 +- 4 files changed, 426 insertions(+), 73 deletions(-) create mode 100644 dot_config/nushell/completions/rbw.nu delete mode 100644 dot_config/nushell/completions/zoxide.nu diff --git a/dot_config/nushell/completions/nu_scripts.nu b/dot_config/nushell/completions/nu_scripts.nu index 6311e3f..0fd890f 100644 --- a/dot_config/nushell/completions/nu_scripts.nu +++ b/dot_config/nushell/completions/nu_scripts.nu @@ -1,4 +1,131 @@ -source ../nu_scripts/custom-completions/bitwarden-cli/bitwarden-cli-completions.nu +source ../nu_scripts/custom-completions/auto-generate/completions/7z.nu +source ../nu_scripts/custom-completions/auto-generate/completions/adduser.nu +source ../nu_scripts/custom-completions/auto-generate/completions/apk.nu +source ../nu_scripts/custom-completions/auto-generate/completions/apk.nu +source ../nu_scripts/custom-completions/auto-generate/completions/apt-get.nu +source ../nu_scripts/custom-completions/auto-generate/completions/aptitude.nu +source ../nu_scripts/custom-completions/auto-generate/completions/base64.nu +source ../nu_scripts/custom-completions/auto-generate/completions/btrfs.nu +source ../nu_scripts/custom-completions/auto-generate/completions/conda.nu +source ../nu_scripts/custom-completions/auto-generate/completions/conjure.nu +source ../nu_scripts/custom-completions/auto-generate/completions/convert.nu +source ../nu_scripts/custom-completions/auto-generate/completions/dconf.nu +source ../nu_scripts/custom-completions/auto-generate/completions/dd.nu +source ../nu_scripts/custom-completions/auto-generate/completions/diff.nu +source ../nu_scripts/custom-completions/auto-generate/completions/dmesg.nu +source ../nu_scripts/custom-completions/auto-generate/completions/dnf.nu +source ../nu_scripts/custom-completions/auto-generate/completions/feh.nu +source ../nu_scripts/custom-completions/auto-generate/completions/ffmpeg.nu +source ../nu_scripts/custom-completions/auto-generate/completions/flatpak.nu +source ../nu_scripts/custom-completions/auto-generate/completions/fzf.nu +source ../nu_scripts/custom-completions/auto-generate/completions/gcc.nu +source ../nu_scripts/custom-completions/auto-generate/completions/gdb.nu +source ../nu_scripts/custom-completions/auto-generate/completions/go.nu +source ../nu_scripts/custom-completions/auto-generate/completions/grep.nu +source ../nu_scripts/custom-completions/auto-generate/completions/gunzip.nu +source ../nu_scripts/custom-completions/auto-generate/completions/hugo.nu +source ../nu_scripts/custom-completions/auto-generate/completions/iex.nu +source ../nu_scripts/custom-completions/auto-generate/completions/ip.nu +source ../nu_scripts/custom-completions/auto-generate/completions/journalctl.nu +source ../nu_scripts/custom-completions/auto-generate/completions/jq.nu +source ../nu_scripts/custom-completions/auto-generate/completions/julia.nu +source ../nu_scripts/custom-completions/auto-generate/completions/kill.nu +source ../nu_scripts/custom-completions/auto-generate/completions/killall.nu +source ../nu_scripts/custom-completions/auto-generate/completions/ln.nu +source ../nu_scripts/custom-completions/auto-generate/completions/localectl.nu +source ../nu_scripts/custom-completions/auto-generate/completions/lsblk.nu +source ../nu_scripts/custom-completions/auto-generate/completions/lua.nu +source ../nu_scripts/custom-completions/auto-generate/completions/lz4.nu +source ../nu_scripts/custom-completions/auto-generate/completions/make.nu +source ../nu_scripts/custom-completions/auto-generate/completions/makepkg.nu +source ../nu_scripts/custom-completions/auto-generate/completions/md5sum.nu +source ../nu_scripts/custom-completions/auto-generate/completions/micro.nu +source ../nu_scripts/custom-completions/auto-generate/completions/minikube.nu +source ../nu_scripts/custom-completions/auto-generate/completions/mkdocs.nu +source ../nu_scripts/custom-completions/auto-generate/completions/mkfs.fat.nu +source ../nu_scripts/custom-completions/auto-generate/completions/mkfs.vfat.nu +source ../nu_scripts/custom-completions/auto-generate/completions/mkinitcpio.nu +source ../nu_scripts/custom-completions/auto-generate/completions/mkpasswd.nu +source ../nu_scripts/custom-completions/auto-generate/completions/modinfo.nu +source ../nu_scripts/custom-completions/auto-generate/completions/modprobe.nu +source ../nu_scripts/custom-completions/auto-generate/completions/mosh.nu +source ../nu_scripts/custom-completions/auto-generate/completions/mount.nu +source ../nu_scripts/custom-completions/auto-generate/completions/ncat.nu +source ../nu_scripts/custom-completions/auto-generate/completions/networkctl.nu +source ../nu_scripts/custom-completions/auto-generate/completions/nl.nu +source ../nu_scripts/custom-completions/auto-generate/completions/nm.nu +source ../nu_scripts/custom-completions/auto-generate/completions/nmap.nu +source ../nu_scripts/custom-completions/auto-generate/completions/nmcli.nu +source ../nu_scripts/custom-completions/auto-generate/completions/npkg.nu +source ../nu_scripts/custom-completions/auto-generate/completions/nvim.nu +source ../nu_scripts/custom-completions/auto-generate/completions/objdump.nu +source ../nu_scripts/custom-completions/auto-generate/completions/optimus-manager.nu +source ../nu_scripts/custom-completions/auto-generate/completions/pacaur.nu +source ../nu_scripts/custom-completions/auto-generate/completions/pacman-color.nu +source ../nu_scripts/custom-completions/auto-generate/completions/pacman-key.nu +source ../nu_scripts/custom-completions/auto-generate/completions/pacman.nu +source ../nu_scripts/custom-completions/auto-generate/completions/patch.nu +source ../nu_scripts/custom-completions/auto-generate/completions/pgrep.nu +source ../nu_scripts/custom-completions/auto-generate/completions/ping.nu +source ../nu_scripts/custom-completions/auto-generate/completions/pinky.nu +source ../nu_scripts/custom-completions/auto-generate/completions/poweroff.nu +source ../nu_scripts/custom-completions/auto-generate/completions/ps.nu +source ../nu_scripts/custom-completions/auto-generate/completions/python.nu +source ../nu_scripts/custom-completions/auto-generate/completions/python3.nu +source ../nu_scripts/custom-completions/auto-generate/completions/readlink.nu +source ../nu_scripts/custom-completions/auto-generate/completions/realpath.nu +source ../nu_scripts/custom-completions/auto-generate/completions/resolvectl.nu +source ../nu_scripts/custom-completions/auto-generate/completions/rfkill.nu +source ../nu_scripts/custom-completions/auto-generate/completions/rmdir.nu +source ../nu_scripts/custom-completions/auto-generate/completions/rmmod.nu +source ../nu_scripts/custom-completions/auto-generate/completions/rsync.nu +source ../nu_scripts/custom-completions/auto-generate/completions/rustc.nu +source ../nu_scripts/custom-completions/auto-generate/completions/sbcl.nu +source ../nu_scripts/custom-completions/auto-generate/completions/scp.nu +source ../nu_scripts/custom-completions/auto-generate/completions/setfacl.nu +source ../nu_scripts/custom-completions/auto-generate/completions/setsid.nu +source ../nu_scripts/custom-completions/auto-generate/completions/sftp.nu +source ../nu_scripts/custom-completions/auto-generate/completions/sha1sum.nu +source ../nu_scripts/custom-completions/auto-generate/completions/sha224sum.nu +source ../nu_scripts/custom-completions/auto-generate/completions/sha256sum.nu +source ../nu_scripts/custom-completions/auto-generate/completions/sha384sum.nu +source ../nu_scripts/custom-completions/auto-generate/completions/sha512sum.nu +source ../nu_scripts/custom-completions/auto-generate/completions/ssh.nu +source ../nu_scripts/custom-completions/auto-generate/completions/sshfs.nu +source ../nu_scripts/custom-completions/auto-generate/completions/strace.nu +source ../nu_scripts/custom-completions/auto-generate/completions/stream.nu +source ../nu_scripts/custom-completions/auto-generate/completions/su.nu +source ../nu_scripts/custom-completions/auto-generate/completions/sudo.nu +source ../nu_scripts/custom-completions/auto-generate/completions/systemctl.nu +source ../nu_scripts/custom-completions/auto-generate/completions/test.nu +source ../nu_scripts/custom-completions/auto-generate/completions/time.nu +source ../nu_scripts/custom-completions/auto-generate/completions/timedatectl.nu +source ../nu_scripts/custom-completions/auto-generate/completions/timeout.nu +source ../nu_scripts/custom-completions/auto-generate/completions/top.nu +source ../nu_scripts/custom-completions/auto-generate/completions/tracepath.nu +source ../nu_scripts/custom-completions/auto-generate/completions/traceroute.nu +source ../nu_scripts/custom-completions/auto-generate/completions/udevadm.nu +source ../nu_scripts/custom-completions/auto-generate/completions/umount.nu +source ../nu_scripts/custom-completions/auto-generate/completions/unexpand.nu +source ../nu_scripts/custom-completions/auto-generate/completions/unlz4.nu +source ../nu_scripts/custom-completions/auto-generate/completions/unzip.nu +source ../nu_scripts/custom-completions/auto-generate/completions/unzstd.nu +source ../nu_scripts/custom-completions/auto-generate/completions/useradd.nu +source ../nu_scripts/custom-completions/auto-generate/completions/userdbctl.nu +source ../nu_scripts/custom-completions/auto-generate/completions/usermod.nu +source ../nu_scripts/custom-completions/auto-generate/completions/w.nu +source ../nu_scripts/custom-completions/auto-generate/completions/wget.nu +source ../nu_scripts/custom-completions/auto-generate/completions/whatis.nu +source ../nu_scripts/custom-completions/auto-generate/completions/who.nu +source ../nu_scripts/custom-completions/auto-generate/completions/wine.nu +source ../nu_scripts/custom-completions/auto-generate/completions/xargs.nu +source ../nu_scripts/custom-completions/auto-generate/completions/xdg-mime.nu +source ../nu_scripts/custom-completions/auto-generate/completions/xinput.nu +source ../nu_scripts/custom-completions/auto-generate/completions/xz.nu +source ../nu_scripts/custom-completions/auto-generate/completions/zip.nu +source ../nu_scripts/custom-completions/auto-generate/completions/zstd.nu +source ../nu_scripts/custom-completions/auto-generate/completions/zypper.nu +source ../nu_scripts/custom-completions/bat/bat-completions.nu source ../nu_scripts/custom-completions/btm/btm-completions.nu source ../nu_scripts/custom-completions/cargo/cargo-completions.nu source ../nu_scripts/custom-completions/curl/curl-completions.nu @@ -7,20 +134,27 @@ source ../nu_scripts/custom-completions/flutter/flutter-completions.nu source ../nu_scripts/custom-completions/gh/gh-completions.nu source ../nu_scripts/custom-completions/git/git-completions.nu source ../nu_scripts/custom-completions/glow/glow-completions.nu +source ../nu_scripts/custom-completions/jj/jj-completions.nu source ../nu_scripts/custom-completions/just/just-completions.nu source ../nu_scripts/custom-completions/man/man-completions.nu source ../nu_scripts/custom-completions/mix/mix-completions.nu +source ../nu_scripts/custom-completions/mvn/mvn-completions.nu source ../nu_scripts/custom-completions/nano/nano-completions.nu +source ../nu_scripts/custom-completions/nano/nano.nu source ../nu_scripts/custom-completions/nix/nix-completions.nu +source ../nu_scripts/custom-completions/podman/podman-completions.nu source ../nu_scripts/custom-completions/poetry/poetry-completions.nu source ../nu_scripts/custom-completions/pre-commit/pre-commit-completions.nu source ../nu_scripts/custom-completions/pytest/pytest-completions.nu +source ../nu_scripts/custom-completions/pytest/pytest-completions.nu source ../nu_scripts/custom-completions/rg/rg-completions.nu source ../nu_scripts/custom-completions/rustup/rustup-completions.nu -source ../nu_scripts/custom-completions/rye/rye-completions.nu +source ../nu_scripts/custom-completions/scoop/scoop-completions.nu source ../nu_scripts/custom-completions/ssh/ssh-completions.nu source ../nu_scripts/custom-completions/tar/tar-completions.nu source ../nu_scripts/custom-completions/tealdeer/tldr-completions.nu +source ../nu_scripts/custom-completions/uv/uv-completions.nu source ../nu_scripts/custom-completions/vscode/vscode-completions.nu source ../nu_scripts/custom-completions/winget/winget-completions.nu source ../nu_scripts/custom-completions/zellij/zellij-completions.nu +source ../nu_scripts/custom-completions/zoxide/zoxide-completions.nu diff --git a/dot_config/nushell/completions/rbw.nu b/dot_config/nushell/completions/rbw.nu new file mode 100644 index 0000000..d338759 --- /dev/null +++ b/dot_config/nushell/completions/rbw.nu @@ -0,0 +1,289 @@ +module completions { + + # Unofficial Bitwarden CLI + export extern rbw [ + --help(-h) # Print help + --version(-V) # Print version + ] + + # Get or set configuration options + export extern "rbw config" [ + --help(-h) # Print help + ] + + # Show the values of all configuration settings + export extern "rbw config show" [ + --help(-h) # Print help + ] + + # Set a configuration option + export extern "rbw config set" [ + key: string # Configuration key to set + value: string # Value to set the configuration option to + --help(-h) # Print help + ] + + # Reset a configuration option to its default + export extern "rbw config unset" [ + key: string # Configuration key to unset + --help(-h) # Print help + ] + + # Print this message or the help of the given subcommand(s) + export extern "rbw config help" [ + ] + + # Show the values of all configuration settings + export extern "rbw config help show" [ + ] + + # Set a configuration option + export extern "rbw config help set" [ + ] + + # Reset a configuration option to its default + export extern "rbw config help unset" [ + ] + + # Print this message or the help of the given subcommand(s) + export extern "rbw config help help" [ + ] + + # Register this device with the Bitwarden server + export extern "rbw register" [ + --help(-h) # Print help (see more with '--help') + ] + + # Log in to the Bitwarden server + export extern "rbw login" [ + --help(-h) # Print help + ] + + # Unlock the local Bitwarden database + export extern "rbw unlock" [ + --help(-h) # Print help + ] + + # Check if the local Bitwarden database is unlocked + export extern "rbw unlocked" [ + --help(-h) # Print help + ] + + # Update the local copy of the Bitwarden database + export extern "rbw sync" [ + --help(-h) # Print help + ] + + # List all entries in the local Bitwarden database + export extern "rbw list" [ + --fields: string # Fields to display. Available options are id, name, user, folder. Multiple fields will be separated by tabs. + --raw # Display output as JSON + --help(-h) # Print help + ] + + # Display the password for a given entry + export extern "rbw get" [ + needle: string # Name, URI or UUID of the entry to display + user?: string # Username of the entry to display + --folder: string # Folder name to search in + --ignorecase(-i) # Ignore case + --field(-f): string # Field to get + --full # Display the notes in addition to the password + --raw # Display output as JSON + --clipboard(-c) # Copy result to clipboard + --help(-h) # Print help + ] + + # Search for entries + export extern "rbw search" [ + term: string # Search term to locate entries + --fields: string # Fields to display. Available options are id, name, user, folder. Multiple fields will be separated by tabs. + --folder: string # Folder name to search in + --raw # Display output as JSON + --help(-h) # Print help + ] + + # Display the authenticator code for a given entry + export extern "rbw code" [ + needle: string # Name, URI or UUID of the entry to display + user?: string # Username of the entry to display + --folder: string # Folder name to search in + --ignorecase(-i) # Ignore case + --clipboard # Copy result to clipboard + --help(-h) # Print help + ] + + # Add a new password to the database + export extern "rbw add" [ + name: string # Name of the password entry + user?: string # Username for the password entry + --uri: string # URI for the password entry + --folder: string # Folder for the password entry + --help(-h) # Print help (see more with '--help') + ] + + # Generate a new password + export extern "rbw generate" [ + len: string # Length of the password to generate + name?: string # Name of the password entry + user?: string # Username for the password entry + --uri: string # URI for the password entry + --folder: string # Folder for the password entry + --no-symbols # Generate a password with no special characters + --only-numbers # Generate a password consisting of only numbers + --nonconfusables # Generate a password without visually similar characters (useful for passwords intended to be written down) + --diceware # Generate a password of multiple dictionary words chosen from the EFF word list. The len parameter for this option will set the number of words to generate, rather than characters. + --help(-h) # Print help (see more with '--help') + ] + + # Modify an existing password + export extern "rbw edit" [ + needle: string # Name, URI or UUID of the entry to display + user?: string # Username of the entry to display + --folder: string # Folder name to search in + --ignorecase(-i) # Ignore case + --help(-h) # Print help (see more with '--help') + ] + + # Remove a given entry + export extern "rbw remove" [ + needle: string # Name, URI or UUID of the entry to display + user?: string # Username of the entry to display + --folder: string # Folder name to search in + --ignorecase(-i) # Ignore case + --help(-h) # Print help + ] + + # View the password history for a given entry + export extern "rbw history" [ + needle: string # Name, URI or UUID of the entry to display + user?: string # Username of the entry to display + --folder: string # Folder name to search in + --ignorecase(-i) # Ignore case + --help(-h) # Print help + ] + + # Lock the password database + export extern "rbw lock" [ + --help(-h) # Print help + ] + + # Remove the local copy of the password database + export extern "rbw purge" [ + --help(-h) # Print help + ] + + # Terminate the background agent + export extern "rbw stop-agent" [ + --help(-h) # Print help + ] + + def "nu-complete rbw gen-completions shell" [] { + [ "bash" "zsh" "fish" "powershell" "elvish" "nushell" "fig" ] + } + + # Generate completion script for the given shell + export extern "rbw gen-completions" [ + shell: string@"nu-complete rbw gen-completions shell" + --help(-h) # Print help + ] + + # Print this message or the help of the given subcommand(s) + export extern "rbw help" [ + ] + + # Get or set configuration options + export extern "rbw help config" [ + ] + + # Show the values of all configuration settings + export extern "rbw help config show" [ + ] + + # Set a configuration option + export extern "rbw help config set" [ + ] + + # Reset a configuration option to its default + export extern "rbw help config unset" [ + ] + + # Register this device with the Bitwarden server + export extern "rbw help register" [ + ] + + # Log in to the Bitwarden server + export extern "rbw help login" [ + ] + + # Unlock the local Bitwarden database + export extern "rbw help unlock" [ + ] + + # Check if the local Bitwarden database is unlocked + export extern "rbw help unlocked" [ + ] + + # Update the local copy of the Bitwarden database + export extern "rbw help sync" [ + ] + + # List all entries in the local Bitwarden database + export extern "rbw help list" [ + ] + + # Display the password for a given entry + export extern "rbw help get" [ + ] + + # Search for entries + export extern "rbw help search" [ + ] + + # Display the authenticator code for a given entry + export extern "rbw help code" [ + ] + + # Add a new password to the database + export extern "rbw help add" [ + ] + + # Generate a new password + export extern "rbw help generate" [ + ] + + # Modify an existing password + export extern "rbw help edit" [ + ] + + # Remove a given entry + export extern "rbw help remove" [ + ] + + # View the password history for a given entry + export extern "rbw help history" [ + ] + + # Lock the password database + export extern "rbw help lock" [ + ] + + # Remove the local copy of the password database + export extern "rbw help purge" [ + ] + + # Terminate the background agent + export extern "rbw help stop-agent" [ + ] + + # Generate completion script for the given shell + export extern "rbw help gen-completions" [ + ] + + # Print this message or the help of the given subcommand(s) + export extern "rbw help help" [ + ] + +} + +export use completions * diff --git a/dot_config/nushell/completions/zoxide.nu b/dot_config/nushell/completions/zoxide.nu deleted file mode 100644 index 7c22060..0000000 --- a/dot_config/nushell/completions/zoxide.nu +++ /dev/null @@ -1,70 +0,0 @@ -# Code generated by zoxide. DO NOT EDIT. - -# ============================================================================= -# -# Hook configuration for zoxide. -# - -# Initialize hook to add new entries to the database. -export-env { - $env.config = ( - $env.config? - | default {} - | upsert hooks { default {} } - | upsert hooks.env_change { default {} } - | upsert hooks.env_change.PWD { default [] } - ) - let __zoxide_hooked = ( - $env.config.hooks.env_change.PWD | any { try { get __zoxide_hook } catch { false } } - ) - if not $__zoxide_hooked { - $env.config.hooks.env_change.PWD = ($env.config.hooks.env_change.PWD | append { - __zoxide_hook: true, - code: {|_, dir| zoxide add -- $dir} - }) - } -} - -# ============================================================================= -# -# When using zoxide with --no-cmd, alias these internal functions as desired. -# - -# Jump to a directory using only keywords. -def --env --wrapped __zoxide_z [...rest: string] { - let path = match $rest { - [] => {'~'}, - [ '-' ] => {'-'}, - [ $arg ] if ($arg | path type) == 'dir' => {$arg} - _ => { - zoxide query --exclude $env.PWD -- ...$rest | str trim -r -c "\n" - } - } - cd $path -} - -# Jump to a directory using interactive search. -def --env --wrapped __zoxide_zi [...rest:string] { - cd $'(zoxide query --interactive -- ...$rest | str trim -r -c "\n")' -} - -# ============================================================================= -# -# Commands for zoxide. Disable these using --no-cmd. -# - -alias z = __zoxide_z -alias zi = __zoxide_zi - -# ============================================================================= -# -# Add this to your env file (find it by running `$nu.env-path` in Nushell): -# -# zoxide init nushell | save -f ~/.zoxide.nu -# -# Now, add this to the end of your config file (find it by running -# `$nu.config-path` in Nushell): -# -# source ~/.zoxide.nu -# -# Note: zoxide only supports Nushell v0.89.0+. diff --git a/dot_config/nushell/config.nu b/dot_config/nushell/config.nu index eb873ef..46c639a 100644 --- a/dot_config/nushell/config.nu +++ b/dot_config/nushell/config.nu @@ -9,7 +9,7 @@ $env.config = ( source nu_scripts.nu # initialise the completion plugins source completions/atuin.nu -source completions/zoxide.nu source completions/nu_scripts.nu +source completions/rbw.nu # Finally, we run a system info fetch sysfetch