Show More
@@ -24,8 +24,8 b' _ipython()' | |||||
24 | { |
|
24 | { | |
25 | local cur=${COMP_WORDS[COMP_CWORD]} |
|
25 | local cur=${COMP_WORDS[COMP_CWORD]} | |
26 | local prev=${COMP_WORDS[COMP_CWORD - 1]} |
|
26 | local prev=${COMP_WORDS[COMP_CWORD - 1]} | |
27 | local subcommands="notebook qtconsole console kernel profile locate history nbconvert " |
|
27 | local subcommands="notebook qtconsole console kernel profile locate history nbconvert kernelspec " | |
28 | local opts="" |
|
28 | local opts="help" | |
29 | if [ -z "$__ipython_complete_baseopts" ]; then |
|
29 | if [ -z "$__ipython_complete_baseopts" ]; then | |
30 | _ipython_get_flags baseopts |
|
30 | _ipython_get_flags baseopts | |
31 | __ipython_complete_baseopts="${opts}" |
|
31 | __ipython_complete_baseopts="${opts}" | |
@@ -53,10 +53,10 b' _ipython()' | |||||
53 | "locate" | "profile") |
|
53 | "locate" | "profile") | |
54 | _ipython_get_flags $mode |
|
54 | _ipython_get_flags $mode | |
55 | ;; |
|
55 | ;; | |
56 | "history") |
|
56 | "history" | "kernelspec") | |
57 | if [[ $COMP_CWORD -ge 3 ]]; then |
|
57 | if [[ $COMP_CWORD -ge 3 ]]; then | |
58 | # 'history trim' and 'history clear' covered by next line |
|
58 | # 'history trim' and 'history clear' covered by next line | |
59 |
_ipython_get_flags |
|
59 | _ipython_get_flags $mode\ "${COMP_WORDS[2]}" | |
60 | else |
|
60 | else | |
61 | _ipython_get_flags $mode |
|
61 | _ipython_get_flags $mode | |
62 |
|
62 | |||
@@ -83,6 +83,15 b' _ipython()' | |||||
83 | fi |
|
83 | fi | |
84 | local IFS=$'\t\n' |
|
84 | local IFS=$'\t\n' | |
85 | COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) |
|
85 | COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) | |
|
86 | elif [[ $mode == "kernelspec" ]]; then | |||
|
87 | if [[ $COMP_CWORD -ge 3 ]]; then | |||
|
88 | # drop into flags | |||
|
89 | opts="--" | |||
|
90 | else | |||
|
91 | opts="list install " | |||
|
92 | fi | |||
|
93 | local IFS=$'\t\n' | |||
|
94 | COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) | |||
86 | elif [[ $mode == "locate" ]]; then |
|
95 | elif [[ $mode == "locate" ]]; then | |
87 | opts="profile" |
|
96 | opts="profile" | |
88 | COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) |
|
97 | COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) |
General Comments 0
You need to be logged in to leave comments.
Login now