mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
feat(zsh, ipython): New symblink scripts, IPython linked with directory
This commit is contained in:
parent
fdf460a547
commit
f69dc967e0
12 changed files with 75 additions and 37 deletions
11
tools/ipython/profile_default/startup/README
Normal file
11
tools/ipython/profile_default/startup/README
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
This is the IPython startup directory
|
||||
|
||||
.py and .ipy files in this directory will be run *prior* to any code or files specified
|
||||
via the exec_lines or exec_files configurables whenever you load this profile.
|
||||
|
||||
Files will be run in lexicographical order, so you can control the execution order of files
|
||||
with a prefix, e.g.::
|
||||
|
||||
00-first.py
|
||||
50-middle.py
|
||||
99-last.ipy
|
||||
11
tools/ipython/profile_default/starup/README
Normal file
11
tools/ipython/profile_default/starup/README
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
This is the IPython startup directory
|
||||
|
||||
.py and .ipy files in this directory will be run *prior* to any code or files specified
|
||||
via the exec_lines or exec_files configurables whenever you load this profile.
|
||||
|
||||
Files will be run in lexicographical order, so you can control the execution order of files
|
||||
with a prefix, e.g.::
|
||||
|
||||
00-first.py
|
||||
50-middle.py
|
||||
99-last.ipy
|
||||
|
|
@ -2,7 +2,7 @@ from IPython.core.magic import register_line_magic
|
|||
|
||||
@register_line_magic
|
||||
def ps(cmd):
|
||||
output = get_ipython().getoutput(f"powershell -Command {cmd}")
|
||||
output = get_ipython().getoutput(f"pwsh -NoProfile -Command {cmd}")
|
||||
# If no variable is assigned to the output, print it
|
||||
if get_ipython().last_execution_result is None:
|
||||
print("\n".join(output))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue