##// END OF EJS Templates
bash completion: proper history completion
Paul Ivanov -
Show More
@@ -50,8 +50,16 b' _ipython()'
50 50 _ipython_get_flags $mode
51 51 opts=$"${opts} ${baseopts}"
52 52 ;;
53 "locate" | "history" | "profile")
53 "locate" | "profile")
54 54 _ipython_get_flags $mode
55 ;;
56 "history")
57 if [[ "${COMP_WORDS[2]}" == "trim" ]]; then
58 _ipython_get_flags "history trim"
59 else
60 _ipython_get_flags $mode
61
62 fi
55 63 opts=$"${opts}"
56 64 ;;
57 65 *)
@@ -65,8 +73,11 b' _ipython()'
65 73 opts="list create locate"
66 74 COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
67 75 elif [[ $mode == "history" ]]; then
68 opts="trim"
69 COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
76 if [[ "${COMP_WORDS[2]}" == "trim" ]]; then
77 COMPREPLY="--"
78 else
79 COMPREPLY="trim "
80 fi
70 81 elif [[ $mode == "locate" ]]; then
71 82 opts="profile"
72 83 COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
General Comments 0
You need to be logged in to leave comments. Login now