mirror of
https://github.com/Steffo99/config-fish.git
synced 2024-12-22 23:04:22 +00:00
Compare commits
7 commits
5d4cf5202f
...
681d9818ea
Author | SHA1 | Date | |
---|---|---|---|
681d9818ea | |||
15fafdb1c1 | |||
e7a9b9bbcb | |||
7f85c461b9 | |||
e4ef59f490 | |||
9e45ad6c8b | |||
cb6235c606 |
11 changed files with 291 additions and 13 deletions
BIN
.media/icon-512x512.png
Normal file
BIN
.media/icon-512x512.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 165 KiB |
26
.media/icon.svg
Normal file
26
.media/icon.svg
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg">
|
||||
<svg height="100%" id="emblematic-background" version="1.1" viewBox="0 0 512 512" width="100%" xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
<linearGradient gradientUnits="userSpaceOnUse" id="background" x2="512" y1="512">
|
||||
<stop offset="0" stop-color="#051436"/>
|
||||
<stop offset=".75" stop-color="#001553"/>
|
||||
<stop offset="1" stop-color="#010a4e"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect fill="url(#background)" height="512" width="512"/>
|
||||
</svg>
|
||||
<svg height="63%" id="emblematic-icon" preserveAspectRatio="xMidYMid meet" viewBox="0 0 576 512" width="63%" x="94.72" xmlns="http://www.w3.org/2000/svg" y="94.72">
|
||||
<defs>
|
||||
<filter color-interpolation-filters="sRGB" id="emblematic-filter">
|
||||
<feFlood flood-color="rgb(1,8,40)" in="SourceGraphic" result="flood"/>
|
||||
<feGaussianBlur in="SourceGraphic" result="blur" stdDeviation="10"/>
|
||||
<feOffset dx="-4" dy="8" in="blur" result="offset"/>
|
||||
<feComposite in="flood" in2="offset" operator="in" result="comp1"/>
|
||||
<feComposite in="SourceGraphic" in2="comp1" result="comp2"/>
|
||||
</filter>
|
||||
</defs>
|
||||
<!--! Font Awesome Pro 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2024 Fonticons, Inc. -->
|
||||
<path d="M275.2 38.4c-10.6-8-25-8.5-36.3-1.5S222 57.3 224.6 70.3l9.7 48.6c-19.4 9-36.9 19.9-52.4 31.5c-15.3 11.5-29 23.9-40.7 36.3L48.1 132.4c-12.5-7.3-28.4-5.3-38.6 4.9S-3 163.3 4.2 175.9L50 256 4.2 336.1c-7.2 12.6-5 28.4 5.3 38.6s26.1 12.2 38.6 4.9l93.1-54.3c11.8 12.3 25.4 24.8 40.7 36.3c15.5 11.6 33 22.5 52.4 31.5l-9.7 48.6c-2.6 13 3.1 26.3 14.3 33.3s25.6 6.5 36.3-1.5l77.6-58.2c54.9-4 101.5-27 137.2-53.8c39.2-29.4 67.2-64.7 81.6-89.5c5.8-9.9 5.8-22.2 0-32.1c-14.4-24.8-42.5-60.1-81.6-89.5c-35.8-26.8-82.3-49.8-137.2-53.8L275.2 38.4zM384 256a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z" fill="#85c4ff" filter="url(#emblematic-filter)"/>
|
||||
</svg>
|
||||
</svg>
|
After Width: | Height: | Size: 1.9 KiB |
167
completions/diesel.fish
Normal file
167
completions/diesel.fish
Normal file
|
@ -0,0 +1,167 @@
|
|||
# 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 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 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 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 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 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.'
|
27
completions/gen-repo-media.fish
Normal file
27
completions/gen-repo-media.fish
Normal file
|
@ -0,0 +1,27 @@
|
|||
function __gen-repo-media_is_at_arg
|
||||
set args (commandline --current-process --cut-at-cursor --tokenize)
|
||||
set len (count $args)
|
||||
if [ "$len" -ne "$argv[1]" ]
|
||||
return 1
|
||||
end
|
||||
end
|
||||
|
||||
function __gen-repo-media_complete_icons
|
||||
set org (commandline --current-process --cut-at-cursor --tokenize)[2]
|
||||
set files (find "$HOME/Pictures/Avatars/$org/emblems-512x512/solid" -mindepth '1' -maxdepth '1' -type 'f' -iname '*.svg' -printf '%P\n')
|
||||
for file in $files
|
||||
string replace --regex '[.]svg$' "" "$file"
|
||||
end
|
||||
end
|
||||
|
||||
complete \
|
||||
--command='gen-repo-media' \
|
||||
--no-files \
|
||||
--condition='__gen-repo-media_is_at_arg 1' \
|
||||
--arguments='(find "$HOME/Pictures/Avatars" -mindepth 1 -maxdepth 1 -type d -printf "%P\n")'
|
||||
|
||||
complete \
|
||||
--command='gen-repo-media' \
|
||||
--no-files \
|
||||
--condition='__gen-repo-media_is_at_arg 2' \
|
||||
--arguments='(__gen-repo-media_complete_icons)'
|
|
@ -4,7 +4,7 @@ if [ $status -eq 0 ]
|
|||
log-t "Creating" "Akkoma" "directory..."
|
||||
command mkdir --parents "Akkoma"
|
||||
log-d "Processing" "$argv[1]" "for Akkoma use..."
|
||||
command magick -background none "$argv[1]" -resize "106x106^" -gravity center -extent 106x106 $argv[2..-1] "Akkoma/$argv[1]"
|
||||
command magick -background none "$argv[1]"'[106x106]' -gravity 'center' -extent '106x106' $argv[2..-1] "Akkoma/$argv[1]"
|
||||
log-t "Done! Emoji added to the" "Akkoma" "directory!"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,7 +4,7 @@ if [ $status -eq 0 ]
|
|||
log-t "Creating" "Discord" "directory..."
|
||||
command mkdir --parents "Discord"
|
||||
log-d "Processing" "$argv[1]" "for Discord use..."
|
||||
command magick -background none "$argv[1]" -resize "128x128^" -gravity center -extent 128x128 $argv[2..-1] "Discord/$argv[1]"
|
||||
command magick -background none "$argv[1]"'[128x128]' -gravity 'center' -extent '128x128' $argv[2..-1] "Discord/$argv[1]"
|
||||
log-t "Done! Emoji added to the" "Discord" "directory!"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,7 +4,7 @@ if [ $status -eq 0 ]
|
|||
log-t "Creating" "Telegram" "directory..."
|
||||
command mkdir --parents "Telegram"
|
||||
log-d "Processing" "$argv[1]" "for Telegram use..."
|
||||
command magick -background none "$argv[1]" -resize "100x100^" -gravity center -extent 100x100 $argv[2..-1] "Telegram/$argv[1]"
|
||||
command magick -background none "$argv[1]"'[100x100]' -gravity 'center' -extent '100x100' $argv[2..-1] "Telegram/$argv[1]"
|
||||
log-t "Done! Emoji added to the" "Telegram" "directory!"
|
||||
end
|
||||
end
|
||||
|
|
62
functions/gen-repo-media.fish
Normal file
62
functions/gen-repo-media.fish
Normal file
|
@ -0,0 +1,62 @@
|
|||
function gen-repo-media
|
||||
log-i "Generating" ".media" "directory for this repository..."
|
||||
|
||||
set org $argv[1]
|
||||
|
||||
if [ -z "$org" ]
|
||||
log-f "Missing" "org" "parameter (#1)."
|
||||
exit 1
|
||||
else
|
||||
log-d "Using organization:" "$org"
|
||||
end
|
||||
|
||||
set icon $argv[2]
|
||||
|
||||
if [ -z "$icon" ]
|
||||
log-f "Missing" "icon" "parameter (#2)."
|
||||
exit 1
|
||||
else
|
||||
log-d "Using icon:" "$org"
|
||||
end
|
||||
|
||||
set emblem_svg "$HOME/Pictures/Avatars/$org/emblems-512x512/solid/$icon.svg"
|
||||
|
||||
if [ ! -f "$emblem_svg" ]
|
||||
log-f "Emblem SVG at" "$emblem_svg" "does not exist."
|
||||
exit 2
|
||||
else
|
||||
log-d "Using emblem SVG:" "$emblem_svg"
|
||||
end
|
||||
|
||||
set emblem_512x512 "$HOME/Pictures/Avatars/$org/emblems-512x512/solid/$icon.png"
|
||||
|
||||
if [ ! -f "$emblem_512x512" ]
|
||||
log-f "Emblem 512x512 at" "$emblem_512x512" "does not exist."
|
||||
exit 2
|
||||
else
|
||||
log-d "Using emblem 512x512:" "$emblem_512x512"
|
||||
end
|
||||
|
||||
set emblem_128x128_round "$HOME/Pictures/Avatars/$org/emblems-128x128_round/solid/$icon.png"
|
||||
|
||||
if [ ! -f "$emblem_128x128_round" ]
|
||||
log-f "Round emblem 128x128 at" "$emblem_128x128_round" "does not exist."
|
||||
exit 2
|
||||
else
|
||||
log-d "Using round emblem 128x128:" "$emblem_128x128_round"
|
||||
end
|
||||
|
||||
log-t "Creating" ".media" "directory..."
|
||||
command mkdir .media
|
||||
|
||||
log-t "Copying" "emblem SVG" "..."
|
||||
command cp "$emblem_svg" ".media/icon.svg"
|
||||
|
||||
log-t "Copying" "emblem 512x512" "..."
|
||||
command cp "$emblem_512x512" ".media/icon-512x512.png"
|
||||
|
||||
log-t "Copying" "round emblem 128x128" "..."
|
||||
command cp "$emblem_128x128_round" ".media/icon-128x128_round.png"
|
||||
|
||||
log-s "Successfully set up" ".media" "directory!"
|
||||
end
|
6
functions/tree.fish
Normal file
6
functions/tree.fish
Normal file
|
@ -0,0 +1,6 @@
|
|||
which tree --skip-functions >/dev/null 2>/dev/null
|
||||
if [ $status -eq 0 ]
|
||||
function tree --wraps="tree -C"
|
||||
command tree -C $argv
|
||||
end
|
||||
end
|
|
@ -1,5 +0,0 @@
|
|||
which cargo --skip-functions >/dev/null 2>/dev/null
|
||||
if [ $status -eq 0 ]
|
||||
log-t "Adding" "cargo" "binaries to the PATH..."
|
||||
fish_add_path ~"/.cargo/bin"
|
||||
end
|
|
@ -1,5 +0,0 @@
|
|||
which uv --skip-functions >/dev/null 2>/dev/null
|
||||
if [ $status -eq 0 ]
|
||||
log-t "Adding" "uv" "binaries to the PATH..."
|
||||
fish_add_path ~"/.local/bin"
|
||||
end
|
Loading…
Reference in a new issue