six-ddc / hss

An interactive parallel ssh client featuring autocomplete and asynchronous execution.
MIT License
353 stars 23 forks source link

Remember changed directories #16

Open djl11 opened 3 years ago

djl11 commented 3 years ago

Very useful tool, thanks a lot for sharing!

I think hss would be even more powerful if there was an option to remember what directories have been traversed during the interactive session. This would make the experience closer to being in an interactive shell.

I'm not sure how best to do this, but a naive approach would be to store the directory after each parralel-ssh command is exited, and then just cd into this directory as the first command on the next parrallel-ssh invocation like so:

parallel-ssh -i -H server "cd /my/previous/dir; my_next_commands"

I would make a PR, but I'm not familiar enough with the code to know where to suggest a change.

Does this feature sound plausible? And if so, do you agree it would be useful?

Thanks, Dan