Command line

Any wishes
don
Posts: 134
Joined: Sat Jul 18, 2015 11:03 am
Location: Sydney, AU

Command line

Post by don » Sat Jul 18, 2015 11:25 am

Just wanted to register my keen interest in the command line below the panes.

I understand that there is an easy shortcut to get to the terminal, yet, being a Far Manager power user, I think it is the synergy between the panes and the command line is what leads to the productivity gain over the plain shell.

The functional minimum for the command line :
  • Shortcut to copy the currently select item to the command line
  • Shortcut to copy current path to the command line
  • Browse history of the previously executed commands and either execute or to copy to the command line (with modifier)

User avatar
mike
Posts: 1060
Joined: Thu Jul 16, 2015 5:35 am
Location: Exeter, UK

Re: Command line

Post by mike » Sat Jul 18, 2015 11:44 am

don wrote:Just wanted to register my keen interest in the command line below the panes.

I understand that there is an easy shortcut to get to the terminal, yet, being a Far Manager power user, I think it is the synergy between the panes and the command line is what leads to the productivity gain over the plain shell.

The functional minimum for the command line :
  • Shortcut to copy the currently select item to the command line
  • Shortcut to copy current path to the command line
  • Browse history of the previously executed commands and either execute or to copy to the command line (with modifier)
don, let me ensure that this feature is under development right now - look at attached screenshot.
I'm trying to implement a level of integration used in Far manager under Windows, when terminal is basically placed under file panels and you can change their height to show more lines of terminal or hide them away.
There are many questions currently on how to route the keyboard input.
For instance, I don't see a way to simultaneously control file panels with, say, arrows and at the same time type something into command line below.
It seem that you have to focus overlapped terminal first, and then type into it.
Attachments
Screen Shot 2015-07-18 at 17.36.09.png
Screen Shot 2015-07-18 at 17.36.09.png (121.12 KiB) Viewed 14481 times

don
Posts: 134
Joined: Sat Jul 18, 2015 11:03 am
Location: Sydney, AU

Re: Command line

Post by don » Sun Jul 19, 2015 10:16 am

Ha. This is exactly what I am after. Thank you.

I can not advise on how to implement this thing, unfortunately. Just want to reiterate that this would be a killing feature!
So if there is a need to override the basic terminal functionality, I'd be OK with that. If the panels get all the input and the files manager would be the one to decide how to handle it. Something like - "Hey, this keyboard sequence is not a shortcut I know (arrows, etc) I'd better pass it onto the command line. Would this work?

User avatar
mike
Posts: 1060
Joined: Thu Jul 16, 2015 5:35 am
Location: Exeter, UK

Re: Command line

Post by mike » Sun Jul 19, 2015 5:22 pm

Well it seems to me that such "mixed" behaviour is simply not possible.
Consider keys like arrows and tab - they are used even in bash, not to mention more sophisticated software like mc. ( yep, you can run midnight commander beneath file panels :) )
And even worse - someone (like me) would prefer navigation through filenames using a "hard filtering" without any modifiers, simply typing some letters to show only matching filenames. In this case any keyboard input with letters is used for navigation in Files itself.
So it look like keyboard input should be routed to regular file panels processing OR into terminal emulator.

User avatar
darek
Posts: 179
Joined: Thu Jul 16, 2015 4:50 pm
Location: Warsaw, Poland
Contact:

Re: Command line

Post by darek » Mon Jul 20, 2015 12:47 pm

tc_quick_search.png
tc_quick_search.png (17.02 KiB) Viewed 14469 times
See this screenshot for how Total Commander does it. If you select "(CTRL+)ALT+letters" options, then if you start typing anything it will move the focus immediately into the command line. But if you select "Letters only" it will behave more less like what Files do now, it will find the first file with that name. BTW, "Letters with search dialog" changes this from quick jump to file mode into a filtering view, which shows only the files matching your pattern.

In TC, when you press SHIFT+RIGHT ARROW the focus goes into the command line field. Then pressing:

* SHIFT+UP/DOWN it will cycle through command history
* CTRL+ENTER pastes current file name into the command line field, SHIFT extends that with the full path
* LEFT/RIGHT moves cursor
* SHIFT+LEFT/RIGHT changes the text selection
* ESC moves the focus back to the file panes

Maybe this info will help when designing the UI for the feature :)

User avatar
mike
Posts: 1060
Joined: Thu Jul 16, 2015 5:35 am
Location: Exeter, UK

Re: Command line

Post by mike » Tue Jul 21, 2015 10:21 am

Darek, thanks for explaining TC's approaches to this problem.
The main issue here is that TC, basically, has just a TextField to write something here and sometime later to execute the whole string on a separate window. But with fair-shell approach your keyboard input is immediately passed to another process with a very limited feedback capability.

don
Posts: 134
Joined: Sat Jul 18, 2015 11:03 am
Location: Sydney, AU

Re: Command line

Post by don » Sat Jul 25, 2015 5:41 am

A shortcut to jump between the command line prompt and the panes would probably work for me.
Is it possible to implement?

Also, a bit different idea on how to approach it. What if we challenge the whole idea of the command line prompt below the panes being implemented as a proper shell? Is there a practical need for it to be such? What if it is implemented as a plain text field and only dressed up as a proper shell prompt. And only when the enter key is pressed the contents of the field are delivered to the proper shell for execution. If one needs to check the output in the proper shell there is always CMD-ALT-O shortcut.

What do you think?
Last edited by don on Sat Jul 25, 2015 12:57 pm, edited 1 time in total.

User avatar
darek
Posts: 179
Joined: Thu Jul 16, 2015 4:50 pm
Location: Warsaw, Poland
Contact:

Re: Command line

Post by darek » Sat Jul 25, 2015 6:29 am

This sounds perfectly reasonable for me. Total Commander does something like that, albeit in an even more primite way, and it worked fine for me. If you implement a full blown shell I guess there are a lot of expectations that go together with it, so you might eventually get lost trying to make it work perfectly. If you just make it a *different* text box, that feeds commands to the shell below, things might be simplified greatly.

Anyway, I'm just thinking out loud. But in short: I wouldn't mind that at all :)

User avatar
mike
Posts: 1060
Joined: Thu Jul 16, 2015 5:35 am
Location: Exeter, UK

Re: Command line

Post by mike » Tue Jul 28, 2015 5:59 am

Guys, I think I've found a way to bring some compromise between usability level of a textbox-command line and a "true" shell integration.
So currently Files does "pasting" focused item name and can execute entered commands with Enter hit in panels too.
Although, no regular letters routing for now.

don
Posts: 134
Joined: Sat Jul 18, 2015 11:03 am
Location: Sydney, AU

Re: Command line

Post by don » Sun Aug 09, 2015 10:40 am

G'day.

What do you mean by:
Although, no regular letters routing for now.
Can't wait till the next beta release. What's cooking?

Locked