Command line

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

Re: Command line

Post by mike » Fri Nov 20, 2015 12:40 pm

darek, that sounds interesting.
However, it seems like the opposite situation - some keys are stolen from terminal itself.
For example, up/down arrows allows navigating thru history in Bash - it's not possible in such setup.

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

Re: Command line

Post by don » Sun Nov 22, 2015 1:30 am

If you want to move the cursor back to the file panels, you can press either:

* up/down arrow - keeps the content of the terminal
* esc - clears the bottom terminal
Wow. It is brilliant. I would love that - automatic transition between the terminal and the panels would be golden.

On the shell - when used within FIles context - I do not see the need to have a full capability of the shell. Files take over a fair chunk (the whole point is to make it easier than shell).

But going through the command history is important. I particularly like how Far Manager does this:
Screen Shot 2015-11-22 at 12.28.52 PM.png
Screen Shot 2015-11-22 at 12.28.52 PM.png (19.01 KiB) Viewed 12009 times
Once something get's typed it automatically brings up a window with the history. UP/DOWN allow you to scroll the history. If you continue typing, the list gets filtered down.

From my perspective it is one of the better implementations of the command history - use it all the time.

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

Re: Command line

Post by darek » Mon Nov 23, 2015 9:11 am

migun wrote:up/down arrows allows navigating thru history in Bash - it's not possible in such setup.
What if you gave up on having the command line in overlapped mode function like a real terminal? Then you'd be free to make it a Super Powerful Command Line (tm) doing stuff better than terminal does, like that quick history filtering Don mentioned, or proper copy/paste, or suggesting path and file names on the fly, like what Xcode does for function names, etc.

Maintaining real terminal behavior limits you to what terminal can do and stops you from innovating in this area.

Just a food for thought, since there are pros and cons for both approaches :)

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

Re: Command line

Post by don » Mon Nov 23, 2015 10:02 am

What if you gave up on having the command line in overlapped mode function like a real terminal?
Second this. Sound like a reasonable idea? If we still have the other terminal, there is no need for another one in here...

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

Re: Command line

Post by mike » Wed Nov 25, 2015 4:30 am

Guys,

That's a complex theme indeed.
Currently I see two ways to improve the level of terminal integration (history, paste etc) with corresponding Pros and Cons.
1) Fake terminal input line. Approach used by TC, FAR and partly MC. There're a lot of Cons here actually, starting with visual inconsistency, continuing with introducing even more internal states and ending on differences with default terminal behaviour (that's writing a new command line processor really).
2) Custom Bash build with control routines injected - so Files can manipulate it's history and current input directly. That may be more transparent that writing a fake command line but requires a lot of research at first.

Mike.

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

Re: Command line

Post by darek » Wed Nov 25, 2015 10:49 am

Mike, I think that the new command line processor route is something that would give you more power going forward, but, and that's a big but, I also think you have to pick your battles very carefully. At this point it might not be a good idea to switch direction radically. Just let the current approach marinate for a while and see what happens.

Having said that, what about this:
* auto focus on command line when user starts typing
* when in command line, ESC clears the command and returns focus to the panels

The extra benefit here would be (assuming autofocus triggers for some characters only) that we'll get the space key back! I missed it and CMD+Y is not fun ;)

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

Re: Command line

Post by don » Thu Dec 03, 2015 1:21 am

CMD+Y is not fun ;)
I have changed it to CMD+T, yet it still not fun ;)

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

Re: Command line

Post by don » Thu Dec 03, 2015 1:22 am

Also wanted to mention that the latest changes were quite significant - made a whole lot of a difference.
Using every feature daily. Great work!

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

Re: Command line

Post by mike » Thu Dec 03, 2015 2:53 am

Don, it's hard to imagine how significant the latest changes were to whole Files' codebase :D
Just joking, that's off topic anyway.

Locked