diff --git a/config/fish/completions/bun.fish b/config/fish/completions/bun.fish deleted file mode 100644 index e262bb6..0000000 --- a/config/fish/completions/bun.fish +++ /dev/null @@ -1,186 +0,0 @@ -# This is terribly complicated -# It's because: -# 1. bun run has to have dynamic completions -# 2. there are global options -# 3. bun {install add remove} gets special options -# 4. I don't know how to write fish completions well -# Contributions very welcome!! - -function __fish__get_bun_bins - string split ' ' (bun getcompletes b) -end - -function __fish__get_bun_scripts - set -lx SHELL bash - set -lx MAX_DESCRIPTION_LEN 40 - string trim (string split '\n' (string split '\t' (bun getcompletes z))) -end - -function __fish__get_bun_packages - if test (commandline -ct) != "" - set -lx SHELL fish - string split ' ' (bun getcompletes a (commandline -ct)) - end -end - -function __history_completions - set -l tokens (commandline --current-process --tokenize) - history --prefix (commandline) | string replace -r \^$tokens[1]\\s\* "" | string replace -r \^$tokens[2]\\s\* "" | string split ' ' -end - -function __fish__get_bun_bun_js_files - string split ' ' (bun getcompletes j) -end - -set -l bun_install_boolean_flags yarn production optional development no-save dry-run force no-cache silent verbose global -set -l bun_install_boolean_flags_descriptions "Write a yarn.lock file (yarn v1)" "Don't install devDependencies" "Add dependency to optionalDependencies" "Add dependency to devDependencies" "Don't update package.json or save a lockfile" "Don't install anything" "Always request the latest versions from the registry & reinstall all dependencies" "Ignore manifest cache entirely" "Don't output anything" "Excessively verbose logging" "Use global folder" - -set -l bun_builtin_cmds_without_run dev create help bun upgrade discord install remove add init pm x -set -l bun_builtin_cmds_accepting_flags create help bun upgrade discord run init link unlink pm x - -function __bun_complete_bins_scripts --inherit-variable bun_builtin_cmds_without_run -d "Emit bun completions for bins and scripts" - # Do nothing if we already have a builtin subcommand, - # or any subcommand other than "run". - if __fish_seen_subcommand_from $bun_builtin_cmds_without_run - or not __fish_use_subcommand && not __fish_seen_subcommand_from run - return - end - # Do we already have a bin or script subcommand? - set -l bins (__fish__get_bun_bins) - if __fish_seen_subcommand_from $bins - return - end - # Scripts have descriptions appended with a tab separator. - # Strip off descriptions for the purposes of subcommand testing. - set -l scripts (__fish__get_bun_scripts) - if __fish_seen_subcommand_from (string split \t -f 1 -- $scripts) - return - end - # Emit scripts. - for script in $scripts - echo $script - end - # Emit binaries and JS files (but only if we're doing `bun run`). - if __fish_seen_subcommand_from run - for bin in $bins - echo "$bin"\t"package bin" - end - for file in (__fish__get_bun_bun_js_files) - echo "$file"\t"Bun.js" - end - end -end - - -# Clear existing completions -complete -e -c bun - -# Dynamically emit scripts and binaries -complete -c bun -f -a "(__bun_complete_bins_scripts)" - -# Complete flags if we have no subcommand or a flag-friendly one. -set -l flag_applies "__fish_use_subcommand; or __fish_seen_subcommand_from $bun_builtin_cmds_accepting_flags" -complete -c bun \ - -n $flag_applies --no-files -s 'u' -l 'origin' -r -d 'Server URL. Rewrites import paths' -complete -c bun \ - -n $flag_applies --no-files -s 'p' -l 'port' -r -d 'Port number to start server from' -complete -c bun \ - -n $flag_applies --no-files -s 'd' -l 'define' -r -d 'Substitute K:V while parsing, e.g. --define process.env.NODE_ENV:\"development\"' -complete -c bun \ - -n $flag_applies --no-files -s 'e' -l 'external' -r -d 'Exclude module from transpilation (can use * wildcards). ex: -e react' -complete -c bun \ - -n $flag_applies --no-files -l 'use' -r -d 'Use a framework (ex: next)' -complete -c bun \ - -n $flag_applies --no-files -l 'hot' -r -d 'Enable hot reloading in Bun\'s JavaScript runtime' - -# Complete dev and create as first subcommand. -complete -c bun \ - -n "__fish_use_subcommand" -a 'dev' -d 'Start dev server' -complete -c bun \ - -n "__fish_use_subcommand" -a 'create' -f -d 'Create a new project from a template' - -# Complete "next" and "react" if we've seen "create". -complete -c bun \ - -n "__fish_seen_subcommand_from create" -a 'next' -d 'new Next.js project' - -complete -c bun \ - -n "__fish_seen_subcommand_from create" -a 'react' -d 'new React project' - -# Complete "upgrade" as first subcommand. -complete -c bun \ - -n "__fish_use_subcommand" -a 'upgrade' -d 'Upgrade bun to the latest version' -x -# Complete "-h/--help" unconditionally. -complete -c bun \ - -s "h" -l "help" -d 'See all commands and flags' -x - -# Complete "-v/--version" if we have no subcommand. -complete -c bun \ - -n "not __fish_use_subcommand" -l "version" -s "v" -d 'Bun\'s version' -x - -# Complete additional subcommands. -complete -c bun \ - -n "__fish_use_subcommand" -a 'discord' -d 'Open bun\'s Discord server' -x - - -complete -c bun \ - -n "__fish_use_subcommand" -a 'bun' -d 'Generate a new bundle' - - -complete -c bun \ - -n "__fish_seen_subcommand_from bun" -F -d 'Bundle this' - -complete -c bun \ - -n "__fish_seen_subcommand_from create; and __fish_seen_subcommand_from react next" -F -d "Create in directory" - - -complete -c bun \ - -n "__fish_use_subcommand" -a 'init' -F -d 'Start an empty Bun project' - -complete -c bun \ - -n "__fish_use_subcommand" -a 'install' -f -d 'Install packages from package.json' - -complete -c bun \ - -n "__fish_use_subcommand" -a 'add' -F -d 'Add a package to package.json' - -complete -c bun \ - -n "__fish_use_subcommand" -a 'remove' -F -d 'Remove a package from package.json' - - -for i in (seq (count $bun_install_boolean_flags)) - complete -c bun \ - -n "__fish_seen_subcommand_from install add remove" -l "$bun_install_boolean_flags[$i]" -d "$bun_install_boolean_flags_descriptions[$i]" -end - -complete -c bun \ - -n "__fish_seen_subcommand_from install add remove" -l 'cwd' -d 'Change working directory' - -complete -c bun \ - -n "__fish_seen_subcommand_from install add remove" -l 'cache-dir' -d 'Choose a cache directory (default: $HOME/.bun/install/cache)' - -complete -c bun \ - -n "__fish_seen_subcommand_from add" -d 'Popular' -a '(__fish__get_bun_packages)' - -complete -c bun \ - -n "__fish_seen_subcommand_from add" -d 'History' -a '(__history_completions)' - -complete -c bun \ - -n "__fish_seen_subcommand_from pm; and not __fish_seen_subcommand_from (__fish__get_bun_bins) (__fish__get_bun_scripts) cache;" -a 'bin ls cache hash hash-print hash-string' -f - -complete -c bun \ - -n "__fish_seen_subcommand_from pm; and __fish_seen_subcommand_from cache; and not __fish_seen_subcommand_from (__fish__get_bun_bins) (__fish__get_bun_scripts);" -a 'rm' -f - -# Add built-in subcommands with descriptions. -complete -c bun -n "__fish_use_subcommand" -a "create" -f -d "Create a new project from a template" -complete -c bun -n "__fish_use_subcommand" -a "build bun" --require-parameter -F -d "Transpile and bundle one or more files" -complete -c bun -n "__fish_use_subcommand" -a "upgrade" -d "Upgrade Bun" -complete -c bun -n "__fish_use_subcommand" -a "run" -d "Run a script or package binary" -complete -c bun -n "__fish_use_subcommand" -a "install" -d "Install dependencies from package.json" -f -complete -c bun -n "__fish_use_subcommand" -a "remove" -d "Remove a dependency from package.json" -f -complete -c bun -n "__fish_use_subcommand" -a "add" -d "Add a dependency to package.json" -f -complete -c bun -n "__fish_use_subcommand" -a "init" -d "Initialize a Bun project in this directory" -f -complete -c bun -n "__fish_use_subcommand" -a "link" -d "Register or link a local npm package" -f -complete -c bun -n "__fish_use_subcommand" -a "unlink" -d "Unregister a local npm package" -f -complete -c bun -n "__fish_use_subcommand" -a "pm" -d "Additional package management utilities" -f -complete -c bun -n "__fish_use_subcommand" -a "x" -d "Execute a package binary, installing if needed" -f -complete -c bun -n "__fish_use_subcommand" -a "outdated" -d "Display the latest versions of outdated dependencies" -f -complete -c bun -n "__fish_use_subcommand" -a "publish" -d "Publish your package from local to npm" -f diff --git a/config/fish/completions/diesel.fish b/config/fish/completions/diesel.fish deleted file mode 100644 index d3fc351..0000000 --- a/config/fish/completions/diesel.fish +++ /dev/null @@ -1,177 +0,0 @@ -# Print an optspec for argparse to handle cmd's options that are independent of any subcommand. -function __fish_diesel_global_optspecs - string join \n database-url= config-file= locked-schema h/help V/version -end - -function __fish_diesel_needs_command - # Figure out if the current invocation already has a command. - set -l cmd (commandline -opc) - set -e cmd[1] - argparse -s (__fish_diesel_global_optspecs) -- $cmd 2>/dev/null - or return - if set -q argv[1] - # Also print the command, so this can be used to figure out what it is. - echo $argv[1] - return 1 - end - return 0 -end - -function __fish_diesel_using_subcommand - set -l cmd (__fish_diesel_needs_command) - test -z "$cmd" - and return 1 - contains -- $cmd[1] $argv -end - -complete -c diesel -n "__fish_diesel_needs_command" -l database-url -d 'Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.' -r -complete -c diesel -n "__fish_diesel_needs_command" -l config-file -d 'The location of the configuration file to use. Falls back to the `DIESEL_CONFIG_FILE` environment variable if unspecified. Defaults to `diesel.toml` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.' -r -F -complete -c diesel -n "__fish_diesel_needs_command" -l locked-schema -d 'Require that the schema file is up to date.' -complete -c diesel -n "__fish_diesel_needs_command" -s h -l help -d 'Print help (see more with \'--help\')' -complete -c diesel -n "__fish_diesel_needs_command" -s V -l version -d 'Print version' -complete -c diesel -n "__fish_diesel_needs_command" -f -a "migration" -d 'A group of commands for generating, running, and reverting migrations.' -complete -c diesel -n "__fish_diesel_needs_command" -f -a "setup" -d 'Creates the migrations directory, creates the database specified in your DATABASE_URL, and runs existing migrations.' -complete -c diesel -n "__fish_diesel_needs_command" -f -a "database" -d 'A group of commands for setting up and resetting your database.' -complete -c diesel -n "__fish_diesel_needs_command" -f -a "completions" -d 'Generate shell completion scripts for the diesel command.' -complete -c diesel -n "__fish_diesel_needs_command" -f -a "print-schema" -d 'Print table definitions for database schema.' -complete -c diesel -n "__fish_diesel_needs_command" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and not __fish_seen_subcommand_from run revert redo list pending generate help" -l migration-dir -d 'The location of your migration directory. By default this will look for a directory called `migrations` in the current directory and its parents.' -r -F -complete -c diesel -n "__fish_diesel_using_subcommand migration; and not __fish_seen_subcommand_from run revert redo list pending generate help" -l database-url -d 'Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.' -r -complete -c diesel -n "__fish_diesel_using_subcommand migration; and not __fish_seen_subcommand_from run revert redo list pending generate help" -l config-file -d 'The location of the configuration file to use. Falls back to the `DIESEL_CONFIG_FILE` environment variable if unspecified. Defaults to `diesel.toml` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.' -r -F -complete -c diesel -n "__fish_diesel_using_subcommand migration; and not __fish_seen_subcommand_from run revert redo list pending generate help" -l locked-schema -d 'Require that the schema file is up to date.' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and not __fish_seen_subcommand_from run revert redo list pending generate help" -s h -l help -d 'Print help (see more with \'--help\')' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and not __fish_seen_subcommand_from run revert redo list pending generate help" -f -a "run" -d 'Runs all pending migrations.' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and not __fish_seen_subcommand_from run revert redo list pending generate help" -f -a "revert" -d 'Reverts the specified migrations.' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and not __fish_seen_subcommand_from run revert redo list pending generate help" -f -a "redo" -d 'Reverts and re-runs the latest migration. Useful for testing that a migration can in fact be reverted.' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and not __fish_seen_subcommand_from run revert redo list pending generate help" -f -a "list" -d 'Lists all available migrations, marking those that have been applied.' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and not __fish_seen_subcommand_from run revert redo list pending generate help" -f -a "pending" -d 'Returns true if there are any pending migrations.' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and not __fish_seen_subcommand_from run revert redo list pending generate help" -f -a "generate" -d 'Generate a new migration with the given name, and the current timestamp as the version.' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and not __fish_seen_subcommand_from run revert redo list pending generate help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from run" -l migration-dir -d 'The location of your migration directory. By default this will look for a directory called `migrations` in the current directory and its parents.' -r -F -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from run" -l database-url -d 'Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.' -r -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from run" -l config-file -d 'The location of the configuration file to use. Falls back to the `DIESEL_CONFIG_FILE` environment variable if unspecified. Defaults to `diesel.toml` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.' -r -F -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from run" -l locked-schema -d 'Require that the schema file is up to date.' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from run" -s h -l help -d 'Print help (see more with \'--help\')' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from revert" -s n -l number -d 'Reverts the last `n` migration files.' -r -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from revert" -l migration-dir -d 'The location of your migration directory. By default this will look for a directory called `migrations` in the current directory and its parents.' -r -F -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from revert" -l database-url -d 'Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.' -r -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from revert" -l config-file -d 'The location of the configuration file to use. Falls back to the `DIESEL_CONFIG_FILE` environment variable if unspecified. Defaults to `diesel.toml` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.' -r -F -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from revert" -s a -l all -d 'Reverts previously run migration files.' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from revert" -l locked-schema -d 'Require that the schema file is up to date.' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from revert" -s h -l help -d 'Print help (see more with \'--help\')' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from redo" -s n -l number -d 'Redo the last `n` migration files.' -r -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from redo" -l migration-dir -d 'The location of your migration directory. By default this will look for a directory called `migrations` in the current directory and its parents.' -r -F -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from redo" -l database-url -d 'Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.' -r -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from redo" -l config-file -d 'The location of the configuration file to use. Falls back to the `DIESEL_CONFIG_FILE` environment variable if unspecified. Defaults to `diesel.toml` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.' -r -F -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from redo" -s a -l all -d 'Reverts and re-runs all migrations.' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from redo" -l locked-schema -d 'Require that the schema file is up to date.' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from redo" -s h -l help -d 'Print help (see more with \'--help\')' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from list" -l migration-dir -d 'The location of your migration directory. By default this will look for a directory called `migrations` in the current directory and its parents.' -r -F -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from list" -l database-url -d 'Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.' -r -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from list" -l config-file -d 'The location of the configuration file to use. Falls back to the `DIESEL_CONFIG_FILE` environment variable if unspecified. Defaults to `diesel.toml` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.' -r -F -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from list" -l locked-schema -d 'Require that the schema file is up to date.' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from list" -s h -l help -d 'Print help (see more with \'--help\')' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from pending" -l migration-dir -d 'The location of your migration directory. By default this will look for a directory called `migrations` in the current directory and its parents.' -r -F -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from pending" -l database-url -d 'Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.' -r -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from pending" -l config-file -d 'The location of the configuration file to use. Falls back to the `DIESEL_CONFIG_FILE` environment variable if unspecified. Defaults to `diesel.toml` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.' -r -F -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from pending" -l locked-schema -d 'Require that the schema file is up to date.' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from pending" -s h -l help -d 'Print help (see more with \'--help\')' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from generate" -l version -d 'The version number to use when generating the migration. Defaults to the current timestamp, which should suffice for most use cases.' -r -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from generate" -l format -d 'The format of the migration to be generated.' -r -f -a "sql\t''" -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from generate" -l diff-schema -d 'Populate the generated migrations based on the current difference between your `schema.rs` file and the specified database. The generated migrations are not expected to be perfect. Be sure to check whether they meet your expectations. Adjust the generated output if that\'s not the case.' -r -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from generate" -l schema-key -d 'select schema key from diesel.toml, use \'default\' for print_schema without key.' -r -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from generate" -l migration-dir -d 'The location of your migration directory. By default this will look for a directory called `migrations` in the current directory and its parents.' -r -F -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from generate" -l database-url -d 'Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.' -r -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from generate" -l config-file -d 'The location of the configuration file to use. Falls back to the `DIESEL_CONFIG_FILE` environment variable if unspecified. Defaults to `diesel.toml` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.' -r -F -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from generate" -s u -l no-down -d 'Don\'t generate a down.sql file. You won\'t be able to run migration `revert` or `redo`.' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from generate" -l sqlite-integer-primary-key-is-bigint -d 'For SQLite 3.37 and above, detect `INTEGER PRIMARY KEY` columns as `BigInt`, when the table isn\'t declared with `WITHOUT ROWID`. See https://www.sqlite.org/lang_createtable.html#rowid for more information. Only used with the `--diff-schema` argument.' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from generate" -s o -l only-tables -d 'Only include tables from table-name that matches regexp.' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from generate" -s e -l except-tables -d 'Exclude tables from table-name that matches regex.' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from generate" -l locked-schema -d 'Require that the schema file is up to date.' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from generate" -s h -l help -d 'Print help (see more with \'--help\')' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from help" -f -a "run" -d 'Runs all pending migrations.' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from help" -f -a "revert" -d 'Reverts the specified migrations.' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from help" -f -a "redo" -d 'Reverts and re-runs the latest migration. Useful for testing that a migration can in fact be reverted.' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from help" -f -a "list" -d 'Lists all available migrations, marking those that have been applied.' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from help" -f -a "pending" -d 'Returns true if there are any pending migrations.' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from help" -f -a "generate" -d 'Generate a new migration with the given name, and the current timestamp as the version.' -complete -c diesel -n "__fish_diesel_using_subcommand migration; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' -complete -c diesel -n "__fish_diesel_using_subcommand setup" -l migration-dir -d 'The location of your migration directory. By default this will look for a directory called `migrations` in the current directory and its parents.' -r -F -complete -c diesel -n "__fish_diesel_using_subcommand setup" -l database-url -d 'Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.' -r -complete -c diesel -n "__fish_diesel_using_subcommand setup" -l config-file -d 'The location of the configuration file to use. Falls back to the `DIESEL_CONFIG_FILE` environment variable if unspecified. Defaults to `diesel.toml` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.' -r -F -complete -c diesel -n "__fish_diesel_using_subcommand setup" -l no-default-migration -d 'Don\'t generate the default migration.' -complete -c diesel -n "__fish_diesel_using_subcommand setup" -l locked-schema -d 'Require that the schema file is up to date.' -complete -c diesel -n "__fish_diesel_using_subcommand setup" -s h -l help -d 'Print help (see more with \'--help\')' -complete -c diesel -n "__fish_diesel_using_subcommand database; and not __fish_seen_subcommand_from setup reset drop help" -l migration-dir -d 'The location of your migration directory. By default this will look for a directory called `migrations` in the current directory and its parents.' -r -F -complete -c diesel -n "__fish_diesel_using_subcommand database; and not __fish_seen_subcommand_from setup reset drop help" -l database-url -d 'Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.' -r -complete -c diesel -n "__fish_diesel_using_subcommand database; and not __fish_seen_subcommand_from setup reset drop help" -l config-file -d 'The location of the configuration file to use. Falls back to the `DIESEL_CONFIG_FILE` environment variable if unspecified. Defaults to `diesel.toml` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.' -r -F -complete -c diesel -n "__fish_diesel_using_subcommand database; and not __fish_seen_subcommand_from setup reset drop help" -l locked-schema -d 'Require that the schema file is up to date.' -complete -c diesel -n "__fish_diesel_using_subcommand database; and not __fish_seen_subcommand_from setup reset drop help" -s h -l help -d 'Print help (see more with \'--help\')' -complete -c diesel -n "__fish_diesel_using_subcommand database; and not __fish_seen_subcommand_from setup reset drop help" -f -a "setup" -d 'Creates the database specified in your DATABASE_URL, and then runs any existing migrations.' -complete -c diesel -n "__fish_diesel_using_subcommand database; and not __fish_seen_subcommand_from setup reset drop help" -f -a "reset" -d 'Resets your database by dropping the database specified in your DATABASE_URL and then running `diesel database setup`.' -complete -c diesel -n "__fish_diesel_using_subcommand database; and not __fish_seen_subcommand_from setup reset drop help" -f -a "drop" -d 'Drops the database specified in your DATABASE_URL.' -complete -c diesel -n "__fish_diesel_using_subcommand database; and not __fish_seen_subcommand_from setup reset drop help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' -complete -c diesel -n "__fish_diesel_using_subcommand database; and __fish_seen_subcommand_from setup" -l migration-dir -d 'The location of your migration directory. By default this will look for a directory called `migrations` in the current directory and its parents.' -r -F -complete -c diesel -n "__fish_diesel_using_subcommand database; and __fish_seen_subcommand_from setup" -l database-url -d 'Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.' -r -complete -c diesel -n "__fish_diesel_using_subcommand database; and __fish_seen_subcommand_from setup" -l config-file -d 'The location of the configuration file to use. Falls back to the `DIESEL_CONFIG_FILE` environment variable if unspecified. Defaults to `diesel.toml` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.' -r -F -complete -c diesel -n "__fish_diesel_using_subcommand database; and __fish_seen_subcommand_from setup" -l no-default-migration -d 'Don\'t generate the default migration.' -complete -c diesel -n "__fish_diesel_using_subcommand database; and __fish_seen_subcommand_from setup" -l locked-schema -d 'Require that the schema file is up to date.' -complete -c diesel -n "__fish_diesel_using_subcommand database; and __fish_seen_subcommand_from setup" -s h -l help -d 'Print help (see more with \'--help\')' -complete -c diesel -n "__fish_diesel_using_subcommand database; and __fish_seen_subcommand_from reset" -l migration-dir -d 'The location of your migration directory. By default this will look for a directory called `migrations` in the current directory and its parents.' -r -F -complete -c diesel -n "__fish_diesel_using_subcommand database; and __fish_seen_subcommand_from reset" -l database-url -d 'Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.' -r -complete -c diesel -n "__fish_diesel_using_subcommand database; and __fish_seen_subcommand_from reset" -l config-file -d 'The location of the configuration file to use. Falls back to the `DIESEL_CONFIG_FILE` environment variable if unspecified. Defaults to `diesel.toml` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.' -r -F -complete -c diesel -n "__fish_diesel_using_subcommand database; and __fish_seen_subcommand_from reset" -l no-default-migration -d 'Don\'t generate the default migration.' -complete -c diesel -n "__fish_diesel_using_subcommand database; and __fish_seen_subcommand_from reset" -l locked-schema -d 'Require that the schema file is up to date.' -complete -c diesel -n "__fish_diesel_using_subcommand database; and __fish_seen_subcommand_from reset" -s h -l help -d 'Print help (see more with \'--help\')' -complete -c diesel -n "__fish_diesel_using_subcommand database; and __fish_seen_subcommand_from drop" -l migration-dir -d 'The location of your migration directory. By default this will look for a directory called `migrations` in the current directory and its parents.' -r -F -complete -c diesel -n "__fish_diesel_using_subcommand database; and __fish_seen_subcommand_from drop" -l database-url -d 'Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.' -r -complete -c diesel -n "__fish_diesel_using_subcommand database; and __fish_seen_subcommand_from drop" -l config-file -d 'The location of the configuration file to use. Falls back to the `DIESEL_CONFIG_FILE` environment variable if unspecified. Defaults to `diesel.toml` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.' -r -F -complete -c diesel -n "__fish_diesel_using_subcommand database; and __fish_seen_subcommand_from drop" -l locked-schema -d 'Require that the schema file is up to date.' -complete -c diesel -n "__fish_diesel_using_subcommand database; and __fish_seen_subcommand_from drop" -s h -l help -d 'Print help (see more with \'--help\')' -complete -c diesel -n "__fish_diesel_using_subcommand database; and __fish_seen_subcommand_from help" -f -a "setup" -d 'Creates the database specified in your DATABASE_URL, and then runs any existing migrations.' -complete -c diesel -n "__fish_diesel_using_subcommand database; and __fish_seen_subcommand_from help" -f -a "reset" -d 'Resets your database by dropping the database specified in your DATABASE_URL and then running `diesel database setup`.' -complete -c diesel -n "__fish_diesel_using_subcommand database; and __fish_seen_subcommand_from help" -f -a "drop" -d 'Drops the database specified in your DATABASE_URL.' -complete -c diesel -n "__fish_diesel_using_subcommand database; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' -complete -c diesel -n "__fish_diesel_using_subcommand completions" -l database-url -d 'Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.' -r -complete -c diesel -n "__fish_diesel_using_subcommand completions" -l config-file -d 'The location of the configuration file to use. Falls back to the `DIESEL_CONFIG_FILE` environment variable if unspecified. Defaults to `diesel.toml` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.' -r -F -complete -c diesel -n "__fish_diesel_using_subcommand completions" -l locked-schema -d 'Require that the schema file is up to date.' -complete -c diesel -n "__fish_diesel_using_subcommand completions" -s h -l help -d 'Print help (see more with \'--help\')' -complete -c diesel -n "__fish_diesel_using_subcommand print-schema" -s s -l schema -d 'The name of the schema.' -r -complete -c diesel -n "__fish_diesel_using_subcommand print-schema" -l with-docs-config -d 'Render documentation comments for tables and columns.' -r -f -a "database-comments-fallback-to-auto-generated-doc-comment\t'' -only-database-comments\t'' -no-doc-comments\t''" -complete -c diesel -n "__fish_diesel_using_subcommand print-schema" -l allow-tables-to-appear-in-same-query-config -d 'Group tables in allow_tables_to_appear_in_same_query!().' -r -f -a "fk_related_tables\t'' -all_tables\t'' -none\t''" -complete -c diesel -n "__fish_diesel_using_subcommand print-schema" -l column-sorting -d 'Sort order for table columns.' -r -f -a "ordinal_position\t'' -name\t''" -complete -c diesel -n "__fish_diesel_using_subcommand print-schema" -l patch-file -d 'A unified diff file to be applied to the final schema.' -r -F -complete -c diesel -n "__fish_diesel_using_subcommand print-schema" -l import-types -d 'A list of types to import for every table, separated by commas.' -r -complete -c diesel -n "__fish_diesel_using_subcommand print-schema" -l except-custom-type-definitions -d 'A list of regexes to filter the custom types definitions generated' -r -complete -c diesel -n "__fish_diesel_using_subcommand print-schema" -l custom-type-derives -d 'A list of derives to implement for every automatically generated SqlType in the schema, separated by commas.' -r -complete -c diesel -n "__fish_diesel_using_subcommand print-schema" -l pg-domains-as-custom-types -d 'A regex to distinguish domain names to generate custom types for instead of relying on underlying type.' -r -complete -c diesel -n "__fish_diesel_using_subcommand print-schema" -l schema-key -d 'select schema key from diesel.toml, use \'default\' for print_schema without key.' -r -complete -c diesel -n "__fish_diesel_using_subcommand print-schema" -l database-url -d 'Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.' -r -complete -c diesel -n "__fish_diesel_using_subcommand print-schema" -l config-file -d 'The location of the configuration file to use. Falls back to the `DIESEL_CONFIG_FILE` environment variable if unspecified. Defaults to `diesel.toml` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.' -r -F -complete -c diesel -n "__fish_diesel_using_subcommand print-schema" -s o -l only-tables -d 'Only include tables from table-name that matches regexp.' -complete -c diesel -n "__fish_diesel_using_subcommand print-schema" -s e -l except-tables -d 'Exclude tables from table-name that matches regex.' -complete -c diesel -n "__fish_diesel_using_subcommand print-schema" -l with-docs -d 'Render documentation comments for tables and columns.' -complete -c diesel -n "__fish_diesel_using_subcommand print-schema" -l no-generate-missing-sql-type-definitions -d 'Generate SQL type definitions for types not provided by diesel' -complete -c diesel -n "__fish_diesel_using_subcommand print-schema" -l sqlite-integer-primary-key-is-bigint -d 'For SQLite 3.37 and above, detect `INTEGER PRIMARY KEY` columns as `BigInt`, when the table isn\'t declared with `WITHOUT ROWID`. See https://www.sqlite.org/lang_createtable.html#rowid for more information.' -complete -c diesel -n "__fish_diesel_using_subcommand print-schema" -l locked-schema -d 'Require that the schema file is up to date.' -complete -c diesel -n "__fish_diesel_using_subcommand print-schema" -s h -l help -d 'Print help (see more with \'--help\')' -complete -c diesel -n "__fish_diesel_using_subcommand help; and not __fish_seen_subcommand_from migration setup database completions print-schema help" -f -a "migration" -d 'A group of commands for generating, running, and reverting migrations.' -complete -c diesel -n "__fish_diesel_using_subcommand help; and not __fish_seen_subcommand_from migration setup database completions print-schema help" -f -a "setup" -d 'Creates the migrations directory, creates the database specified in your DATABASE_URL, and runs existing migrations.' -complete -c diesel -n "__fish_diesel_using_subcommand help; and not __fish_seen_subcommand_from migration setup database completions print-schema help" -f -a "database" -d 'A group of commands for setting up and resetting your database.' -complete -c diesel -n "__fish_diesel_using_subcommand help; and not __fish_seen_subcommand_from migration setup database completions print-schema help" -f -a "completions" -d 'Generate shell completion scripts for the diesel command.' -complete -c diesel -n "__fish_diesel_using_subcommand help; and not __fish_seen_subcommand_from migration setup database completions print-schema help" -f -a "print-schema" -d 'Print table definitions for database schema.' -complete -c diesel -n "__fish_diesel_using_subcommand help; and not __fish_seen_subcommand_from migration setup database completions print-schema help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' -complete -c diesel -n "__fish_diesel_using_subcommand help; and __fish_seen_subcommand_from migration" -f -a "run" -d 'Runs all pending migrations.' -complete -c diesel -n "__fish_diesel_using_subcommand help; and __fish_seen_subcommand_from migration" -f -a "revert" -d 'Reverts the specified migrations.' -complete -c diesel -n "__fish_diesel_using_subcommand help; and __fish_seen_subcommand_from migration" -f -a "redo" -d 'Reverts and re-runs the latest migration. Useful for testing that a migration can in fact be reverted.' -complete -c diesel -n "__fish_diesel_using_subcommand help; and __fish_seen_subcommand_from migration" -f -a "list" -d 'Lists all available migrations, marking those that have been applied.' -complete -c diesel -n "__fish_diesel_using_subcommand help; and __fish_seen_subcommand_from migration" -f -a "pending" -d 'Returns true if there are any pending migrations.' -complete -c diesel -n "__fish_diesel_using_subcommand help; and __fish_seen_subcommand_from migration" -f -a "generate" -d 'Generate a new migration with the given name, and the current timestamp as the version.' -complete -c diesel -n "__fish_diesel_using_subcommand help; and __fish_seen_subcommand_from database" -f -a "setup" -d 'Creates the database specified in your DATABASE_URL, and then runs any existing migrations.' -complete -c diesel -n "__fish_diesel_using_subcommand help; and __fish_seen_subcommand_from database" -f -a "reset" -d 'Resets your database by dropping the database specified in your DATABASE_URL and then running `diesel database setup`.' -complete -c diesel -n "__fish_diesel_using_subcommand help; and __fish_seen_subcommand_from database" -f -a "drop" -d 'Drops the database specified in your DATABASE_URL.' diff --git a/config/fish/completions/fzf_configure_bindings.fish b/config/fish/completions/fzf_configure_bindings.fish deleted file mode 100644 index b38ef92..0000000 --- a/config/fish/completions/fzf_configure_bindings.fish +++ /dev/null @@ -1,8 +0,0 @@ -complete fzf_configure_bindings --no-files -complete fzf_configure_bindings --long help --short h --description "Print help" --condition "not __fish_seen_argument --help -h" -complete fzf_configure_bindings --long directory --description "Change the key binding for Search Directory" --condition "not __fish_seen_argument --directory" -complete fzf_configure_bindings --long git_log --description "Change the key binding for Search Git Log" --condition "not __fish_seen_argument --git_log" -complete fzf_configure_bindings --long git_status --description "Change the key binding for Search Git Status" --condition "not __fish_seen_argument --git_status" -complete fzf_configure_bindings --long history --description "Change the key binding for Search History" --condition "not __fish_seen_argument --history" -complete fzf_configure_bindings --long processes --description "Change the key binding for Search Processes" --condition "not __fish_seen_argument --processes" -complete fzf_configure_bindings --long variables --description "Change the key binding for Search Variables" --condition "not __fish_seen_argument --variables" diff --git a/config/fish/conf.d/brew.fish b/config/fish/conf.d/brew.fish deleted file mode 100644 index 12d9e9a..0000000 --- a/config/fish/conf.d/brew.fish +++ /dev/null @@ -1,2 +0,0 @@ -# source brew shellenv -/opt/homebrew/bin/brew shellenv 2>/dev/null | source diff --git a/config/fish/conf.d/fzf.fish b/config/fish/conf.d/fzf.fish deleted file mode 100644 index cb69894..0000000 --- a/config/fish/conf.d/fzf.fish +++ /dev/null @@ -1,28 +0,0 @@ -# fzf.fish is only meant to be used in interactive mode. If not in interactive mode and not in CI, skip the config to speed up shell startup -if not status is-interactive && test "$CI" != true - exit -end - -# Because of scoping rules, to capture the shell variables exactly as they are, we must read -# them before even executing _fzf_search_variables. We use psub to store the -# variables' info in temporary files and pass in the filenames as arguments. -# This variable is global so that it can be referenced by fzf_configure_bindings and in tests -set --global _fzf_search_vars_command '_fzf_search_variables (set --show | psub) (set --names | psub)' - - -# Install user-modified key bindings -fzf_configure_bindings --directory=\ct --git_log=\cf --git_status=\cg --processes=\cp - -# Doesn't erase autoloaded _fzf_* functions because they are not easily accessible once key bindings are erased -function _fzf_uninstall --on-event fzf_uninstall - _fzf_uninstall_bindings - - set --erase _fzf_search_vars_command - functions --erase _fzf_uninstall _fzf_migration_message _fzf_uninstall_bindings fzf_configure_bindings - complete --erase fzf_configure_bindings - - set_color cyan - echo "fzf.fish uninstalled." - echo "You may need to manually remove fzf_configure_bindings from your config.fish if you were using custom key bindings." - set_color normal -end diff --git a/config/fish/conf.d/fzf_user.fish b/config/fish/conf.d/fzf_user.fish deleted file mode 100644 index 9cb5c0a..0000000 --- a/config/fish/conf.d/fzf_user.fish +++ /dev/null @@ -1,5 +0,0 @@ -fzf_configure_bindings --directory=\ct --git_log=\cf --git_status=\cg --processes=\cp - -# fzf configurations -set fzf_preview_dir_cmd eza --all --color=always --icons -set fzf_diff_highlighter delta --paging=never --width=20 diff --git a/config/fish/config.fish.before-home-manager b/config/fish/config.fish.before-home-manager deleted file mode 100644 index 87cc5ee..0000000 --- a/config/fish/config.fish.before-home-manager +++ /dev/null @@ -1,10 +0,0 @@ -# pnpm -set -gx PNPM_HOME "/Users/chrisvanderloo/.local/share/pnpm" -if not string match -q -- $PNPM_HOME $PATH - set -gx PATH "$PNPM_HOME" $PATH -end -# pnpm end - -# uv -fish_add_path "/Users/chrisvanderloo/.local/share/../bin" -fish_add_path "/Users/chrisvanderloo/.dotnet/tools" diff --git a/config/fish/fish_plugins b/config/fish/fish_plugins deleted file mode 100644 index 3638fbb..0000000 --- a/config/fish/fish_plugins +++ /dev/null @@ -1 +0,0 @@ -patrickf1/fzf.fish diff --git a/config/fish/fish_variables b/config/fish/fish_variables index ffd697c..2037bd4 100644 --- a/config/fish/fish_variables +++ b/config/fish/fish_variables @@ -1,10 +1,2 @@ -# This file contains fish universal variable definitions. -# VERSION: 3.0 SETUVAR --export CC_wasm32_unknown_unknown:/opt/homebrew/opt/llvm/bin/clang SETUVAR RUSTC_WRAPPER:sccache -SETUVAR __fish_initialized:4300 -SETUVAR _fisher_patrickf1_2F_fzf_2E_fish_files:\x7e/\x2econfig/fish/functions/_fzf_configure_bindings_help\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_extract_var_info\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_preview_changed_file\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_preview_file\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_report_diff_type\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_report_file_type\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_directory\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_git_log\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_git_status\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_history\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_processes\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_variables\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_wrapper\x2efish\x1e\x7e/\x2econfig/fish/functions/fzf_configure_bindings\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/fzf\x2efish\x1e\x7e/\x2econfig/fish/completions/fzf_configure_bindings\x2efish -SETUVAR _fisher_plugins:patrickf1/fzf\x2efish -SETUVAR _fisher_upgraded_to_4_4:\x1d -SETUVAR fish_greeting:\x1d -SETUVAR fish_user_paths:/Users/chrisvanderloo/\x2elocal/bin\x1e/Users/chrisvanderloo/\x2ecache/\x2ebun/bin\x1e/Users/chrisvanderloo/\x2ecargo/bin\x1e/opt/homebrew/opt/rustup/bin\x1e/opt/homebrew/bin\x1e/Applications/Ghostty\x2eapp/Contents/MacOS diff --git a/config/fish/functions/_fzf_configure_bindings_help.fish b/config/fish/functions/_fzf_configure_bindings_help.fish deleted file mode 100644 index ecfe68e..0000000 --- a/config/fish/functions/_fzf_configure_bindings_help.fish +++ /dev/null @@ -1,43 +0,0 @@ -function _fzf_configure_bindings_help --description "Prints the help message for fzf_configure_bindings." - echo "\ -USAGE: - fzf_configure_bindings [--COMMAND=[KEY_SEQUENCE]...] - -DESCRIPTION - fzf_configure_bindings installs key bindings for fzf.fish's commands and erases any bindings it - previously installed. It installs bindings for both default and insert modes. fzf.fish executes - it without options on fish startup to install the out-of-the-box key bindings. - - By default, commands are bound to a mnemonic key sequence, shown below. Each command's binding - can be configured using a namesake corresponding option: - COMMAND | DEFAULT KEY SEQUENCE | CORRESPONDING OPTION - Search Directory | Ctrl+Alt+F (F for file) | --directory - Search Git Log | Ctrl+Alt+L (L for log) | --git_log - Search Git Status | Ctrl+Alt+S (S for status) | --git_status - Search History | Ctrl+R (R for reverse) | --history - Search Processes | Ctrl+Alt+P (P for process) | --processes - Search Variables | Ctrl+V (V for variable) | --variables - Override a command's binding by specifying its corresponding option with the desired key - sequence. Disable a command's binding by specifying its corresponding option with no value. - - Because fzf_configure_bindings erases bindings it previously installed, it can be cleanly - executed multiple times. Once the desired fzf_configure_bindings command has been found, add it - to your config.fish in order to persist the customized bindings. - - In terms of validation, fzf_configure_bindings fails if passed unknown options. It expects an - equals sign between an option's name and value. However, it does not validate key sequences. - - Pass -h or --help to print this help message and exit. - -EXAMPLES - Default bindings but bind Search Directory to Ctrl+F and Search Variables to Ctrl+Alt+V - \$ fzf_configure_bindings --directory=\cf --variables=\e\cv - Default bindings but disable Search History - \$ fzf_configure_bindings --history= - An agglomeration of different options - \$ fzf_configure_bindings --git_status=\cg --history=\ch --variables= --processes= - -SEE Also - To learn more about fish key bindings, see bind(1) and fish_key_reader(1). -" -end diff --git a/config/fish/functions/_fzf_extract_var_info.fish b/config/fish/functions/_fzf_extract_var_info.fish deleted file mode 100644 index dd4e952..0000000 --- a/config/fish/functions/_fzf_extract_var_info.fish +++ /dev/null @@ -1,15 +0,0 @@ -# helper function for _fzf_search_variables -function _fzf_extract_var_info --argument-names variable_name set_show_output --description "Extract and reformat lines pertaining to \$variable_name from \$set_show_output." - # Extract only the lines about the variable, all of which begin with either - # $variable_name: ...or... $variable_name[ - string match --regex "^\\\$$variable_name(?::|\[).*" <$set_show_output | - - # Strip the variable name prefix, including ": " for scope info lines - string replace --regex "^\\\$$variable_name(?:: )?" '' | - - # Distill the lines of values, replacing... - # [1]: |value| - # ...with... - # [1] value - string replace --regex ": \|(.*)\|" ' $1' -end diff --git a/config/fish/functions/_fzf_preview_changed_file.fish b/config/fish/functions/_fzf_preview_changed_file.fish deleted file mode 100644 index 78dd561..0000000 --- a/config/fish/functions/_fzf_preview_changed_file.fish +++ /dev/null @@ -1,49 +0,0 @@ -# helper for _fzf_search_git_status -# arg should be a line from git status --short, e.g. -# MM functions/_fzf_preview_changed_file.fish -# D README.md -# R LICENSE -> "New License" -function _fzf_preview_changed_file --argument-names path_status --description "Show the git diff of the given file." - # remove quotes because they'll be interpreted literally by git diff - # no need to requote when referencing $path because fish does not perform word splitting - # https://fishshell.com/docs/current/fish_for_bash_users.html - set -f path (string unescape (string sub --start 4 $path_status)) - # first letter of short format shows index, second letter shows working tree - # https://git-scm.com/docs/git-status/2.35.0#_short_format - set -f index_status (string sub --length 1 $path_status) - set -f working_tree_status (string sub --start 2 --length 1 $path_status) - - set -f diff_opts --color=always - - if test $index_status = '?' - _fzf_report_diff_type Untracked - _fzf_preview_file $path - else if contains {$index_status}$working_tree_status DD AU UD UA DU AA UU - # Unmerged statuses taken directly from git status help's short format table - # Unmerged statuses are mutually exclusive with other statuses, so if we see - # these, then safe to assume the path is unmerged - _fzf_report_diff_type Unmerged - git diff $diff_opts -- $path - else - if test $index_status != ' ' - _fzf_report_diff_type Staged - - # renames are only detected in the index, never working tree, so only need to test for it here - # https://stackoverflow.com/questions/73954214 - if test $index_status = R - # diff the post-rename path with the original path, otherwise the diff will show the entire file as being added - set -f orig_and_new_path (string split --max 1 -- ' -> ' $path) - git diff --staged $diff_opts -- $orig_and_new_path[1] $orig_and_new_path[2] - # path currently has the form of "original -> current", so we need to correct it before it's used below - set path $orig_and_new_path[2] - else - git diff --staged $diff_opts -- $path - end - end - - if test $working_tree_status != ' ' - _fzf_report_diff_type Unstaged - git diff $diff_opts -- $path - end - end -end diff --git a/config/fish/functions/_fzf_preview_file.fish b/config/fish/functions/_fzf_preview_file.fish deleted file mode 100644 index c926475..0000000 --- a/config/fish/functions/_fzf_preview_file.fish +++ /dev/null @@ -1,43 +0,0 @@ -# helper function for _fzf_search_directory and _fzf_search_git_status -function _fzf_preview_file --description "Print a preview for the given file based on its file type." - # because there's no way to guarantee that _fzf_search_directory passes the path to _fzf_preview_file - # as one argument, we collect all the arguments into one single variable and treat that as the path - set -f file_path $argv - - if test -L "$file_path" # symlink - # notify user and recurse on the target of the symlink, which can be any of these file types - set -l target_path (realpath "$file_path") - - set_color yellow - echo "'$file_path' is a symlink to '$target_path'." - set_color normal - - _fzf_preview_file "$target_path" - else if test -f "$file_path" # regular file - if set --query fzf_preview_file_cmd - # need to escape quotes to make sure eval receives file_path as a single arg - eval "$fzf_preview_file_cmd '$file_path'" - else - bat --style=numbers --color=always "$file_path" - end - else if test -d "$file_path" # directory - if set --query fzf_preview_dir_cmd - # see above - eval "$fzf_preview_dir_cmd '$file_path'" - else - # -A list hidden files as well, except for . and .. - # -F helps classify files by appending symbols after the file name - command ls -A -F "$file_path" - end - else if test -c "$file_path" - _fzf_report_file_type "$file_path" "character device file" - else if test -b "$file_path" - _fzf_report_file_type "$file_path" "block device file" - else if test -S "$file_path" - _fzf_report_file_type "$file_path" socket - else if test -p "$file_path" - _fzf_report_file_type "$file_path" "named pipe" - else - echo "$file_path doesn't exist." >&2 - end -end diff --git a/config/fish/functions/_fzf_report_diff_type.fish b/config/fish/functions/_fzf_report_diff_type.fish deleted file mode 100644 index cc26fb3..0000000 --- a/config/fish/functions/_fzf_report_diff_type.fish +++ /dev/null @@ -1,18 +0,0 @@ -# helper for _fzf_preview_changed_file -# prints out something like -# ╭────────╮ -# │ Staged │ -# ╰────────╯ -function _fzf_report_diff_type --argument-names diff_type --description "Print a distinct colored header meant to preface a git patch." - # number of "-" to draw is the length of the string to box + 2 for padding - set -f repeat_count (math 2 + (string length $diff_type)) - set -f line (string repeat --count $repeat_count ─) - set -f top_border ╭$line╮ - set -f btm_border ╰$line╯ - - set_color yellow - echo $top_border - echo "│ $diff_type │" - echo $btm_border - set_color normal -end diff --git a/config/fish/functions/_fzf_report_file_type.fish b/config/fish/functions/_fzf_report_file_type.fish deleted file mode 100644 index 49e02e1..0000000 --- a/config/fish/functions/_fzf_report_file_type.fish +++ /dev/null @@ -1,6 +0,0 @@ -# helper function for _fzf_preview_file -function _fzf_report_file_type --argument-names file_path file_type --description "Explain the file type for a file." - set_color red - echo "Cannot preview '$file_path': it is a $file_type." - set_color normal -end diff --git a/config/fish/functions/_fzf_search_directory.fish b/config/fish/functions/_fzf_search_directory.fish deleted file mode 100644 index 4541eec..0000000 --- a/config/fish/functions/_fzf_search_directory.fish +++ /dev/null @@ -1,33 +0,0 @@ -function _fzf_search_directory --description "Search the current directory. Replace the current token with the selected file paths." - # Directly use fd binary to avoid output buffering delay caused by a fd alias, if any. - # Debian-based distros install fd as fdfind and the fd package is something else, so - # check for fdfind first. Fall back to "fd" for a clear error message. - set -f fd_cmd (command -v fdfind || command -v fd || echo "fd") - set -f --append fd_cmd --color=always $fzf_fd_opts - - set -f fzf_arguments --multi --ansi $fzf_directory_opts - set -f token (commandline --current-token) - # expand any variables or leading tilde (~) in the token - set -f expanded_token (eval echo -- $token) - # unescape token because it's already quoted so backslashes will mess up the path - set -f unescaped_exp_token (string unescape -- $expanded_token) - - # If the current token is a directory and has a trailing slash, - # then use it as fd's base directory. - if string match --quiet -- "*/" $unescaped_exp_token && test -d "$unescaped_exp_token" - set --append fd_cmd --base-directory=$unescaped_exp_token - # use the directory name as fzf's prompt to indicate the search is limited to that directory - set --prepend fzf_arguments --prompt="Directory $unescaped_exp_token> " --preview="_fzf_preview_file $expanded_token{}" - set -f file_paths_selected $unescaped_exp_token($fd_cmd 2>/dev/null | _fzf_wrapper $fzf_arguments) - else - set --prepend fzf_arguments --prompt="Directory> " --query="$unescaped_exp_token" --preview='_fzf_preview_file {}' - set -f file_paths_selected ($fd_cmd 2>/dev/null | _fzf_wrapper $fzf_arguments) - end - - - if test $status -eq 0 - commandline --current-token --replace -- (string escape -- $file_paths_selected | string join ' ') - end - - commandline --function repaint -end diff --git a/config/fish/functions/_fzf_search_git_log.fish b/config/fish/functions/_fzf_search_git_log.fish deleted file mode 100644 index aa54724..0000000 --- a/config/fish/functions/_fzf_search_git_log.fish +++ /dev/null @@ -1,36 +0,0 @@ -function _fzf_search_git_log --description "Search the output of git log and preview commits. Replace the current token with the selected commit hash." - if not git rev-parse --git-dir >/dev/null 2>&1 - echo '_fzf_search_git_log: Not in a git repository.' >&2 - else - if not set --query fzf_git_log_format - # %h gives you the abbreviated commit hash, which is useful for saving screen space, but we will have to expand it later below - set -f fzf_git_log_format '%C(bold blue)%h%C(reset) - %C(cyan)%ad%C(reset) %C(yellow)%d%C(reset) %C(normal)%s%C(reset) %C(dim normal)[%an]%C(reset)' - end - - set -f preview_cmd 'git show --color=always --stat --patch {1}' - if set --query fzf_diff_highlighter - set preview_cmd "$preview_cmd | $fzf_diff_highlighter" - end - - set -f selected_log_lines ( - git log --no-show-signature --color=always --format=format:$fzf_git_log_format --date=short | \ - _fzf_wrapper --ansi \ - --multi \ - --scheme=history \ - --prompt="Git Log> " \ - --preview=$preview_cmd \ - --query=(commandline --current-token) \ - $fzf_git_log_opts - ) - if test $status -eq 0 - for line in $selected_log_lines - set -f abbreviated_commit_hash (string split --field 1 " " $line) - set -f full_commit_hash (git rev-parse $abbreviated_commit_hash) - set -f --append commit_hashes $full_commit_hash - end - commandline --current-token --replace (string join ' ' $commit_hashes) - end - end - - commandline --function repaint -end diff --git a/config/fish/functions/_fzf_search_git_status.fish b/config/fish/functions/_fzf_search_git_status.fish deleted file mode 100644 index 358f88c..0000000 --- a/config/fish/functions/_fzf_search_git_status.fish +++ /dev/null @@ -1,41 +0,0 @@ -function _fzf_search_git_status --description "Search the output of git status. Replace the current token with the selected file paths." - if not git rev-parse --git-dir >/dev/null 2>&1 - echo '_fzf_search_git_status: Not in a git repository.' >&2 - else - set -f preview_cmd '_fzf_preview_changed_file {}' - if set --query fzf_diff_highlighter - set preview_cmd "$preview_cmd | $fzf_diff_highlighter" - end - - set -f selected_paths ( - # Pass configuration color.status=always to force status to use colors even though output is sent to a pipe - git -c color.status=always status --short | - _fzf_wrapper --ansi \ - --multi \ - --prompt="Git Status> " \ - --query=(commandline --current-token) \ - --preview=$preview_cmd \ - --nth="2.." \ - $fzf_git_status_opts - ) - if test $status -eq 0 - # git status --short automatically escapes the paths of most files for us so not going to bother trying to handle - # the few edges cases of weird file names that should be extremely rare (e.g. "this;needs;escaping") - set -f cleaned_paths - - for path in $selected_paths - if test (string sub --length 1 $path) = R - # path has been renamed and looks like "R LICENSE -> LICENSE.md" - # extract the path to use from after the arrow - set --append cleaned_paths (string split -- "-> " $path)[-1] - else - set --append cleaned_paths (string sub --start=4 $path) - end - end - - commandline --current-token --replace -- (string join ' ' $cleaned_paths) - end - end - - commandline --function repaint -end diff --git a/config/fish/functions/_fzf_search_history.fish b/config/fish/functions/_fzf_search_history.fish deleted file mode 100644 index cafbce9..0000000 --- a/config/fish/functions/_fzf_search_history.fish +++ /dev/null @@ -1,39 +0,0 @@ -function _fzf_search_history --description "Search command history. Replace the command line with the selected command." - # history merge incorporates history changes from other fish sessions - # it errors out if called in private mode - if test -z "$fish_private_mode" - builtin history merge - end - - if not set --query fzf_history_time_format - # Reference https://devhints.io/strftime to understand strftime format symbols - set -f fzf_history_time_format "%m-%d %H:%M:%S" - end - - # Delinate time from command in history entries using the vertical box drawing char (U+2502). - # Then, to get raw command from history entries, delete everything up to it. The ? on regex is - # necessary to make regex non-greedy so it won't match into commands containing the char. - set -f time_prefix_regex '^.*? │ ' - # Delinate commands throughout pipeline using null rather than newlines because commands can be multi-line - set -f commands_selected ( - builtin history --null --show-time="$fzf_history_time_format │ " | - _fzf_wrapper --read0 \ - --print0 \ - --multi \ - --scheme=history \ - --prompt="History> " \ - --query=(commandline) \ - --preview="string replace --regex '$time_prefix_regex' '' -- {} | fish_indent --ansi" \ - --preview-window="bottom:3:wrap" \ - $fzf_history_opts | - string split0 | - # remove timestamps from commands selected - string replace --regex $time_prefix_regex '' - ) - - if test $status -eq 0 - commandline --replace -- $commands_selected - end - - commandline --function repaint -end diff --git a/config/fish/functions/_fzf_search_processes.fish b/config/fish/functions/_fzf_search_processes.fish deleted file mode 100644 index 133a880..0000000 --- a/config/fish/functions/_fzf_search_processes.fish +++ /dev/null @@ -1,32 +0,0 @@ -function _fzf_search_processes --description "Search all running processes. Replace the current token with the pid of the selected process." - # Directly use ps command because it is often aliased to a different command entirely - # or with options that dirty the search results and preview output - set -f ps_cmd (command -v ps || echo "ps") - # use all caps to be consistent with ps default format - # snake_case because ps doesn't seem to allow spaces in the field names - set -f ps_preview_fmt (string join ',' 'pid' 'ppid=PARENT' 'user' '%cpu' 'rss=RSS_IN_KB' 'start=START_TIME' 'command') - set -f processes_selected ( - $ps_cmd -A -opid,command | \ - _fzf_wrapper --multi \ - --prompt="Processes> " \ - --query (commandline --current-token) \ - --ansi \ - # first line outputted by ps is a header, so we need to mark it as so - --header-lines=1 \ - # ps uses exit code 1 if the process was not found, in which case show an message explaining so - --preview="$ps_cmd -o '$ps_preview_fmt' -p {1} || echo 'Cannot preview {1} because it exited.'" \ - --preview-window="bottom:4:wrap" \ - $fzf_processes_opts - ) - - if test $status -eq 0 - for process in $processes_selected - set -f --append pids_selected (string split --no-empty --field=1 -- " " $process) - end - - # string join to replace the newlines outputted by string split with spaces - commandline --current-token --replace -- (string join ' ' $pids_selected) - end - - commandline --function repaint -end diff --git a/config/fish/functions/_fzf_search_variables.fish b/config/fish/functions/_fzf_search_variables.fish deleted file mode 100644 index 52a7c70..0000000 --- a/config/fish/functions/_fzf_search_variables.fish +++ /dev/null @@ -1,47 +0,0 @@ -# This function expects the following two arguments: -# argument 1 = output of (set --show | psub), i.e. a file with the scope info and values of all variables -# argument 2 = output of (set --names | psub), i.e. a file with all variable names -function _fzf_search_variables --argument-names set_show_output set_names_output --description "Search and preview shell variables. Replace the current token with the selected variable." - if test -z "$set_names_output" - printf '%s\n' '_fzf_search_variables requires 2 arguments.' >&2 - - commandline --function repaint - return 22 # 22 means invalid argument in POSIX - end - - # Exclude the history variable from being piped into fzf because - # 1. it's not included in $set_names_output - # 2. it tends to be a very large value => increases computation time - # 3._fzf_search_history is a much better way to examine history anyway - set -f all_variable_names (string match --invert history <$set_names_output) - - set -f current_token (commandline --current-token) - # Use the current token to pre-populate fzf's query. If the current token begins - # with a $, remove it from the query so that it will better match the variable names - set -f cleaned_curr_token (string replace -- '$' '' $current_token) - - set -f variable_names_selected ( - printf '%s\n' $all_variable_names | - _fzf_wrapper --preview "_fzf_extract_var_info {} $set_show_output" \ - --prompt="Variables> " \ - --preview-window="wrap" \ - --multi \ - --query=$cleaned_curr_token \ - $fzf_variables_opts - ) - - if test $status -eq 0 - # If the current token begins with a $, do not overwrite the $ when - # replacing the current token with the selected variable. - # Uses brace expansion to prepend $ to each variable name. - commandline --current-token --replace ( - if string match --quiet -- '$*' $current_token - string join " " \${$variable_names_selected} - else - string join " " $variable_names_selected - end - ) - end - - commandline --function repaint -end diff --git a/config/fish/functions/_fzf_wrapper.fish b/config/fish/functions/_fzf_wrapper.fish deleted file mode 100644 index 486e36c..0000000 --- a/config/fish/functions/_fzf_wrapper.fish +++ /dev/null @@ -1,21 +0,0 @@ -function _fzf_wrapper --description "Prepares some environment variables before executing fzf." - # Make sure fzf uses fish to execute preview commands, some of which - # are autoloaded fish functions so don't exist in other shells. - # Use --function so that it doesn't clobber SHELL outside this function. - set -f --export SHELL (command --search fish) - - # If neither FZF_DEFAULT_OPTS nor FZF_DEFAULT_OPTS_FILE are set, then set some sane defaults. - # See https://github.com/junegunn/fzf#environment-variables - set --query FZF_DEFAULT_OPTS FZF_DEFAULT_OPTS_FILE - if test $status -eq 2 - # cycle allows jumping between the first and last results, making scrolling faster - # layout=reverse lists results top to bottom, mimicking the familiar layouts of git log, history, and env - # border shows where the fzf window begins and ends - # height=90% leaves space to see the current command and some scrollback, maintaining context of work - # preview-window=wrap wraps long lines in the preview window, making reading easier - # marker=* makes the multi-select marker more distinguishable from the pointer (since both default to >) - set --export FZF_DEFAULT_OPTS '--cycle --layout=reverse --border --height=90% --preview-window=wrap --marker="*"' - end - - fzf $argv -end diff --git a/config/fish/functions/fzf_configure_bindings.fish b/config/fish/functions/fzf_configure_bindings.fish deleted file mode 100644 index 4b4e7a2..0000000 --- a/config/fish/functions/fzf_configure_bindings.fish +++ /dev/null @@ -1,46 +0,0 @@ -# Always installs bindings for insert and default mode for simplicity and b/c it has almost no side-effect -# https://gitter.im/fish-shell/fish-shell?at=60a55915ee77a74d685fa6b1 -function fzf_configure_bindings --description "Installs the default key bindings for fzf.fish with user overrides passed as options." - # no need to install bindings if not in interactive mode or running tests - status is-interactive || test "$CI" = true; or return - - set -f options_spec h/help 'directory=?' 'git_log=?' 'git_status=?' 'history=?' 'processes=?' 'variables=?' - argparse --max-args=0 --ignore-unknown $options_spec -- $argv 2>/dev/null - if test $status -ne 0 - echo "Invalid option or a positional argument was provided." >&2 - _fzf_configure_bindings_help - return 22 - else if set --query _flag_help - _fzf_configure_bindings_help - return - else - # Initialize with default key sequences and then override or disable them based on flags - # index 1 = directory, 2 = git_log, 3 = git_status, 4 = history, 5 = processes, 6 = variables - set -f key_sequences \e\cf \e\cl \e\cs \cr \e\cp \cv # \c = control, \e = escape - set --query _flag_directory && set key_sequences[1] "$_flag_directory" - set --query _flag_git_log && set key_sequences[2] "$_flag_git_log" - set --query _flag_git_status && set key_sequences[3] "$_flag_git_status" - set --query _flag_history && set key_sequences[4] "$_flag_history" - set --query _flag_processes && set key_sequences[5] "$_flag_processes" - set --query _flag_variables && set key_sequences[6] "$_flag_variables" - - # If fzf bindings already exists, uninstall it first for a clean slate - if functions --query _fzf_uninstall_bindings - _fzf_uninstall_bindings - end - - for mode in default insert - test -n $key_sequences[1] && bind --mode $mode $key_sequences[1] _fzf_search_directory - test -n $key_sequences[2] && bind --mode $mode $key_sequences[2] _fzf_search_git_log - test -n $key_sequences[3] && bind --mode $mode $key_sequences[3] _fzf_search_git_status - test -n $key_sequences[4] && bind --mode $mode $key_sequences[4] _fzf_search_history - test -n $key_sequences[5] && bind --mode $mode $key_sequences[5] _fzf_search_processes - test -n $key_sequences[6] && bind --mode $mode $key_sequences[6] "$_fzf_search_vars_command" - end - - function _fzf_uninstall_bindings --inherit-variable key_sequences - bind --erase -- $key_sequences - bind --erase --mode insert -- $key_sequences - end - end -end diff --git a/config/fish/functions/nx.fish b/config/fish/functions/nx.fish deleted file mode 100644 index c474dd6..0000000 --- a/config/fish/functions/nx.fish +++ /dev/null @@ -1,4 +0,0 @@ -function nx --wraps='pnpm nx' --description 'alias nx pnpm nx' - pnpm nx $argv - -end diff --git a/config/fish/functions/pnx.fish b/config/fish/functions/pnx.fish deleted file mode 100644 index 87b9db4..0000000 --- a/config/fish/functions/pnx.fish +++ /dev/null @@ -1,4 +0,0 @@ -function pnx --wraps='pnpm nx' --description 'alias pnx pnpm nx' - pnpm nx $argv - -end diff --git a/modules/darwin/default.nix b/modules/darwin/default.nix index ead26d0..eb7543e 100644 --- a/modules/darwin/default.nix +++ b/modules/darwin/default.nix @@ -1,82 +1,13 @@ -{ lib, pkgs, self, nixpkgs-unstable, ... }: -let - unstable = import nixpkgs-unstable { - system = pkgs.stdenv.hostPlatform.system; - - config.allowUnfreePredicate = pkg: - builtins.elem (lib.getName pkg) [ - "1password-cli" - ]; - }; -in { - # List packages installed in system profile. To search by name, run: - # $ nix-env -qaP | grep wget - environment.systemPackages = [ ]; - +{ pkgs, self, ... }: { # Necessary for using flakes on this system. nix.settings.experimental-features = "nix-command flakes"; # Fish shell setup programs.fish.enable = true; environment.shells = [ pkgs.fish ]; - users.users.chrisvanderloo = { home = "/Users/chrisvanderloo"; shell = pkgs.fish; - packages = with pkgs; [ - # Shell packages - dust - gh - git - eza - fzf - zoxide - - # Kubernetes - k9s - kubectl - kind - - # .NET - dotnet-sdk_9 - - pulumi - - llvm - - # Python - uv - python3 - - azure-cli - commitizen - - # Podman - podman - podman-compose - - - # Node - nodejs_26 - pnpm - bun - - # Nix - nil - nixd - # TailwindCSS - tailwindcss-language-server - # TS - oxlint - oxfmt - typescript-go - typescript-language-server - # Astro - astro-language-server - ] ++ [ - unstable.jujutsu - unstable._1password-cli - ]; }; security.pam.services.sudo_local = { diff --git a/modules/home/bat.nix b/modules/home/bat.nix deleted file mode 100644 index 16bd473..0000000 --- a/modules/home/bat.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - programs.bat = { - enable = true; - - config = { - theme = "ansi"; - italic-text = "always"; - map-syntax = [ "*.ignore:Git Ignore" ]; - }; - }; -} diff --git a/modules/home/fish.nix b/modules/home/fish.nix index 85b9ff3..67fcc64 100644 --- a/modules/home/fish.nix +++ b/modules/home/fish.nix @@ -1,12 +1,86 @@ -{ ... }: { +{ pkgs, lib, ... }: +let + starshipConfig = with builtins; fromTOML (readFile ./starship.toml); +in +{ + xdg.configFile = { + "fish/completions" = { + source = ../../config/fish/completions; + recursive = true; + }; + + "fish/conf.d" = { + source = ../../config/fish/conf.d; + recursive = true; + }; + + "fish/functions" = { + source = ../../config/fish/functions; + recursive = true; + }; + }; + programs.fish = { enable = true; generateCompletions = true; + functions = { + fish_greeting = ""; + }; + interactiveShellInit = '' fish_vi_key_bindings ''; }; + programs.bat = { + enable = true; + + config = { + theme = "ansi"; + italic-text = "always"; + map-syntax = [ "*.ignore:Git Ignore" ]; + }; + }; + + programs.starship = { + enable = true; + enableFishIntegration = true; + extraPackages = [ pkgs.jj-starship ]; + + enableTransience = true; + + settings = lib.recursiveUpdate starshipConfig { + add_newline = false; + command_timeout = 1000; + fill = { + symbol = " "; + }; + }; + }; + + programs.fzf = { + enable = true; + enableFishIntegration = true; + + defaultOptions = [ + "--color=16" + "--color=gutter:-1" + "--no-mouse" + "--margin=1" + "--cycle" + "--layout=reverse" + "--height=~60%" + "--preview-window=wrap" + "--marker=*" + ]; + }; + + programs.ghostty.enableFishIntegration = true; + programs.zoxide = { + enable = true; + enableFishIntegration = true; + }; + programs.man.generateCaches = false; } diff --git a/modules/home/fzf.nix b/modules/home/fzf.nix deleted file mode 100644 index 1f72812..0000000 --- a/modules/home/fzf.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ - programs.fzf = { - enable = true; - - defaultOptions = [ - "--color=16" - "--color=gutter:-1" - "--no-mouse" - "--margin=1" - "--cycle" - "--layout=reverse" - "--height=~60%" - "--preview-window=wrap" - "--marker=*" - ]; - }; -} diff --git a/modules/home/packages.nix b/modules/home/packages.nix new file mode 100644 index 0000000..c9f7e61 --- /dev/null +++ b/modules/home/packages.nix @@ -0,0 +1,63 @@ +{ pkgs, nixpkgs-unstable, lib, ... }: +let + unstable = import nixpkgs-unstable { + system = pkgs.stdenv.hostPlatform.system; + + config.allowUnfreePredicate = pkg: + builtins.elem (lib.getName pkg) [ + "1password-cli" + ]; + }; +in { + home.packages = with pkgs; [ + # Shell packages + dust + gh + git + eza + + # Kubernetes + k9s + kubectl + kind + + # .NET + dotnet-sdk_9 + + pulumi + + llvm + + # Python + uv + python3 + + azure-cli + commitizen + + # Podman + podman + podman-compose + + # Node + nodejs_26 + pnpm + bun + + # Nix + nil + nixd + # TailwindCSS + tailwindcss-language-server + # TS + oxlint + oxfmt + typescript-go + typescript-language-server + # Astro + astro-language-server + ] ++ [ + unstable.jujutsu + unstable._1password-cli + ]; +} diff --git a/modules/home/starship.nix b/modules/home/starship.nix deleted file mode 100644 index ca773a0..0000000 --- a/modules/home/starship.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ pkgs, lib, ... }: -let - base = with builtins; fromTOML (readFile ./starship.toml); -in { - programs.starship = { - enable = true; - extraPackages = [ pkgs.jj-starship ]; - - enableFishIntegration = true; - enableTransience = true; - - settings = lib.recursiveUpdate base { - add_newline = false; - command_timeout = 1000; - fill = { - symbol = " "; - }; - }; - }; -} diff --git a/modules/hosts/mbp.nix b/modules/hosts/mbp.nix index 84ecac5..149dae0 100644 --- a/modules/hosts/mbp.nix +++ b/modules/hosts/mbp.nix @@ -1,4 +1,4 @@ -{ +{ nixpkgs-unstable, ... }: { imports = [ ../darwin ]; @@ -9,14 +9,15 @@ useGlobalPkgs = true; useUserPackages = true; backupFileExtension = "before-home-manager"; + + extraSpecialArgs = { inherit nixpkgs-unstable; }; + users.chrisvanderloo = { imports = [ ../home/helix.nix ../home/fish.nix ../home/ghostty.nix - ../home/bat.nix - ../home/fzf.nix - ../home/starship.nix + ../home/packages.nix ]; home.stateVersion = "26.05"; diff --git a/modules/hosts/pi.nix b/modules/hosts/pi.nix index a12022b..6917ed7 100644 --- a/modules/hosts/pi.nix +++ b/modules/hosts/pi.nix @@ -4,11 +4,9 @@ backupFileExtension = "before-home-manager"; users.chris = { imports = [ - ../home/helix.nix ../home/fish.nix - ../home/bat.nix - ../home/fzf.nix - ../home/starship.nix + ../home/helix.nix + ../home/packages.nix ]; home.stateVersion = "26.05";