You are not logged in.

#101 2010-03-24 23:01:49

eyolf
Member
From: Copenhagen
Registered: 2005-11-29
Posts: 339
Website

Re: Ranger, a textbased filemanager

I've used ranger persistently and more and more consistently for a week or so now, and I'm totally in love. Sure, there are some rough edges here and there, but the default behaviour is sane (i.e.: as expected), and the customiza-/extensibility is awesome and simple, even for a non-programmer.
Here are some ideas -- a wishlist if you wish:

1. A dual pane mode, in some way or another. It has been mentioned that the double-backtick navigation works surprisingly good, and it does, but sometimes one "looses" the desired most recent directory to a more recent, and some time one might want to get somewhere earlier in the stack. How about giving the screen estate of the left-most pane (which I don't think I've ever looked at) to a "breadcrumb" type of pane with the 20 latest locations or sth in that direction? Another alternative would be a one-folder display.
2. Command history. It's one of the things I actually miss from midnight commander.
3. Renaming. This is the one area where the behaviour of ranger is not what I would have expected: that ":rename <tab> would complete the line with the file under the cursor, and not the first file in the folder.

Take this as suggestions to improve what is already a remarkable (in the literal sense of the word) piece of software. I hope the string of updates will continue to be as impressive as it has been so far.

Offline

#102 2010-03-24 23:13:43

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

Thank you both.

eyolf:
1. I'll think about it. For now, let me recommend the H/L keys for moving through the history and the m/` keys for creating/entering bookmarks
2. There is a command history, press arrow up/down in the console. Or do you mean something else?
3. You might want to try the A key. But you made me wonder if the tab completion for the rename-command really makes sense as it works now

Last edited by hut (2010-03-24 23:15:41)


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#103 2010-03-25 02:10:02

GGLucas
Member
Registered: 2008-03-13
Posts: 113

Re: Ranger, a textbased filemanager

It might be prudent to abstract out the key/option parser and put it in a separate library. I know I'd love to work on a library like that, and it makes creating cli applications with configurable binds a lot easier.

Offline

#104 2010-03-25 07:23:06

eyolf
Member
From: Copenhagen
Registered: 2005-11-29
Posts: 339
Website

Re: Ranger, a textbased filemanager

hut wrote:

Thank you both.
1. I'll think about it. For now, let me recommend the H/L keys for moving through the history and the m/` keys for creating/entering bookmarks

I had missed the H/L keys. Neat. Maybe `` plus H/L makes the dual pane obsolete. I'm conditioned by 15 years of "<...> commander" use to think that I absolutely need that extra pane for efficient file managing, but perhaps that's not the case.

2. There is a command history, press arrow up/down in the console. Or do you mean something else?

Yes: a command history which is saved between sessions. Midnight Commander's M-h key. Sorry, I was unclear.

3. You might want to try the A key. But you made me wonder if the tab completion for the rename-command really makes sense as it works now

Thanks: A does what I was thinking of.

Offline

#105 2010-03-25 16:36:48

JohannesSM64
Member
From: Norway
Registered: 2009-10-11
Posts: 623
Website

Re: Ranger, a textbased filemanager

There should only be a file preview if file(1) returns *text*. Currently some binary files are previewed, causing funny characters to be printed, which can fubar the terminal.

Last edited by JohannesSM64 (2010-03-25 16:38:57)

Offline

#106 2010-03-25 16:41:43

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

Pressing Ctrl+L should repair the terminal. But yes, the algorithm to detect if a file should be previewed is rather primitive, I'll add that to my TODO list


For a quick fix: You get the output of "file -Lb --mime-type <name>" from the filetype-attribute of a file object.
So, you could for example add this line in ranger/gui/widgets/browsercolumn.py in the function _preview_this_file():

and target.filetype.startswith('text') \

(didn't test)

Last edited by hut (2010-03-25 17:37:15)


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#107 2010-03-26 09:25:18

erno
Member
Registered: 2009-08-24
Posts: 83

Re: Ranger, a textbased filemanager

If there's no obvious fix for the sshfs freeze issue, could you possibly make the process killabe? Also, can you speed up listing the contents of directories by using some temp files and comparing them (or something..)?

Offline

#108 2010-03-26 09:58:49

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Ranger, a textbased filemanager

erno wrote:

If there's no obvious fix for the sshfs freeze issue, could you possibly make the process killabe?

i you mean a hanging sshfs connection causes Ranger to stall, that's not Ranger's fault but a shortcoming in the current fuse implementation. try adding "ServerAliveInterval 15" to ssh_config, then connect sshfs with the "reconnect" parameter.


ᶘ ᵒᴥᵒᶅ

Offline

#109 2010-03-26 14:22:25

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

Yeah, I can reproduce the same issue with midnight commander, which beceomes unkillable as well until I kill the sshfs process\

About the speed up of directory listing: I'm working on it.


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#110 2010-03-27 22:58:16

eyolf
Member
From: Copenhagen
Registered: 2005-11-29
Posts: 339
Website

Re: Ranger, a textbased filemanager

As a follow-up to my previous post, it would be very nice if (1) the H/L keys' locations would also be preserved between sessions, (2) the list of previous directories could be displayed and navigated in, and (3) as I mentioned, the same two things for the command line history.

Offline

#111 2010-03-27 23:15:11

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

to 1:
I use bookmarks to save important directories. Is this not comfortable enough?

to 2:
I could turn the leftmost column into something like that, yeah. Let's see.

to 3:
Saving the command history is planned. But displaying the command history? I don't know. I wouldn't need such a feature.


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#112 2010-03-28 12:08:41

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Ranger, a textbased filemanager

hut wrote:

to 1:
I use bookmarks to save important directories. Is this not comfortable enough?

to 2:
I could turn the leftmost column into something like that, yeah. Let's see.

something like a bookmarks-popup? this would be really nice since it is sometimes hard to remember which bookmark points to which directory. or is there a command for that already?


ᶘ ᵒᴥᵒᶅ

Offline

#113 2010-03-28 12:11:42

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

litemotiv wrote:
hut wrote:

to 1:
I use bookmarks to save important directories. Is this not comfortable enough?

to 2:
I could turn the leftmost column into something like that, yeah. Let's see.

something like a bookmarks-popup? this would be really nice since it is sometimes hard to remember which bookmark points to which directory. or is there a command for that already?

If you press either `, ' or m, there is a bookmarks popup, isn't there? smile


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#114 2010-03-28 12:18:32

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Ranger, a textbased filemanager

hut wrote:

If you press either `, ' or m, there is a bookmarks popup, isn't there? smile

i don't understand how i didn't see that, i think i really need a vacation.. sad


ᶘ ᵒᴥᵒᶅ

Offline

#115 2010-03-28 12:21:08

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

litemotiv wrote:

i don't understand how i didn't see that, i think i really need a vacation.. sad

Time to add a border or something... ^^

JohannesSM64 wrote:

There should only be a file preview if file(1) returns *text*. Currently some binary files are previewed, causing funny characters to be printed, which can fubar the terminal.

I improved the detection of binary files now, and so far, I didn't see any binary file previewed.

Last edited by hut (2010-03-28 13:26:52)


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#116 2010-03-28 13:31:10

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Ranger, a textbased filemanager

hut wrote:
litemotiv wrote:

i don't understand how i didn't see that, i think i really need a vacation..(

Time to add a border or something... ^^

i think it might help if it occupies the entire left pane instead of overlaying the top part smile


ᶘ ᵒᴥᵒᶅ

Offline

#117 2010-03-28 13:35:18

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

litemotiv wrote:
hut wrote:
litemotiv wrote:

i don't understand how i didn't see that, i think i really need a vacation..(

Time to add a border or something... ^^

i think it might help if it occupies the entire left pane instead of overlaying the top part smile

upgrade to the newest version and see if you like the borders^^ I think its fine that way, changing the contents of the columns would be too messy


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#118 2010-03-28 13:46:05

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Ranger, a textbased filemanager

hut wrote:

upgrade to the newest version and see if you like the borders^^ I think its fine that way, changing the contents of the columns would be too messy

that looks more than adequate, thanks smile


ᶘ ᵒᴥᵒᶅ

Offline

#119 2010-03-28 14:51:35

GGLucas
Member
Registered: 2008-03-13
Posts: 113

Offline

#120 2010-03-28 16:12:05

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

Good work, thanks. I applied them and added some modifications:

Patch 1: This should have its own option
Patch 3: The option should have a different name since "case_insensitive" is ambiguous. I renamed it to "sort_case_insensitive". And yes I realize that there are other options, for example "reverse" which are just as ambiguous. I'm going to rename those aswell (without breaking compatibility)


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#121 2010-03-28 16:19:26

GGLucas
Member
Registered: 2008-03-13
Posts: 113

Re: Ranger, a textbased filemanager

diff --git a/ranger/fsobject/directory.py b/ranger/fsobject/directory.py
index ef9d04f..9848448 100644
--- a/ranger/fsobject/directory.py
+++ b/ranger/fsobject/directory.py
@@ -291,7 +291,7 @@ class Directory(FileSystemObject, Accumulator, SettingsAware):
         self.old_sort_directories_first = self.settings.sort_directories_first
         self.old_sort = self.settings.sort
         self.old_sort_reverse = self.settings.sort_reverse
-        self.old_case_insensitive = self.settings.sort_case_insensitive
+        self.old_sort_case_insensitive = self.settings.sort_case_insensitive
 
     def sort_if_outdated(self):
         """Sort the containing files if they are outdated"""
@@ -299,7 +299,7 @@ class Directory(FileSystemObject, Accumulator, SettingsAware):
                 self.settings.sort_directories_first \
                 or self.old_sort != self.settings.sort \
                 or self.old_sort_reverse != self.settings.sort_reverse \
-                or self.old_case_insensitive != \
+                or self.old_sort_case_insensitive != \
                 self.settings.sort_case_insensitive:
             self.sort()
             return True

Last edited by GGLucas (2022-06-24 08:02:41)

Offline

#122 2010-03-28 16:59:20

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

GGLucas wrote:

Except you forgot to rename the old_ attribute everywhere tongue

Ooops. Luckily it was nothing vital.

edit:

eyolf wrote:

a command history which is saved between sessions

has been implemented

Last edited by hut (2010-03-29 00:21:33)


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#123 2010-03-29 17:14:44

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

Hey guys. Is anyone using the cd-after-exit feature? The one that makes you change the directory after you exit ranger if you invoke ranger with source ranger ranger? Because I'm not happy with its implementation (its a rather ugly hack) and would like to remove it. There is another way to do the same though: (which happens to be less bug prone as well)

ranger && cd "$(grep \^\' ~/.ranger/bookmarks | cut -b3-)"

If you want to pass arguments, you can define a function:

ranger() {
    /usr/bin/ranger $@ && cd "$(grep \^\' ~/.ranger/bookmarks | cut -b3-)"
}

So, I want to warn you now that source ranger ranger will not work in future versions, unless you have any objections

Last edited by hut (2010-03-29 17:34:12)


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#124 2010-03-30 07:24:46

eyolf
Member
From: Copenhagen
Registered: 2005-11-29
Posts: 339
Website

Re: Ranger, a textbased filemanager

hut wrote:

to 1:
I use bookmarks to save important directories. Is this not comfortable enough?

to 2:
I could turn the leftmost column into something like that, yeah. Let's see.

to 3:
Saving the command history is planned. But displaying the command history? I don't know. I wouldn't need such a feature.

I don't in any of these cases mean a permanently displayed list, but a list that could be opened when needed, for searching and scrolling.
The bookmarks work remarkably well for the handful of directories I use every day, though.

Offline

#125 2010-03-30 14:35:15

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Ranger, a textbased filemanager

here's a thought; if you make Ranger a client-server model (with a daemon), would it be possible to run several instances and yank-paste from one instance to the other? smile

edit: oh wait, this already seems to work tongue

edit 2: oh no it doesn't, my mistake

Last edited by litemotiv (2010-03-30 14:40:22)


ᶘ ᵒᴥᵒᶅ

Offline

Board footer

Powered by FluxBB