diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-12-14 14:56:55 +0100 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-12-14 14:56:55 +0100 |
commit | 53d49dbebccfcbd68f360b067af9a69e1a130a1f (patch) | |
tree | 5747b269d25b76fdf3fb6071c441da163e2927c2 /modules/by-name/lf/lf/ctpv/prev/application/sqlite/sqlite.sh | |
parent | fix(flake/nixosConfigurations/common): Disable ollama by default (diff) | |
download | nixos-config-53d49dbebccfcbd68f360b067af9a69e1a130a1f.zip |
feat(modules/lf/ctpv): Rework as module with autoloading
Diffstat (limited to 'modules/by-name/lf/lf/ctpv/prev/application/sqlite/sqlite.sh')
-rw-r--r-- | modules/by-name/lf/lf/ctpv/prev/application/sqlite/sqlite.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/modules/by-name/lf/lf/ctpv/prev/application/sqlite/sqlite.sh b/modules/by-name/lf/lf/ctpv/prev/application/sqlite/sqlite.sh new file mode 100644 index 00000000..07e77a93 --- /dev/null +++ b/modules/by-name/lf/lf/ctpv/prev/application/sqlite/sqlite.sh @@ -0,0 +1,22 @@ +#! /usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH + +# shellcheck disable=SC2269 +f="$f" +# shellcheck disable=SC2269 +w="$w" + +. %HELPERS + +echo "SQLite database. Schema:" +echo + +sqlite3 "$f" ".schema --indent" | bat \ + --color always \ + --style plain \ + --paging never \ + --language SQL \ + --terminal-width "$w" \ + --wrap character |