Please sign in to comment.
Make bin/sequel accept file arguments and work correctly when $stdin …
…is not a tty Previously, unless the -m, -C, -d, or -D options was given, bin/sequel always gave an IRB prompt. This changes that behavior so that if any arguments are present, they are interpreted as filenames and are loaded. Also, if $stdin is not a tty, it is read from and evaled. These changes make bin/sequel operate more like a standard *nix program. For recent Linux users, this also means you can have a shebang line such as: #!/usr/bin/sequel postgres://user:pass@host/db to create a self contained script, where you can have ruby code in the script, with the DB constant already set. This is because recent Linux versions (since 2.6.28) support recursion in the #! handling.
- Loading branch information...