summary refs log tree commit diff stats
path: root/compiler/nimconf.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-04-16 09:11:24 +0200
committerAraq <rumpf_a@web.de>2011-04-16 09:11:24 +0200
commite487c0a2491fcc144cb47b54597a320e2bf79866 (patch)
treeba6c6789ca82eb69873005a88d18630cffcff2f7 /compiler/nimconf.nim
parentcd292568d775d55d9abb51e962882ecda12c03a9 (diff)
downloadNim-e487c0a2491fcc144cb47b54597a320e2bf79866.tar.gz
better error message for invalid module names
Diffstat (limited to 'compiler/nimconf.nim')
0 files changed, 0 insertions, 0 deletions
python files' href='/akspecs/ranger/commit/examples/plugin_chmod_keybindings.py?h=v1.6.1&id=d1a1173ddc315f21a3d468f43ac55aa43d31883d'>d1a1173d ^
972da7ba ^
d1a1173d ^

33aeef8e ^
d1a1173d ^


972da7ba ^
ca1a5d21 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

                              



                                                                            

                                    
 
                  
                     
 

                                                         
                                    


                                                               
 
                                
# Compatible with ranger 1.6.*
#
# This plugin serves as an example for adding key bindings through a plugin.
# It could replace the ten lines in the rc.conf that create the key bindings
# for the "chmod" command.

import ranger.api
old_hook_init = ranger.api.hook_init

def hook_init(fm):
    old_hook_init(fm)

    # Generate key bindings for the chmod command
    command = "map {0}{1}{2} shell -d chmod {1}{0}{2} %s"
    for mode in list('ugoa') + ['']:
        for perm in "rwxXst":
            fm.execute_console(command.format('-', mode, perm))
            fm.execute_console(command.format('+', mode, perm))

ranger.api.hook_init = hook_init