TheJare / jm

A simple, cross-platform terminal-based file manager written in Go
Apache License 2.0
4 stars 1 forks source link

Feature request: View text files / source code files #2

Open carlca opened 6 years ago

carlca commented 6 years ago

Hello. This is a really useful utility, thanks for writing it! Is there any means of viewing the contents of a text file/shell script/source code file, basically any reasonably simply encoded text file. If not can I put it forward as a feature request! Thanks.

TheJare commented 6 years ago

Yeah that goes towards the overall feature of "launching" files according to their type, which is something that makes sense for a tool like this. I didn't do it because my primary goal (besides practicing Go) was moving/copying. I can't say I have plans to work on this tool any further, but this would be one of the main new features if I did.

carlca commented 6 years ago

Don’t worry Javier! If you do decide to work on it, then great. If not, it’s still a really nice useful tool. Maybe I’ll have a look at the source code myself, and see if I can come up with A PR!

Cheers, Carl

On 6 Mar 2018, 08:02 +0000, Javier Arevalo notifications@github.com, wrote:

Yeah that goes towards the overall feature of "launching" files according to their type, which is something that makes sense for a tool like this. I didn't do it because my primary goal (besides practicing Go) was moving/copying. I can't say I have plans to work on this tool any further, but this would be one of the main new features if I did. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

carlca commented 6 years ago

Actually Javier, there is one feature that I could really do with urgently, and I suspect it would be much easier for you to do, since I haven't really studied the code. That feature would simply be for jm to change the terminals PWD to whatever was selected within jm when it is exited. Thus jm could become a really useful folder changer. I see from looking at the code, you have variables whose name contain the string cwd which I assume stands for current working directory, but it's late and I can't get my head around the code at the moment. Is there any chance you could give me a bit of a clue how to achieve my aim? Thanks.

TheJare commented 6 years ago

I don't think this is generally possible. The shell and jm are separate processes, and you can't change the cwd of another process. My systems programming is rusty and maybe this particular bit has changed in some way.

What I do often is to use ":" to drop down to a shell in the directory I am in jm, but that's a child shell, not the original you launched jm from.