diff --git a/IPython/Extensions/ipy_p4.py b/IPython/Extensions/ipy_p4.py index 2a5db53..448ce2a 100644 --- a/IPython/Extensions/ipy_p4.py +++ b/IPython/Extensions/ipy_p4.py @@ -22,6 +22,11 @@ def p4_f(self, parameter_s=''): return out +def p4d(fname): + return os.popen('p4 where ' + fname).read().split()[0] + +ip.to_user_ns("p4d") + ip.expose_magic('p4', p4_f) p4_commands = """\ diff --git a/IPython/UserConfig/ipy_profile_sh.py b/IPython/UserConfig/ipy_profile_sh.py index dd09d4e..de47ac6 100644 --- a/IPython/UserConfig/ipy_profile_sh.py +++ b/IPython/UserConfig/ipy_profile_sh.py @@ -38,10 +38,10 @@ def main(): ip.ex('import os') ip.ex("def up(): os.chdir('..')") - # Get pysh-like prompt for all profiles. + # Nice prompt - o.prompt_in1= '\C_LightBlue[\C_LightCyan\Y1\C_LightBlue]\C_Green|\#> ' - o.prompt_in2= '\C_Green|\C_LightGreen\D\C_Green> ' + o.prompt_in1= r'\C_LightBlue[\C_LightCyan\Y2\C_LightBlue]\C_Green|\#> ' + o.prompt_in2= r'\C_Green|\C_LightGreen\D\C_Green> ' o.prompt_out= '<\#> ' from IPython import Release