samuell / scicommander

Run shell commands in a scientifically reproducible and robust way
MIT License
13 stars 1 forks source link

Implement a shell so running the scicmd command is not needed #2

Closed alneberg closed 1 year ago

alneberg commented 1 year ago

Hello!

Thank you for the discussion yesterday. I found that at least zsh has hooks, specifically preexec that will run before the command is executed and will (if history is enabled I believe) get the command as an input.

This isn't really an issue so feel free to close it as soon as you want.

samuell commented 1 year ago

Thanks a lot @alneberg , appreciate the tip a lot! This is a great pointer, and I'll have a look and see if there are some general mechanism that would work in many different shells.

samuell commented 1 year ago

I just found out about the cmd module in the Python standard library that seems to be able to do this.

Keeping the issue for this feature :slightly_smiling_face: