Show More
@@ -13,9 +13,9 b' _ipython_get_flags()' | |||||
13 | opts=$__ipython_complete_last_res |
|
13 | opts=$__ipython_complete_last_res | |
14 | return |
|
14 | return | |
15 | fi |
|
15 | fi | |
16 |
# |
|
16 | # matplotlib and profile don't need the = and the | |
17 | # version without simplifies the special cased completion |
|
17 | # version without simplifies the special cased completion | |
18 |
opts=$(ipython ${url} --help-all | grep -E "^-{1,2}[^-]" | sed -e "s/<.*//" -e "s/[^=]$/& /" -e "s/^-- |
|
18 | opts=$(ipython ${url} --help-all | grep -E "^-{1,2}[^-]" | sed -e "s/<.*//" -e "s/[^=]$/& /" -e "s/^--matplotlib=$//" -e "s/^--profile=$/--profile /") | |
19 | __ipython_complete_last="$url $var" |
|
19 | __ipython_complete_last="$url $var" | |
20 | __ipython_complete_last_res="$opts" |
|
20 | __ipython_complete_last_res="$opts" | |
21 | } |
|
21 | } | |
@@ -86,12 +86,12 b' _ipython()' | |||||
86 | elif [[ $mode == "locate" ]]; then |
|
86 | elif [[ $mode == "locate" ]]; then | |
87 | opts="profile" |
|
87 | opts="profile" | |
88 | COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) |
|
88 | COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) | |
89 |
elif [[ ${prev} == "-- |
|
89 | elif [[ ${prev} == "--matplotlib"* ]] || [[ ${prev} == "--gui"* ]]; then | |
90 |
if [ -z "$__ipython_complete_ |
|
90 | if [ -z "$__ipython_complete_matplotlib" ]; then | |
91 |
__ipython_complete_ |
|
91 | __ipython_complete_matplotlib=`cat <<EOF | python - | |
92 | try: |
|
92 | try: | |
93 | import IPython.core.shellapp as mod; |
|
93 | import IPython.core.shellapp as mod; | |
94 |
for k in mod.InteractiveShellApp. |
|
94 | for k in mod.InteractiveShellApp.matplotlib.values: | |
95 | print "%s " % k |
|
95 | print "%s " % k | |
96 | except: |
|
96 | except: | |
97 | pass |
|
97 | pass | |
@@ -99,7 +99,7 b' EOF' | |||||
99 | ` |
|
99 | ` | |
100 | fi |
|
100 | fi | |
101 | local IFS=$'\t\n' |
|
101 | local IFS=$'\t\n' | |
102 |
COMPREPLY=( $(compgen -W "${__ipython_complete_ |
|
102 | COMPREPLY=( $(compgen -W "${__ipython_complete_matplotlib}" -- ${cur}) ) | |
103 | elif [[ ${prev} == "--profile"* ]]; then |
|
103 | elif [[ ${prev} == "--profile"* ]]; then | |
104 | if [ -z "$__ipython_complete_profiles" ]; then |
|
104 | if [ -z "$__ipython_complete_profiles" ]; then | |
105 | __ipython_complete_profiles=`cat <<EOF | python - |
|
105 | __ipython_complete_profiles=`cat <<EOF | python - |
@@ -13,12 +13,12 b' Categories=Development;Utility;' | |||||
13 | StartupNotify=false |
|
13 | StartupNotify=false | |
14 | Terminal=false |
|
14 | Terminal=false | |
15 | Type=Application |
|
15 | Type=Application | |
16 |
Actions= |
|
16 | Actions=Matplotlib;Matplotlibinline; | |
17 |
|
17 | |||
18 |
[Desktop Action |
|
18 | [Desktop Action Matplotlib] | |
19 | Name=Pylab |
|
19 | Name=Matplotlib | |
20 |
Exec=ipython qtconsole -- |
|
20 | Exec=ipython qtconsole --matplotlib | |
21 |
|
21 | |||
22 |
[Desktop Action |
|
22 | [Desktop Action Matplotlibinline] | |
23 |
Name= |
|
23 | Name=Matplotlib (inline plots) | |
24 |
Exec=ipython qtconsole -- |
|
24 | Exec=ipython qtconsole --matplotlib=inline |
General Comments 0
You need to be logged in to leave comments.
Login now