You are not logged in.
Pages: 1
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?
Offline
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
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
There is one file manager, that recognizes local paths as links and allows you to click them: terminology.
Offline
Clicking in the terminal? What?
Look at Vifm (no mouse, all keyboard)...
Offline
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
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
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
+1 on Midnight Commander. Plugging for the wiki page:
Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby
Offline
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!
Offline
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
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
Thank you all for the suggestions! I'll look into the various ways to do this
Offline
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 "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.
Offline
Pages: 1