Monday, December 13, 2021

HSTR 2.4.0: Insert command in command prompt

 New HSTR release brings parameter which can be used to insert commands in terminal prompt:

$ hstr --insert-in-terminal="ls -hal"
$ ls -hal|

It is useful whenever you need to:

  •  construct complex command using a shell script to modify current shell with source and check and/or edit it prior running:

$ hstr --insert-in-terminal="``"
$ export CONDA_INSTALL_DIR=/opt/conda/acme && unset PYTHONPATH && source ../.rc_conda && conda activate env_prj|

  • insert command to terminal prompt directly from a shell script to modify current shell:

$ cat
hstr --insert-in-terminal="${CMD} -vvv ${REQUIRED_PARAMS} ${OPTIONAL_PARAMS} ${2}"$ ./

ACME builder:
  clean ... DONE
  build ... DONE
Ready to test product:

$ pytest -vvv -n 8 --use-fixture-cache tests/|

Overall this feature aims to help you to be faster and get more out of your shell scripts.


Read more »

Labels: , , , ,