Show More
@@ -54,8 +54,9 b' _ipython()' | |||
|
54 | 54 | _ipython_get_flags $mode |
|
55 | 55 | ;; |
|
56 | 56 | "history") |
|
57 |
if [[ |
|
|
58 | _ipython_get_flags "history trim" | |
|
57 | if [[ $COMP_CWORD -ge 2 ]]; then | |
|
58 | # 'history trim' and 'history clear' covered by next line | |
|
59 | _ipython_get_flags history\ "${COMP_WORDS[2]}" | |
|
59 | 60 | else |
|
60 | 61 | _ipython_get_flags $mode |
|
61 | 62 | |
@@ -71,13 +72,17 b' _ipython()' | |||
|
71 | 72 | return 0 |
|
72 | 73 | elif [[ $mode == "profile" ]]; then |
|
73 | 74 | opts="list create locate" |
|
75 | local IFS=$'\t\n' | |
|
74 | 76 | COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) |
|
75 | 77 | elif [[ $mode == "history" ]]; then |
|
76 |
if [[ |
|
|
77 | COMPREPLY="--" | |
|
78 | if [[ $COMP_CWORD -ge 3 ]]; then | |
|
79 | # drop into flags | |
|
80 | opts="--" | |
|
78 | 81 | else |
|
79 |
|
|
|
82 | opts="trim clear " | |
|
80 | 83 | fi |
|
84 | local IFS=$'\t\n' | |
|
85 | COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) | |
|
81 | 86 | elif [[ $mode == "locate" ]]; then |
|
82 | 87 | opts="profile" |
|
83 | 88 | COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) |
General Comments 0
You need to be logged in to leave comments.
Login now