Configurable Command Prompt

Features wanted...
oli
Posts: 8
Joined: 07 Mar 2007 19:51
Location: Hamburg, Germany

Configurable Command Prompt

Post by oli »

Hi,

just recently i stumbled upon a nice little terminal replacement for the cmd.exe shell. it can be found at: http://sourceforge.net/projects/console/

a nice little addition to xyplorer would be to be able to configure the 'Command Prompt' button to spawn any kind of terminal (cmd, cygwin, console, ...) in the current directory (via param).

cheers,
oli

admin
Site Admin
Posts: 64886
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Configurable Command Prompt

Post by admin »

XY calls what is returned by the %COMSPEC% environment var. Can you set this var to your replacement?

oli
Posts: 8
Joined: 07 Mar 2007 19:51
Location: Hamburg, Germany

Post by oli »

the thing is that console is not a replacement for a shell, but just provides an alternative terminal window for an arbitrary shell (like the *terms on unix). so setting the COMSPEC to console would not even be possible in that case.

mwb1100
Posts: 213
Joined: 19 May 2007 06:20

Post by mwb1100 »

Console2 itself seems to use the COMSPEC variable to spawn a shell when it starts, so if console.exe is the COMSPEC you get a series of crashes as it tries to start itself over and over.

There's a basic command line capability in Console2, so it might be that UDCs could help here.

admin
Site Admin
Posts: 64886
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post by admin »

mwb1100 wrote:Console2 itself seems to use the COMSPEC variable to spawn a shell when it starts, so if console.exe is the COMSPEC you get a series of crashes as it tries to start itself over and over.

There's a basic command line capability in Console2, so it might be that UDCs could help here.
Yep, it should at least be able to read the startpath via command line. Today I'm going to add parameter-capability to the "Open" UDC. Then you would just create an UDC Open "Console2" <curpath> .

oli
Posts: 8
Joined: 07 Mar 2007 19:51
Location: Hamburg, Germany

Post by oli »

thanks for addition of "open" parameters. i updated to version 6.50.0008 yesterday but i can't get the command to work.

i added this line as open cmd:

"D:\Program Files\Console2\Console.exe" -d "<curpath>"

tried it w/ and wo/ quotes around curpath.

a simple
"echo" <curpath> > c:\temp\out.txt
doesn't work either.

admin
Site Admin
Posts: 64886
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post by admin »

oli wrote:thanks for addition of "open" parameters. i updated to version 6.50.0008 yesterday but i can't get the command to work.

i added this line as open cmd:

"D:\Program Files\Console2\Console.exe" -d "<curpath>"

tried it w/ and wo/ quotes around curpath.
And what happens?
oli wrote: a simple
"echo" <curpath> > c:\temp\out.txt
doesn't work either.
echo.exe is not an application.

Gandolf

Post by Gandolf »

Same here, I tried several different programs expecting them to run (open) in the current directory - nothing happens.

admin
Site Admin
Posts: 64886
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post by admin »

Gandolf wrote:Same here, I tried several different programs expecting them to run (open) in the current directory - nothing happens.
Yes, bug. Fix is coming...

Gandolf

Post by Gandolf »

And it's there - Thanks Donald.

admin
Site Admin
Posts: 64886
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post by admin »

Gandolf wrote:And it's there - Thanks Donald.
FYI, this Open-UDC:
"cmd" /k "cd <curpath>"
will open the DOS box at the current path. :)

"cmd" /k "cd <curpath>&&dir"
will open the DOS box at the current path, and show the directory listing. :) :)

Yep, "&&" is the command concatenator... did you know?

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Post by serendipity »

Wow!! thats a great tip. Please add that here:
http://www.xyplorer.com/xyfc/viewtopic.php?t=1898

oli
Posts: 8
Joined: 07 Mar 2007 19:51
Location: Hamburg, Germany

Post by oli »

yeah, thanks! it works now..

admin
Site Admin
Posts: 64886
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post by admin »

serendipity wrote:Wow!! thats a great tip. Please add that here:
http://www.xyplorer.com/xyfc/viewtopic.php?t=1898
But this is "How do you use it?". I don't use this trick, I just know it. :wink:

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: Configurable Command Prompt

Post by Stefan »

I searched but didn't find in XY-menu an command to open an DOS-Box with current folder as path ?!

I mean this is an must have feature. => Feature request, ==> maybe "File > Open DOS here" ?

-----
FYI, this Open-UDC:
"cmd" /k "cd <curpath>"
will open the DOS box at the current path.

This command above works now (2008, v7.80) with "Open with" action
I hope this is correct?

1.) User > Manage Commands
Action: Open With
[New]
Caption: Open DOS-Box here
Item: cmd
Mode: Single
[OK]

If you want to execute this tool with an shortcut:

2.) Tools > Costumize Shortcuts
Category: Open With
Commands: Open DOS-Box here
Shortcut: Click on [All Free Shortcuts...] an pick one you like,
then give 'Press new shortcut:' the focus and press this shortcut-keys (i use Ctrl+O)
[Assign]
[OK]

Post Reply