oziphantom wrote:
[...] taling about the same thing
Hm, i tested, and it seems the /f switch is the 'culprit' here. While it enables
ctrl-f and
ctrl-d, it is also enabling tabs/disabling completion through the
tab key.
So which you'd prefer comes down to if you prefer the pretty standard one-key press of tab, or the separation of completing files on one key, and directories on the other. Or if you need/find it useful to make tabs, i suppose.
Btw In win10, apparently, they finally introduced the usual clibboard shortcuts. I assume copying with ctrl-c would be suspended when running a bat.
Quote:
Batch files tend to be self contained, and all the modifications they make are for the purpose of the batch file, i.e they leave the user state unmodified.
I googled running directory pushing/pulling/changing code in a bat vs. batch termination by user, and it seems the common solution to this problem is letting that row or block of code run via a child instance like so:
cmd /c (/c will close the child after execution is complete). This way, the
%cd% of the parent will be intact even if the bat is prematurely cancelled. Even more interestingly, this technique lets the bat execute lines post-termination. (EDIT: while at it, it's probably best to make it
cmd /c /d as to disregard autorun preferences local to the system)