Closed
Description
It would be convenient to be able to load a HTTP Prompt environment from the command line so as to launch http-prompt with a predefined context without requiring any manual input within http-prompt. Currently the only way to fully load such an environment is to execute exec /path/to/project.hp
interactively.
Loading an environment in such a way would allow the creation of aliases
I'm thinking of 2 different ways to do this:
- Option 1:
add a--env
cli parameter to would take the environment file to load as parameter
http-prompt --env /path/to/project.hp
- Option 2:
support receiving data from stdin
cat /path/to/project.hp | http-prompt
Each of these option would make it possible to create aliases:
- Option 1
alias http_project_prod='http-prompt --env /path/to/project_prod.hp
alias http_project_test='http-prompt --env /path/to/project_test.hp
- Option 2
alias http_project_prod='cat /path/to/project_prod.hp | http-prompt'
alias http_project_test='cat /path/to/project_test.hp | http-prompt'
Please let me know what you think of it
I'm willing to implement it myself if