I use Cmder as my cmd replacement of choice and I use -GuiMacro:0 print("<command>\n") to send commands to the currently active tab. However, I'd like to cd to the current folder first so I don't have to go like "!cd <path_to_folder> dir".
Is it currently possible?
Custom command line interpreter - current folder as argument
-
Awpteamoose
- Posts: 3
- Joined: 06 Sep 2015 20:55
-
admin
- Site Admin
- Posts: 66631
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Custom command line interpreter - current folder as argu
The XY native variable resolves to the current path if run through the Address Bar. This might help.
Code: Select all
<curpath>FAQ | XY News RSS | XY X
-
Awpteamoose
- Posts: 3
- Joined: 06 Sep 2015 20:55
Re: Custom command line interpreter - current folder as argu
Well, I'd like to write !dir and have it be resolved to "cdd <curpath> && <command>" (cdd is my alias for change drive and directory)
Writing custom command line interpreter arguments like "-GuiMacro:0 print("cdd <curpath> && <command>\n")" doesn't work as <curpath> doesn't get resolved.
Going Alt+D, Home, "!cdd ", End, " && dir" is faster than replacing current path in the address bar with <curpath>.
Writing custom command line interpreter arguments like "-GuiMacro:0 print("cdd <curpath> && <command>\n")" doesn't work as <curpath> doesn't get resolved.
Going Alt+D, Home, "!cdd ", End, " && dir" is faster than replacing current path in the address bar with <curpath>.
-
admin
- Site Admin
- Posts: 66631
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Custom command line interpreter - current folder as argu
I thought it would be resolved. But, well, command line interpreters is not my daily business. Hopefully somebody else reads this...
BTW, XY also has Aliases (and variables are resolved here). Check out the Help...
BTW, XY also has Aliases (and variables are resolved here). Check out the Help...
FAQ | XY News RSS | XY X
-
Awpteamoose
- Posts: 3
- Joined: 06 Sep 2015 20:55
Re: Custom command line interpreter - current folder as argu
I'm not sure how aliases would help me, can you go into more detail?admin wrote:BTW, XY also has Aliases (and variables are resolved here). Check out the Help...
Basically what I'd like is another macro (like <command>) that would resolve to the currently active tab's folder. I suppose this is more of a feature request, unless I'm misunderstanding something obvious.
-
admin
- Site Admin
- Posts: 66631
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Custom command line interpreter - current folder as argu
OK, thanks, I think now I got it. I will add something to the next beta...
FAQ | XY News RSS | XY X
XYplorer Beta Club