Show More
@@ -117,6 +117,7 b' def main():' | |||||
117 | # and the next best thing to real 'ls -F' |
|
117 | # and the next best thing to real 'ls -F' | |
118 | ip.defalias('d','dir /w /og /on') |
|
118 | ip.defalias('d','dir /w /og /on') | |
119 |
|
119 | |||
|
120 | ip.set_hook('input_prefilter', dotslash_prefilter_f) | |||
120 | extend_shell_behavior(ip) |
|
121 | extend_shell_behavior(ip) | |
121 |
|
122 | |||
122 | class LastArgFinder: |
|
123 | class LastArgFinder: | |
@@ -138,9 +139,15 b' class LastArgFinder:' | |||||
138 | return parts[-1] |
|
139 | return parts[-1] | |
139 | return "" |
|
140 | return "" | |
140 |
|
141 | |||
|
142 | def dotslash_prefilter_f(self,line): | |||
|
143 | """ ./foo now runs foo as system command | |||
141 |
|
144 | |||
142 |
|
145 | Removes the need for doing !./foo | ||
143 |
|
146 | """ | ||
|
147 | import IPython.genutils | |||
|
148 | if line.startswith("./"): | |||
|
149 | return "_ip.system(" + IPython.genutils.make_quoted_expr(line)+")" | |||
|
150 | raise ipapi.TryNext | |||
144 |
|
151 | |||
145 | # XXX You do not need to understand the next function! |
|
152 | # XXX You do not need to understand the next function! | |
146 | # This should probably be moved out of profile |
|
153 | # This should probably be moved out of profile |
@@ -92,6 +92,15 b' def main():' | |||||
92 | # at your own risk! |
|
92 | # at your own risk! | |
93 | #import ipy_greedycompleter |
|
93 | #import ipy_greedycompleter | |
94 |
|
94 | |||
|
95 | # If you are on Linux, you may be annoyed by | |||
|
96 | # "Display all N possibilities? (y or n)" on tab completion, | |||
|
97 | # as well as the paging through "more". Uncomment the following | |||
|
98 | # lines to disable that behaviour | |||
|
99 | #import readline | |||
|
100 | #readline.parse_and_bind('set completion-query-items 1000') | |||
|
101 | #readline.parse_and_bind('set page-completions no') | |||
|
102 | ||||
|
103 | ||||
95 |
|
104 | |||
96 |
|
105 | |||
97 | # some config helper functions you can use |
|
106 | # some config helper functions you can use |
@@ -29,6 +29,7 b' New features' | |||||
29 | Development Team" as the copyright holder. We give more details about exactly |
|
29 | Development Team" as the copyright holder. We give more details about exactly | |
30 | what this means in this file. All developer should read this and use the new |
|
30 | what this means in this file. All developer should read this and use the new | |
31 | banner in all IPython source code files. |
|
31 | banner in all IPython source code files. | |
|
32 | * sh profile: ./foo runs foo as system command, no need to do !./foo anymore | |||
32 |
|
33 | |||
33 | Bug fixes |
|
34 | Bug fixes | |
34 | --------- |
|
35 | --------- |
General Comments 0
You need to be logged in to leave comments.
Login now