I'd like to do something like this:
(cd "$1" && pwd && many && other && commands) < echo "../path"
Which should take the arguments provided and pass them to the subshell. The subshell should then execute.
The important part is that passed arguments are at the end of command line to allow for easy altering because the cursor is at the end of command when user presses the Up arrow.
(cd "$A" && pwd && many && other && commands),
!-2or 2 times Up arrow and enter...
Ato the old path? Give it a look to the answer below and let me know. Else you can pass parameter to a bash invocation with the option
CTRL+Awill put the cursor at the beginning of the line you just recalled with the
Uparrow. There are a lot of keyboard shortcuts for each terminal