You are not logged in.
Is it possible to access aliases,functions,and exported variables from bash defined in .bashrc
in :shell ranger??
I am getting not found errors with custom commands and cant find the rule how it works
what is the chain of loading bash startup files when i start for example
:shell -w "my_command_form_bashrc"
Offline
Is it possible to access aliases,functions,and exported variables from bash defined in .bashrc
in :shell ranger??
I am getting not found errors with custom commands and cant find the rule how it works
what is the chain of loading bash startup files when i start for example
:shell -w "my_command_form_bashrc"
Offline
Is it possible to access aliases,functions,and exported variables from bash defined in .bashrc
in :shell ranger??
I am getting not found errors with custom commands and cant find the rule how it works
what is the chain of loading bash startup files when i start for example
:shell -w "my_command_form_bashrc"
Offline
Hi niksfirefly
Its not possible. But you can hack ranger/defaults/commands.py and replace the last line in shell.execute()
self.fm.execute_command(command, flags=flags)
with
self.fm.execute_command("bash -c 'source ~/.bashrc;" + command + "'", flags=flags)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Hut, is it possible you integrate it directly in the next version ?
Offline
Is it possible to make ranger do the following:
I have some directories which contain files named like this
1.jpg
2.jpg
...
9.jpg
10.jpg
...
99.jpg
100.jpg
...
Ranger shows them like this
1.jpg
10.jpg
100.jpg
2.jpg
...
9.jpg
99.jpg
...
Is it possible to make ranger show them in the right order?
Offline
Is it possible to make ranger do the following:
I have some directories which contain files named like this
1.jpg 2.jpg ... 9.jpg 10.jpg ... 99.jpg 100.jpg ...
Ranger shows them like this
1.jpg 10.jpg 100.jpg 2.jpg ... 9.jpg 99.jpg ...
Is it possible to make ranger show them in the right order?
Yeah, to turn on that feature, type "on"
Edit: It's slightly slower than the default sorting method but i'm considering to change this to the default method
Last edited by hut (2011-02-24 16:52:42)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Can I make this permanent? In options.py I only see sort='basename', which - according to 14? - belongs to both 'on' and 'ob'.
One other question, which might have already been answered here, but it's really a LONG thread What do I have to do to make pdf files have another color than text files?
Offline
Hi niksfirefly
Its not possible. But you can hack ranger/defaults/commands.py and replace the last line in shell.execute()self.fm.execute_command(command, flags=flags)
with
self.fm.execute_command("bash -c 'source ~/.bashrc;" + command + "'", flags=flags)
thx hut
ill try that hack
is there any shortcut to see previous shell output
i can do simply
:shell -w pause
but maybe i miss your default solution
regards
Offline
I have a suggestion:
With the option "mouse_enabled = False" in options.py there's no need to leave a blank space on the right side of files, because clicking into that area doesn't do anything. Hut, can you make ranger use this space for the file names if this option is set?
Offline
Hi niksfirefly
Its not possible. But you can hack ranger/defaults/commands.py and replace the last line in shell.execute()self.fm.execute_command(command, flags=flags)
with
self.fm.execute_command("bash -c 'source ~/.bashrc;" + command + "'", flags=flags)
well this hack not works
i found out that
no aliases set
only sys ENV variables working inside :shell
maybe python script cannot access ?
somebody with great python and bash knowledge may find solution
Offline
Hut, is it possible you integrate it directly in the next version ?
Not sure... It's very dependent on the users system.
Can I make this permanent? In options.py I only see sort='basename', which - according to 14? - belongs to both 'on' and 'ob'.
the documentation is wrong in this case...
sort = 'natural'
One other question, which might have already been answered here, but it's really a LONG thread What do I have to do to make pdf files have another color than text files?
That's non-trivial. I know it should be, sorry^^.
Lets see If I can modify the colorscheme engine to make this easier.
I have a suggestion:
With the option "mouse_enabled = False" in options.py there's no need to leave a blank space on the right side of files, because clicking into that area doesn't do anything. Hut, can you make ranger use this space for the file names if this option is set?
There's an option for that already, padding_right
is there any shortcut to see previous shell output
i can do simply
:shell -w pausebut maybe i miss your default solution
regards
I use the S key to open a shell and show the previous output, then ctrl+d to close the shell again
hut wrote:Hi niksfirefly
Its not possible. But you can hack ranger/defaults/commands.py and replace the last line in shell.execute()self.fm.execute_command(command, flags=flags)
with
self.fm.execute_command("bash -c 'source ~/.bashrc;" + command + "'", flags=flags)
well this hack not works
i found out that
no aliases set
only sys ENV variables working inside :shellmaybe python script cannot access ?
somebody with great python and bash knowledge may find solution
Maybe there's an option for bash that runs commands *and* loads .bashrc + other config files, but I don't see it.
Which file defines your aliases? Add source <yourfile>; to the command above. (unless it's ~/.bashrc... then I don't know)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Maybe there's an option for bash that runs commands *and* loads .bashrc + other config files, but I don't see it.
Which file defines your aliases? Add source <yourfile>; to the command above. (unless it's ~/.bashrc... then I don't know)
hmm I sourced many files (also from .bashrc which by default run with bash)
alias -p always is empty
only CAPITALIZED variables like PATH,HOME etc. get through
i think i give up with that
What i really miss from mc is active bash shell in bottom synchronized when i traverse dirs
Do you consider such solution or sth else for RANGER?
I use tmux so i think about opening bottom pane but have no clue how to sync with actual view from ranger
ranger + tmux is incredible duo-beast
thx for ur very good work
Last edited by niksfirefly (2011-02-25 17:29:26)
Offline
Thanks hut! It's working, I didn't see that padding option.
Offline
I think the Python 3.2 rebuild breaks something. Ranger launches console applications like the editor or aunpack, but it fails to run mplayer and other external apps.
Something like:
Failed to run: ('mplayer', '/path/to/video.mkv'
Tested with and without a custom apps.py, and both the git and community versions. Switching to python2 is a temporary fix.
Offline
jep, fails also here. I'm not able to open any files. Even when I try to open it with "r" it's not possible.
Offline
A traceback would help: ranger --debug
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
A traceback would help: ranger --debug
Sorry, I actually tried that before posting, but it doesn't output anything when running that command from the console. Is there another way?
Edit:
For clarity: Ranger doesn't crash, it works perfectly. It just doesn't launch external applications other than ones that subsume Ranger's terminal.
Last edited by Ledti (2011-02-26 13:42:09)
Offline
Yep.
~/> ranger --debug
Traceback (most recent call last):
File "/usr/bin/ranger", line 50, in <module>
import ranger
ImportError: No module named ranger
edit: nvm, I had to reinstall...
Last edited by archman-cro (2011-02-26 13:25:11)
Offline
Okay, I'm busy for the next few days, please use python2 for the time being.
alias ranger='python2 /usr/bin/ranger'
If any of you attempts to fix it: The error occurs at ranger/core/runner.py line 194. Possibly something related to "[Errno 9] Bad file descriptor"
hut wrote:A traceback would help: ranger --debug
Sorry, I actually tried that before posting, but it doesn't output anything when running that command from the console. Is there another way?
Edit:
For clarity: Ranger doesn't crash, it works perfectly. It just doesn't launch external applications other than ones that subsume Ranger's terminal.
Turns out that the debug code isn't working properly. :D
For clarity: --debug is supposed to turn a simple error message into a crash + print the traceback
Last edited by hut (2011-02-26 13:49:53)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Okay, I'm busy for the next few days, please use python2 for the time being.
alias ranger='python2 /usr/bin/ranger'If any of you attempts to fix it: The error occurs at ranger/core/runner.py line 194. Possibly something related to "[Errno 9] Bad file descriptor"
Ledti wrote:hut wrote:A traceback would help: ranger --debug
Sorry, I actually tried that before posting, but it doesn't output anything when running that command from the console. Is there another way?
Edit:
For clarity: Ranger doesn't crash, it works perfectly. It just doesn't launch external applications other than ones that subsume Ranger's terminal.
Turns out that the debug code isn't working properly.
For clarity: --debug is supposed to turn a simple error message into a crash + print the traceback
haha, alright. That makes sense. I was confused there for a bit.
Offline
I get the same issue with mplayer and when trying to run `python2 /usr/bin/ranger` I get the following:
brian@brian-desktop:~$ python2 /usr/bin/ranger
Traceback (most recent call last):
File "/usr/bin/ranger", line 50, in <module>
import ranger
ImportError: No module named ranger
Offline
Another way to switch back to python2 is to edit the PKGBUILD, simply replace all "python" with "python2", e.g.
sed 's/python/python2/g' -i PKGBUILD
That way it definitely works (that's how I build and use ranger)
Offline
Army, thank you!
Offline