$(CURRENT_DIRECTORY) is np++ directory
Whilst trying to configure a RUN command, I discovered that $(CURRENT DIRECTORY) does not actually decipher to the current file’s directory when using comspec.
For example, npp comes with this (in shortcuts.xml):
<Command name="Open current dir cmd" Ctrl="no" Alt="no" Shift="no" Key="0">cmd /K cd $(CURRENT_DIRECTORY)</Command>
But if you run that command, it opens notepad++ directory.
However, for explorer, it works fine:
<Command name="Open containing folder" Ctrl="no" Alt="no" Shift="no" Key="0">explorer $(CURRENT_DIRECTORY)</Command>
Maybe I’m missing something or I’ve got something misfconfigured somehow?
It’s hard to say conclusively from what you’ve provided, but if the tab in Notepad++ that is active when you invoke the
cmd /Kis on a different drive, I see the behavior you are talking about.
I would try changing the
cmd /Kversion of the command to:
cmd /K cd /d $(CURRENT_DIRECTORY)
/dallows the drive to be changed when executing
See HERE for a nice reference.
I had been going by this list for cmd parameters
That’s fine; note that that site refers to parameters for “cmd” only.
/dthat matters here is a parameter to the “cd” command, NOT the “cmd” command.
Just for general knowledge, the
\K, however, IS a parameter to “cmd”.
Anyway, good that it now works for you.
Thanks! That clears things up for me. I’m a bit richer now!