You are not logged in.

#1 2015-07-14 20:22:32

A Future Pilot
Member
Registered: 2008-10-17
Posts: 120

Terminal Emulator/File Manager?

So...I'm looking for a piece of software that may or may not exist...

Basically I love the terminal. I use the terminal 99% of the time, however there are a few things that are annoying about it: 1. Filenames with spaces and 2. Stupidly long filenames. So here's what I was thinking...is there a Terminal Emulator out there that would allow you to double click on a file or folder and open it in the default program? Also it would be awesome to allow clicking on a file or folder name (after running an ls command) to automatically insert that at the cursor position. (So for instance, you could type "dd if=" and then click on whatever the crazy long filename is, and it will auto-insert the full path with quotes if needed.)

Does anything like that exist? If not, why not? tongue

Offline

#2 2015-07-14 20:33:58

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Terminal Emulator/File Manager?

Ehmm.. are you aware of tab completion? It deals with both your annoyances very well.

Apart from that, I'm afraid I don't know of any term with those kind of features.

Offline

#3 2015-07-14 21:39:08

bleach
Member
Registered: 2013-07-26
Posts: 264

Re: Terminal Emulator/File Manager?

1.completion will show directories/files with spaces. spaces are created and shown with the \ before the space and is how you can create filenames with spaces.
2.as tomk said completion for instance lets say you are in home vim do"tab" will probably show both documents and downloads if you use vim dow it will just printout downloads on the line after vim. for files/directories with spaces ya that sucks you can use completion if it is the only one but if there are multible you need to imput the \ directly. for instance

vim it"tab" it\ the

vim the"tab"
the it/ the other/

if you are clicking on long files without spaces just double left click then shift insert or middle mouse click.

for me I will ussually just use the program and tab another instance mpv downloads/funny"tab" imputs maybe funny_video.mp4"enter". for me this is with urxvt and zsh.

I have heard terminology has some interesting things it can do.

Offline

#4 2015-07-14 21:45:39

Awebb
Member
Registered: 2010-05-06
Posts: 6,275

Re: Terminal Emulator/File Manager?

There is one file manager, that recognizes local paths as links and allows you to click them: terminology.

Offline

#5 2015-07-14 21:49:02

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Terminal Emulator/File Manager?

Clicking in the terminal? What? tongue

Look at Vifm (no mouse, all keyboard)...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#6 2015-07-15 05:14:14

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Terminal Emulator/File Manager?

This problem is best fixed with proper shell configuration, not a new terminal emulator. Zsh is probably the most famous shell with regard to completion features, though Fish has its own devoted cults for how easy its completions are. Of course, I'm sure plenty of people have whipped up Bash solutions, too.

Offline

#7 2015-07-15 05:48:16

ijanos
Member
From: Budapest, Hungary
Registered: 2008-03-30
Posts: 443

Re: Terminal Emulator/File Manager?

What you want is available in iTerm2 which is a Mac OS X only terminal emulator.

https://iterm2.com/documentation-one-page.html
(Look for semantic history)

Offline

#8 2015-07-15 10:25:34

severach
Member
Registered: 2015-05-23
Posts: 192

Re: Terminal Emulator/File Manager?

Asking for a terminal to do this is the wrong way. You're either asking for copy-paste which any terminal can do already in a variety of clumsy methods or for the terminal to understand the difference between a list of files and other cruft.

zsh has a simple file browser behind tab completion. Type a few characters, single tab to view, double tab to navigate. This is only practical with folders small enough to fit on the screen and it's not very efficient for inserting large numbers of files quickly and other large and complex file operations. zsh is so big that it is a challenge to set up. There are packages like grml to get you started.

What you want is Midnight Commander, AKA mc.

Move highlight to the file of interest.
Press Enter to launch
dd if=Alt-A to insert folder, Alt-Enter to insert file name

I can repeat this faster than once per second so doing something tricky with a dozen files may take only 15 seconds.

This works because Midnight Commander does understand what it's working with. It will properly insert and escape the filename even if it is too long for the screen to show.

What you've asked for can be done in mc with most any terminal emulation but Xterm New is required to expose full keyboard functionality. You get that with any Xterm but for remote access you'll need a terminal with Xterm New, and I'm the only one that has a PuTTY with Xterm New.

Offline

#9 2015-07-15 10:31:50

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,407
Website

Re: Terminal Emulator/File Manager?

+1 on Midnight Commander. Plugging for the wiki page:

https://wiki.archlinux.org/index.php/Midnight_Commander


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#10 2015-07-15 11:09:36

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: Terminal Emulator/File Manager?

A Future Pilot wrote:

is there a Terminal Emulator out there that would allow you to double click on a file or folder and open it in the default program?

It's not double clicking, but this is almost as easy and works in any terminal:

xdg-open thefilename.ext

The "xdg-open" command will open a file with the default application, just like it does when you double click it. It even works with folder names and URL string! smile

Offline

#11 2015-07-15 11:23:52

Awebb
Member
Registered: 2010-05-06
Posts: 6,275

Re: Terminal Emulator/File Manager?

The best part of xdg-open (and mimeo and rifle and whatever the perl-mimeinfo opener is called) is, that it does not block the terminal with a fork.

Offline

#12 2015-07-15 11:57:42

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,407
Website

Re: Terminal Emulator/File Manager?

Awebb wrote:

The best part of xdg-open (and mimeo and rifle and whatever the perl-mimeinfo opener is called) is, that it does not block the terminal with a fork.

xdg-open itself does block, the "helpers" it uses not necessarily (check the code, or by leaving only xdg-utils installed)


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#13 2015-07-18 00:10:43

A Future Pilot
Member
Registered: 2008-10-17
Posts: 120

Re: Terminal Emulator/File Manager?

Thank you all for the suggestions! I'll look into the various ways to do this smile

Offline

#14 2015-07-18 04:54:22

VagabondAzulien
Member
From: Buffalo, NY
Registered: 2014-06-14
Posts: 5
Website

Re: Terminal Emulator/File Manager?

There are a multitude of ways to modify the information which has been output by a program. Awk, Grep, Sort, even Bash itself can all modify information which has been presented not only inline, but in history. There are many shortcuts in Bash alone, such as "$!" to get the previous arguments; or "^$1^ $2" which will replace in the most recent command $1 with $2 (useful, for example, if you just cat'd a file and now you want to mv, cp, rm, vim, etc.. it; ^cat^ mv/cp/rm/vim/etc..).

As others have mentioned, tab-completion is your friend. (Should be...) Available in every shell there is.

In X, the middle mouse button is a paste-buffer, which will paste anything you've hilighted. If you've got a long filename, hilight -> middle click will copy-> paste it. Useful for copying to outside the shell; for inside shell just tab-completion.

You can pipe commands, essentially stringing them along to share information. Something like "ps aux | grep -v grep | grep program_name | sudo xargs kill -9" will find every program_name and kill it.

You can insert a space into tab completion by typing "\ " (back-slash space). So trying to complete "program name1" when you have 20 files with "program name" at the beginning can be done with pro<tab> (will get you program), "\ "<tab> (will get you program name).

Personally, I've found spaces to be nuisances in filenames and paths, so I remove them as much as possible.

Also, zsh, fish, and all the other guys are really cool, but don't be afraid to just bum it in Bash. It is actually quite a nice shell smile "man bash" will give you a ton of info on its capabilities. Same goes for man grep, man awk, man man even. Manuals are so useful. I love manuals. I've learned more about Linux from manuals than from any other source. Likewise for git, bash, awk, sed, and many more.

Finally, it's important to remember that anytime you're missing functionality that you'd like to have, you can create it yourself with an alias or function. In bash, throw them in your .bashrc file and you can reference them whenever you need.


[ Site ] | [ GitHub ] | [ Twitter ]

Offline

Board footer

Powered by FluxBB