You are not logged in.
Probably an ignorant question, but… how do I get ranger to simply execute a binary? Currently all I get is the following printed on the terminal:
No applications found for mimetype: application/x-executable
:open_with self
Unless you mean "how do I make it default". Then I imagine you will run it with "sh -c", I imagine. "exec"'s probably better, but I still dunno. Just stick with ":open_with self", and you can make it a shortcut if you want.
Last edited by Veedrac (2011-12-07 20:09:54)
Offline
Just stick with ":open_with self", and you can make it a shortcut if you want.
Will do. Thanks!
Offline
Something strange but...
I've noticed that highlight has not always returns zero PIPESTATUS although it isn't an error sometimes. The same is with pdftotext. Sometimes a return value is 141. Does someone knows why is it happens and how to resolve this? This affects a preview.
P.S.I surmise this is because of head -n $maxln. head just reads $maxln form pipe and then the writer got SIGPIPE. So, maybe should this case be taken into account for success function? My skills in shell-scripting are about zero so I have had no success to resolve this.
What does that means: object of type 'type' has no len() ?
P.P.S. Further investigation result in a guess that the reason for "object of type 'type' has no len()" error is python-chardet package and how ranger uses it. Just guess.
P.P.P.S. For a while have fixed success func in scope.sh for SIGPIPE thing. At least it works.
Last edited by sarbash (2011-12-09 08:56:54)
Offline
Something strange but...
I've noticed that highlight has not always returns zero PIPESTATUS although it isn't an error sometimes. The same is with pdftotext. Sometimes a return value is 141. Does someone knows why is it happens and how to resolve this? This affects a preview.P.S.I surmise this is because of head -n $maxln. head just reads $maxln form pipe and then the writer got SIGPIPE. So, maybe should this case be taken into account for success function? My skills in shell-scripting are about zero so I have had no success to resolve this.
What does that means: object of type 'type' has no len() ?
run ranger --debug for more information on such errors.
P.P.P.S. For a while have fixed success func in scope.sh for SIGPIPE thing. At least it works.
Can you post your fix?
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Can you post your fix?
Sure. It's simple as that:
scope.sh
function success { test ${PIPESTATUS[0]} = 0 -o ${PIPESTATUS[0]} = 141; }
Here, 141=128+13 means SIGPIPE. I suppose that the cause of SIGPIPE is head -n. Not sure about consequences of this at least it works for now.
Yes, I'll try to run in debug mode, thanks for the advice.
P.S. Yes! chardet is killer, my assumptions were absolutly right! I can't place traceback here for a while (this is a work machine with MS WinXP on board), if it is worthy of it I'll place traceback here later. Now only one conclusion - the bug arises on non-ascii (my case is cyrillic-content) files. My tests showed that in console all of them are converted and showed right. Is that related to scope.sh? Just another guess.
Last edited by sarbash (2011-12-09 17:19:24)
Offline
So, traceback is here.
[21:03:34 sergey@serenity ranger]$ ranger --debug
ranger version: 1.5.2, executed with python 3.2.2
Locale: ru_RU.UTF-8
Current file: /home/sergey/2011-декабрь-тимофей_сарбаш.pdf
Traceback (most recent call last):
File "/usr/lib/python3.2/site-packages/ranger/core/loader.py", line 146, in safeDecode
return string.decode("utf-8")
UnicodeDecodeError: 'utf8' codec can't decode byte 0xd1 in position 511: unexpected end of data
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.2/site-packages/ranger/core/main.py", line 103, in main
fm.loop()
File "/usr/lib/python3.2/site-packages/ranger/core/fm.py", line 181, in loop
loader.work()
File "/usr/lib/python3.2/site-packages/ranger/core/loader.py", line 248, in work
self.fm.notify(err)
File "/usr/lib/python3.2/site-packages/ranger/core/loader.py", line 243, in work
next(item.load_generator)
File "/usr/lib/python3.2/site-packages/ranger/core/loader.py", line 101, in generate
read = safeDecode(read)
File "/usr/lib/python3.2/site-packages/ranger/core/loader.py", line 149, in safeDecode
return string.decode(chardet.detect(str)["encoding"])
File "/usr/lib/python3.2/site-packages/chardet/__init__.py", line 24, in detect
u.feed(aBuf)
File "/usr/lib/python3.2/site-packages/chardet/universaldetector.py", line 65, in feed
aLen = len(aBuf)
TypeError: object of type 'type' has no len()
ranger crashed. Please report this traceback at:
http://savannah.nongnu.org/bugs/?group=ranger&func=additem
The mess is about charsets.
Offline
So, traceback is here.
[21:03:34 sergey@serenity ranger]$ ranger --debug ranger version: 1.5.2, executed with python 3.2.2 Locale: ru_RU.UTF-8 Current file: /home/sergey/2011-декабрь-тимофей_сарбаш.pdf Traceback (most recent call last): File "/usr/lib/python3.2/site-packages/ranger/core/loader.py", line 146, in safeDecode return string.decode("utf-8") UnicodeDecodeError: 'utf8' codec can't decode byte 0xd1 in position 511: unexpected end of data During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3.2/site-packages/ranger/core/main.py", line 103, in main fm.loop() File "/usr/lib/python3.2/site-packages/ranger/core/fm.py", line 181, in loop loader.work() File "/usr/lib/python3.2/site-packages/ranger/core/loader.py", line 248, in work self.fm.notify(err) File "/usr/lib/python3.2/site-packages/ranger/core/loader.py", line 243, in work next(item.load_generator) File "/usr/lib/python3.2/site-packages/ranger/core/loader.py", line 101, in generate read = safeDecode(read) File "/usr/lib/python3.2/site-packages/ranger/core/loader.py", line 149, in safeDecode return string.decode(chardet.detect(str)["encoding"]) File "/usr/lib/python3.2/site-packages/chardet/__init__.py", line 24, in detect u.feed(aBuf) File "/usr/lib/python3.2/site-packages/chardet/universaldetector.py", line 65, in feed aLen = len(aBuf) TypeError: object of type 'type' has no len() ranger crashed. Please report this traceback at: http://savannah.nongnu.org/bugs/?group=ranger&func=additem
The mess is about charsets.
Oh. Looks like a typo in the code, should be fixed now.
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Assume should I use ranger-git from AUR? Now, I use ranger package from community repo.
Last edited by sarbash (2011-12-10 07:40:29)
Offline
Assume should I use ranger-git from AUR? Now, I use ranger package from community repo.
Yes. The "ranger" package will be updated after some testing.
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Thank you.
len() is fixed. But decoding error is still persist. I guess, decoding from utf8 to utf8 may be the reason.
[22:57:45 sergey@serenity ranger]$ ranger --debug
ranger version: 1.5.2, executed with python 3.2.2
Locale: ru_RU.UTF-8
Current file: /home/sergey/2011-декабрь-тимофей_сарбаш.pdf
Traceback (most recent call last):
File "/usr/lib/python3.2/site-packages/ranger/core/loader.py", line 146, in safeDecode
return string.decode("utf-8")
UnicodeDecodeError: 'utf8' codec can't decode byte 0xd1 in position 511: unexpected end of data
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.2/site-packages/ranger/core/main.py", line 110, in main
fm.loop()
File "/usr/lib/python3.2/site-packages/ranger/core/fm.py", line 184, in loop
loader.work()
File "/usr/lib/python3.2/site-packages/ranger/core/loader.py", line 248, in work
self.fm.notify(err)
File "/usr/lib/python3.2/site-packages/ranger/core/loader.py", line 243, in work
next(item.load_generator)
File "/usr/lib/python3.2/site-packages/ranger/core/loader.py", line 101, in generate
read = safeDecode(read)
File "/usr/lib/python3.2/site-packages/ranger/core/loader.py", line 149, in safeDecode
return string.decode(chardet.detect(string)["encoding"])
UnicodeDecodeError: 'utf8' codec can't decode byte 0xd1 in position 511: unexpected end of data
ranger crashed. Please report this traceback at:
http://savannah.nongnu.org/bugs/?group=ranger&func=additem
Offline
Not sure about correctness, but...
loader.py
144 def safeDecode(string):
145 try:
146 return string.decode("utf-8")
147 except (UnicodeDecodeError):
148 if HAVE_CHARDET:
149 try:
150 return string.decode(chardet.detect(string)["encoding"])
151 except (TypeError, UnicodeDecodeError):
152 return string.decode(sys.getdefaultencoding(), "ignore")
153 else:
154 return string.decode(sys.getdefaultencoding(), "ignore")
Now I've got all that preview things working.
Last edited by sarbash (2011-12-10 20:09:56)
Offline
Finally, my hacked scope.sh:
Offline
Happy New Year to everybody!
Is there an easy way to see a summary on cumulative sizes of the selected directories & files?
Thanks in advance.
Last edited by sarbash (2012-01-04 05:26:09)
Offline
Happy New Year to everybody!
Is there an easy way to see a summary on cumulative sizes of the selected directories & files?
Thanks in advance.
Not sure what you mean, but maybe you're looking for the key combination "dc"
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
I mean the summary.
"dc" is just great but lacks some functionality. Let me explain.
There is some directory there. It has a couple of subdirs and files. I select some of them and call "dc". Now I can see the size of each marked item. What I want is to see the total amount of the sizes of selected items. For example, it may be in the status line where are indicated the marked items.
Another solution is to move desired items into temp dir and get it's size but I think it should be possible without such tricks.
Any advice?
Last edited by sarbash (2012-01-04 16:22:55)
Offline
In the newest ranger, directory sizes are now added to the sum of sizes of marked files in the statusbar, once the directories sizes have been calculated with "dc".
Note that selections are limited to one directory so you can't copy from multiple places at the same time :S
Last edited by hut (2012-01-04 21:28:47)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Thanks a lot! That's great! That is exactly what has had been expected.
Offline
Anyone managed to get aunpack working for extraction once the archive file is chosen?
Offline
Anyone managed to get aunpack working for extraction once the archive file is chosen?
Mode 1. Type "1l" instead of just "l"
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
After a hardware-enforced exile in Windows, I'm back to Arch again, and man is it great to be here again.
And ranger... just getting better.
One functionality that I've been waiting for (ever since i requested it...) is still missing, however: a Branch view, something like the output of
find .
, only as a file list just like any other, that can be sorted by name, size, date, etc.
Hut said, back when I requested it, that it would be relatively easy to implement, so I figured perhaps a small reminder is all it will take to bring it out of the TODO list....
Offline
Is there any way to toggle or configure or hack:
1) "user@host:" in the title bar off
2) the summary information on the right of the status bar off (... sum, ... free x/y Top)
3) more information into the main column in addition to size/count, such as any combo of type, permissions, links, user, group, inode, dates, times, ...
there is a lot of room here to provide some really useful information about the displayed files and directories - I really miss this info
then make what is shown in the left side of the status bar for the current file/directory configurable as well, probably a subset of what is not shown in the main column
4) I can toggle column 3 via zP and/or zp, additionally I want to toggle column 1 (all parent directories)
Offline
Wow. Just wow! I just tried ranger, and it's awesome! I mainly love the preview of dirs and other things.
I have one feature request...
Can you make any preview scripts (e.g. highlight) be killed if the cursor moves off their item? Right now, if I hold j, and go over lots of CPU-intensive previewing files (like jpgs or huge sql files), the CPU will continue to be eaten up, even though I'm not on them currently. If that's possible, that is...
Thanks!
Offline
Hello, thanks for this software.
I have a problem with bulkrename.
It’s like
self.fm.execute_file([File(listfile.name)], app='editor')
doen’t block the execution of the rest of the script.
Then i am "No renaming to be done!" all the time.
ok, i understood what was wrong, gedit (my default editor) was already launched.
Then The next "launch" was done in the background. (and then doen’t block).
Last edited by dionisos (2012-01-28 17:02:42)
Offline
thinking out loud... file previous being limited to text/curses is pretty frustrating. esp. for images and video. In theory it should be perfectly possible to port ranger to something like Gtk. the interface would look the same, all features (keybinds, python configuration etc) would be identical (or at least very similar as keybinding in X is a bit different).
Question is: how tightly coupled is ranger to ncurses? Is the UI abstracted or tightly interweaved?
< Daenyth> and he works prolifically
4 8 15 16 23 42
Offline
I have 3 questions:
1) How can I make the 'filter' function case insensitive?
2) Is there a way to make the filter update the result real-time as you type?
3) Is there a command to clear the filter?
My thanks in advance.
Offline