Small test to see how ergonomic it would be to query a directory using SQL.
The name comes from combining ls and sql.
Query a directory
# Query the current directory
lsql "SELECT * FROM ."
# Query the temp directory
lsql "SELECT * FROM /tmp"Just return the name of the files in the current directory if you're in this repo.
lsql "SELECT name, mode FROM ."
| name | mode |
|-------------|-----------|
| main.odin | rw-r--r-- |
| lexer.odin | rw-r--r-- |
| .envrc | rw-r--r-- |
| flake.lock | rw-r--r-- |
| lsql | rwxr-xr-x |
| README.md | rw-r--r-- |
| parser.odin | rw-r--r-- |
| .gitignore | rw-r--r-- |
| flake.nix | rw-r--r-- |
| .git | rwxr-xr-x |
| .direnv | rwxr-xr-x |
lsql command [-raw]
Flags:
-command:<string>, required | Statement to be executed
|
-raw | Do not pretty print the results or headers
- name
- inode
- size
- mode
- type
- creation_time
- modification_time
- access_time