summary refs log tree commit diff stats
path: root/compiler/btrees.nim
Commit message (Collapse)AuthorAgeFilesLines
* added btrees.containsAndreas Rumpf2018-06-031-3/+14
|
* support iteration over BTrees for the compilation cacheAndreas Rumpf2018-06-031-0/+36
|
* refactoring: move DB model to incremental.nimAndreas Rumpf2018-05-301-0/+186
> 2017-01-21 22:30:59 +0100 Python 3 division: Import `division` from `__future__`' href='/akspecs/ranger/commit/examples/plugin_chmod_keybindings.py?h=v1.9.3&id=9f5eeff72146d3c5178d66b4879af7a6abfc22f1'>9f5eeff7 ^
e52629c1 ^
ca1a5d21 ^
b3d031a9 ^


972da7ba ^
ab41c776 ^
ca1a5d21 ^
b3d031a9 ^
972da7ba ^
d1a1173d ^

33aeef8e ^
d1a1173d ^


972da7ba ^
b3d031a9 ^
ca1a5d21 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
                                                   
 



                                                                            
                                                                  
 
                 


                                    
 
 
                  
                     
 

                                                         
                                    


                                                               
 
 
                                
# Compatible with ranger 1.6.0 through ranger 1.7.*
#
# 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.

from __future__ import (absolute_import, division, print_function)

import ranger.api


HOOK_INIT_OLD = ranger.api.hook_init


def hook_init(fm):
    HOOK_INIT_OLD(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