You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Make system commands run in interactive shell and allow executables in PATH to be ran without !
4
4
ip=get_ipython()
5
-
ip.run_line_magic('rehashx', '')# makes it so you don't need ! for executables in your PATH
6
-
ip.system=lambdacmd: ip.system_raw(f'bash -c {shlex.quote("shopt -s expand_aliases; source ~/.bashrc; "+cmd)}')# overwrites ! to run in an interactive shell
7
-
ip.getoutput=lambdacmd: subprocess.run(['bash', '-c', f'shopt -s expand_aliases; source ~/.bashrc; {cmd}'],# overwrites !! to run an interactive shell
0 commit comments