You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2018/10/20 23:53:58 UTC

[cloudstack-cloudmonkey] branch master updated (992fce0 -> c948d69)

This is an automated email from the ASF dual-hosted git repository.

rohit pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack-cloudmonkey.git.


    from 992fce0  cmk: switch to go mod
     new a96aad8  vendor: update dependencies
     new dbf748f  cmk: disable search bar by default on tab-tab completion
     new f0c7b95  Makefile: use -mod=vendor to build using vendor
     new c948d69  cmk: rewrite CLI using go-prompt

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 Makefile                                           |   16 +-
 cli/completer.go                                   |  321 +--
 cli/exec.go                                        |   24 +-
 cmk.go => cli/history.go                           |   22 +-
 cli/selector.go                                    |  105 -
 cli/shell.go                                       |  101 +-
 cmd/exit.go                                        |   11 +-
 cmd/login.go                                       |   93 -
 cmd/version.go                                     |    3 +-
 config/about.go                                    |   14 +-
 config/cache.go                                    |    4 +-
 go.mod                                             |   15 +-
 go.sum                                             |   17 +
 .../briandowns/spinner/character_sets.go           |    2 +
 vendor/github.com/briandowns/spinner/spinner.go    |   66 +-
 .../go-colorable => c-bata/go-prompt}/LICENSE      |    4 +-
 vendor/github.com/c-bata/go-prompt/buffer.go       |  206 ++
 vendor/github.com/c-bata/go-prompt/completion.go   |  194 ++
 vendor/github.com/c-bata/go-prompt/document.go     |  533 ++++
 vendor/github.com/c-bata/go-prompt/emacs.go        |  119 +
 vendor/github.com/c-bata/go-prompt/filter.go       |   72 +
 vendor/github.com/c-bata/go-prompt/history.go      |   61 +
 vendor/github.com/c-bata/go-prompt/input.go        |  158 ++
 vendor/github.com/c-bata/go-prompt/input_posix.go  |  128 +
 .../github.com/c-bata/go-prompt/input_windows.go   |   94 +
 vendor/github.com/c-bata/go-prompt/key.go          |  127 +
 vendor/github.com/c-bata/go-prompt/key_bind.go     |   59 +
 .../github.com/c-bata/go-prompt/key_bind_func.go   |   48 +
 vendor/github.com/c-bata/go-prompt/key_string.go   |   16 +
 vendor/github.com/c-bata/go-prompt/option.go       |  266 ++
 vendor/github.com/c-bata/go-prompt/output.go       |  148 ++
 vendor/github.com/c-bata/go-prompt/output_posix.go |   35 +
 vendor/github.com/c-bata/go-prompt/output_vt100.go |  333 +++
 .../github.com/c-bata/go-prompt/output_windows.go  |   36 +
 vendor/github.com/c-bata/go-prompt/prompt.go       |  286 ++
 vendor/github.com/c-bata/go-prompt/render.go       |  286 ++
 vendor/github.com/c-bata/go-prompt/shortcut.go     |   43 +
 vendor/github.com/c-bata/go-prompt/signal_posix.go |   48 +
 .../github.com/c-bata/go-prompt/signal_windows.go  |   43 +
 vendor/github.com/chzyer/readline/ansi_windows.go  |  249 --
 vendor/github.com/chzyer/readline/complete.go      |  285 --
 .../github.com/chzyer/readline/complete_helper.go  |  165 --
 .../github.com/chzyer/readline/complete_segment.go |   82 -
 vendor/github.com/chzyer/readline/history.go       |  330 ---
 vendor/github.com/chzyer/readline/operation.go     |  531 ----
 vendor/github.com/chzyer/readline/password.go      |   33 -
 .../chzyer/readline/rawreader_windows.go           |  125 -
 vendor/github.com/chzyer/readline/readline.go      |  326 ---
 vendor/github.com/chzyer/readline/remote.go        |  475 ----
 vendor/github.com/chzyer/readline/runebuf.go       |  629 -----
 vendor/github.com/chzyer/readline/runes.go         |  224 --
 vendor/github.com/chzyer/readline/runes/runes.go   |  155 --
 vendor/github.com/chzyer/readline/search.go        |  164 --
 vendor/github.com/chzyer/readline/std.go           |  197 --
 vendor/github.com/chzyer/readline/std_windows.go   |    9 -
 vendor/github.com/chzyer/readline/term.go          |  123 -
 vendor/github.com/chzyer/readline/term_bsd.go      |   29 -
 vendor/github.com/chzyer/readline/term_linux.go    |   33 -
 vendor/github.com/chzyer/readline/term_solaris.go  |   32 -
 vendor/github.com/chzyer/readline/term_unix.go     |   24 -
 vendor/github.com/chzyer/readline/term_windows.go  |  171 --
 vendor/github.com/chzyer/readline/terminal.go      |  238 --
 vendor/github.com/chzyer/readline/utils.go         |  277 --
 vendor/github.com/chzyer/readline/utils_unix.go    |   83 -
 vendor/github.com/chzyer/readline/utils_windows.go |   41 -
 vendor/github.com/chzyer/readline/vim.go           |  176 --
 vendor/github.com/chzyer/readline/windows_api.go   |  152 --
 vendor/github.com/fatih/color/doc.go               |  133 +
 vendor/github.com/juju/ansiterm/attribute.go       |   50 -
 vendor/github.com/juju/ansiterm/color.go           |  119 -
 vendor/github.com/juju/ansiterm/context.go         |   95 -
 vendor/github.com/juju/ansiterm/doc.go             |    6 -
 vendor/github.com/juju/ansiterm/style.go           |   72 -
 vendor/github.com/juju/ansiterm/tabwriter.go       |   64 -
 .../juju/ansiterm/tabwriter/tabwriter.go           |  587 -----
 vendor/github.com/juju/ansiterm/terminal.go        |   32 -
 vendor/github.com/juju/ansiterm/writer.go          |   74 -
 vendor/github.com/lunixbochs/vtclean/io.go         |   93 -
 vendor/github.com/lunixbochs/vtclean/line.go       |  113 -
 vendor/github.com/lunixbochs/vtclean/vtclean.go    |   88 -
 .../lunixbochs/vtclean/vtclean/vtclean.go          |   17 -
 vendor/github.com/manifoldco/promptui/codes.go     |  108 -
 vendor/github.com/manifoldco/promptui/keycodes.go  |   25 -
 .../manifoldco/promptui/keycodes_windows.go        |   25 -
 vendor/github.com/manifoldco/promptui/list/list.go |  197 --
 vendor/github.com/manifoldco/promptui/prompt.go    |  338 ---
 vendor/github.com/manifoldco/promptui/promptui.go  |   18 -
 .../manifoldco/promptui/screenbuf/screenbuf.go     |  138 -
 vendor/github.com/manifoldco/promptui/select.go    |  503 ----
 vendor/github.com/manifoldco/promptui/styles.go    |   12 -
 .../manifoldco/promptui/styles_windows.go          |   10 -
 .../mattn/go-colorable/cmd/colorable/colorable.go  |   12 -
 .../mattn/go-colorable/colorable_windows.go        |  208 +-
 .../mattn/go-runewidth/runewidth_posix_test.go     |   78 -
 .../mattn/go-runewidth/runewidth_test.go           |  297 ---
 .../github.com/mattn/go-shellwords/shellwords.go   |   47 +-
 vendor/github.com/mattn/go-shellwords/util_go15.go |   24 -
 .../github.com/mattn/go-shellwords/util_posix.go   |    5 +-
 .../github.com/mattn/go-shellwords/util_windows.go |    5 -
 vendor/github.com/mattn/go-tty/.travis.yml         |    4 +
 .../mattn/{go-colorable => go-tty}/LICENSE         |    2 +-
 vendor/github.com/mattn/go-tty/README.md           |   49 +
 vendor/github.com/mattn/go-tty/tty.go              |  120 +
 vendor/github.com/mattn/go-tty/tty_bsd.go          |   12 +
 vendor/github.com/mattn/go-tty/tty_linux.go        |    8 +
 vendor/github.com/mattn/go-tty/tty_plan9.go        |   63 +
 vendor/github.com/mattn/go-tty/tty_unix.go         |  130 +
 vendor/github.com/mattn/go-tty/tty_windows.go      |  323 +++
 vendor/github.com/mitchellh/go-homedir/homedir.go  |   56 +-
 vendor/github.com/olekukonko/tablewriter/README.md |    2 +-
 .../olekukonko/tablewriter/csv2table/README.md     |   43 -
 .../olekukonko/tablewriter/csv2table/csv2table.go  |   85 -
 .../olekukonko/tablewriter/table_test.go           | 1055 --------
 vendor/github.com/olekukonko/tablewriter/util.go   |   19 +-
 .../github.com/olekukonko/tablewriter/wrap_test.go |   58 -
 vendor/github.com/pkg/term/LICENSE                 |   10 +
 vendor/github.com/pkg/term/termios/doc.go          |    4 +
 vendor/github.com/pkg/term/termios/ioctl.go        |   12 +
 vendor/github.com/pkg/term/termios/ioctl_darwin.go |   10 +
 .../github.com/pkg/term/termios/ioctl_solaris.go   |    7 +
 vendor/github.com/pkg/term/termios/pty.go          |   45 +
 vendor/github.com/pkg/term/termios/pty_bsd.go      |   41 +
 vendor/github.com/pkg/term/termios/pty_darwin.go   |   35 +
 vendor/github.com/pkg/term/termios/pty_linux.go    |   30 +
 vendor/github.com/pkg/term/termios/pty_solaris.go  |   33 +
 vendor/github.com/pkg/term/termios/termios.go      |   46 +
 vendor/github.com/pkg/term/termios/termios_bsd.go  |   90 +
 .../github.com/pkg/term/termios/termios_const.go   |   13 +
 .../pkg/term/termios/termios_const_solaris.go      |   14 +
 .../github.com/pkg/term/termios/termios_linux.go   |   81 +
 .../github.com/pkg/term/termios/termios_solaris.go |  102 +
 .../github.com/pkg/term/termios/termios_windows.go |    1 +
 vendor/golang.org/x/sys/AUTHORS                    |    3 +
 vendor/golang.org/x/sys/CONTRIBUTORS               |    3 +
 vendor/golang.org/x/sys/LICENSE                    |   27 +
 vendor/golang.org/x/sys/PATENTS                    |   22 +
 vendor/golang.org/x/sys/unix/.gitignore            |    2 +
 vendor/golang.org/x/sys/unix/README.md             |  173 ++
 vendor/golang.org/x/sys/unix/affinity_linux.go     |  124 +
 vendor/golang.org/x/sys/unix/aliases.go            |   14 +
 vendor/golang.org/x/sys/unix/asm_aix_ppc64.s       |   17 +
 vendor/golang.org/x/sys/unix/asm_darwin_386.s      |   29 +
 vendor/golang.org/x/sys/unix/asm_darwin_amd64.s    |   29 +
 vendor/golang.org/x/sys/unix/asm_darwin_arm.s      |   30 +
 vendor/golang.org/x/sys/unix/asm_darwin_arm64.s    |   30 +
 vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s |   29 +
 vendor/golang.org/x/sys/unix/asm_freebsd_386.s     |   29 +
 vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s   |   29 +
 vendor/golang.org/x/sys/unix/asm_freebsd_arm.s     |   29 +
 vendor/golang.org/x/sys/unix/asm_linux_386.s       |   65 +
 vendor/golang.org/x/sys/unix/asm_linux_amd64.s     |   57 +
 vendor/golang.org/x/sys/unix/asm_linux_arm.s       |   56 +
 vendor/golang.org/x/sys/unix/asm_linux_arm64.s     |   52 +
 vendor/golang.org/x/sys/unix/asm_linux_mips64x.s   |   56 +
 vendor/golang.org/x/sys/unix/asm_linux_mipsx.s     |   54 +
 vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s    |   56 +
 vendor/golang.org/x/sys/unix/asm_linux_s390x.s     |   56 +
 vendor/golang.org/x/sys/unix/asm_netbsd_386.s      |   29 +
 vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s    |   29 +
 vendor/golang.org/x/sys/unix/asm_netbsd_arm.s      |   29 +
 vendor/golang.org/x/sys/unix/asm_openbsd_386.s     |   29 +
 vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s   |   29 +
 vendor/golang.org/x/sys/unix/asm_openbsd_arm.s     |   29 +
 vendor/golang.org/x/sys/unix/asm_solaris_amd64.s   |   17 +
 vendor/golang.org/x/sys/unix/bluetooth_linux.go    |   35 +
 vendor/golang.org/x/sys/unix/cap_freebsd.go        |  195 ++
 vendor/golang.org/x/sys/unix/constants.go          |   13 +
 vendor/golang.org/x/sys/unix/dev_aix_ppc.go        |   27 +
 vendor/golang.org/x/sys/unix/dev_aix_ppc64.go      |   29 +
 vendor/golang.org/x/sys/unix/dev_darwin.go         |   24 +
 vendor/golang.org/x/sys/unix/dev_dragonfly.go      |   30 +
 vendor/golang.org/x/sys/unix/dev_freebsd.go        |   30 +
 vendor/golang.org/x/sys/unix/dev_linux.go          |   42 +
 vendor/golang.org/x/sys/unix/dev_netbsd.go         |   29 +
 vendor/golang.org/x/sys/unix/dev_openbsd.go        |   29 +
 vendor/golang.org/x/sys/unix/dirent.go             |   17 +
 vendor/golang.org/x/sys/unix/endian_big.go         |    9 +
 vendor/golang.org/x/sys/unix/endian_little.go      |    9 +
 vendor/golang.org/x/sys/unix/env_unix.go           |   31 +
 vendor/golang.org/x/sys/unix/errors_freebsd_386.go |  227 ++
 .../golang.org/x/sys/unix/errors_freebsd_amd64.go  |  227 ++
 vendor/golang.org/x/sys/unix/errors_freebsd_arm.go |  226 ++
 vendor/golang.org/x/sys/unix/fcntl.go              |   32 +
 vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go  |   13 +
 vendor/golang.org/x/sys/unix/gccgo.go              |   62 +
 vendor/golang.org/x/sys/unix/gccgo_c.c             |   39 +
 vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go  |   20 +
 vendor/golang.org/x/sys/unix/ioctl.go              |   30 +
 vendor/golang.org/x/sys/unix/mkall.sh              |  204 ++
 vendor/golang.org/x/sys/unix/mkerrors.sh           |  654 +++++
 vendor/golang.org/x/sys/unix/mkpost.go             |   98 +
 vendor/golang.org/x/sys/unix/mksyscall.pl          |  341 +++
 vendor/golang.org/x/sys/unix/mksyscall_aix_ppc.pl  |  384 +++
 .../golang.org/x/sys/unix/mksyscall_aix_ppc64.pl   |  579 ++++
 vendor/golang.org/x/sys/unix/mksyscall_solaris.pl  |  294 +++
 vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl   |  265 ++
 vendor/golang.org/x/sys/unix/mksysnum_darwin.pl    |   39 +
 vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl |   50 +
 vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl   |   50 +
 vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl    |   58 +
 vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl   |   50 +
 vendor/golang.org/x/sys/unix/openbsd_pledge.go     |   95 +
 vendor/golang.org/x/sys/unix/pagesize_unix.go      |   15 +
 vendor/golang.org/x/sys/unix/race.go               |   30 +
 vendor/golang.org/x/sys/unix/race0.go              |   25 +
 vendor/golang.org/x/sys/unix/sockcmsg_linux.go     |   36 +
 vendor/golang.org/x/sys/unix/sockcmsg_unix.go      |  104 +
 vendor/golang.org/x/sys/unix/str.go                |   26 +
 vendor/golang.org/x/sys/unix/syscall.go            |   54 +
 vendor/golang.org/x/sys/unix/syscall_aix.go        |  547 ++++
 vendor/golang.org/x/sys/unix/syscall_aix_ppc.go    |   34 +
 vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go  |   34 +
 vendor/golang.org/x/sys/unix/syscall_bsd.go        |  624 +++++
 vendor/golang.org/x/sys/unix/syscall_darwin.go     |  700 +++++
 vendor/golang.org/x/sys/unix/syscall_darwin_386.go |   68 +
 .../golang.org/x/sys/unix/syscall_darwin_amd64.go  |   68 +
 vendor/golang.org/x/sys/unix/syscall_darwin_arm.go |   66 +
 .../golang.org/x/sys/unix/syscall_darwin_arm64.go  |   68 +
 vendor/golang.org/x/sys/unix/syscall_dragonfly.go  |  523 ++++
 .../x/sys/unix/syscall_dragonfly_amd64.go          |   52 +
 vendor/golang.org/x/sys/unix/syscall_freebsd.go    |  535 ++++
 .../golang.org/x/sys/unix/syscall_freebsd_386.go   |   52 +
 .../golang.org/x/sys/unix/syscall_freebsd_amd64.go |   52 +
 .../golang.org/x/sys/unix/syscall_freebsd_arm.go   |   52 +
 vendor/golang.org/x/sys/unix/syscall_linux.go      | 1628 ++++++++++++
 vendor/golang.org/x/sys/unix/syscall_linux_386.go  |  385 +++
 .../golang.org/x/sys/unix/syscall_linux_amd64.go   |  175 ++
 .../x/sys/unix/syscall_linux_amd64_gc.go           |   13 +
 vendor/golang.org/x/sys/unix/syscall_linux_arm.go  |  259 ++
 .../golang.org/x/sys/unix/syscall_linux_arm64.go   |  212 ++
 vendor/golang.org/x/sys/unix/syscall_linux_gc.go   |   14 +
 .../golang.org/x/sys/unix/syscall_linux_gc_386.go  |   16 +
 .../x/sys/unix/syscall_linux_gccgo_386.go          |   30 +
 .../x/sys/unix/syscall_linux_gccgo_arm.go          |   20 +
 .../golang.org/x/sys/unix/syscall_linux_mips64x.go |  214 ++
 .../golang.org/x/sys/unix/syscall_linux_mipsx.go   |  233 ++
 .../golang.org/x/sys/unix/syscall_linux_ppc64x.go  |  151 ++
 .../golang.org/x/sys/unix/syscall_linux_riscv64.go |  212 ++
 .../golang.org/x/sys/unix/syscall_linux_s390x.go   |  337 +++
 .../golang.org/x/sys/unix/syscall_linux_sparc64.go |  146 ++
 vendor/golang.org/x/sys/unix/syscall_netbsd.go     |  597 +++++
 vendor/golang.org/x/sys/unix/syscall_netbsd_386.go |   33 +
 .../golang.org/x/sys/unix/syscall_netbsd_amd64.go  |   33 +
 vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go |   33 +
 vendor/golang.org/x/sys/unix/syscall_openbsd.go    |  385 +++
 .../golang.org/x/sys/unix/syscall_openbsd_386.go   |   33 +
 .../golang.org/x/sys/unix/syscall_openbsd_amd64.go |   37 +
 .../golang.org/x/sys/unix/syscall_openbsd_arm.go   |   33 +
 vendor/golang.org/x/sys/unix/syscall_solaris.go    |  730 ++++++
 .../golang.org/x/sys/unix/syscall_solaris_amd64.go |   23 +
 vendor/golang.org/x/sys/unix/syscall_unix.go       |  394 +++
 vendor/golang.org/x/sys/unix/syscall_unix_gc.go    |   15 +
 vendor/golang.org/x/sys/unix/timestruct.go         |   82 +
 vendor/golang.org/x/sys/unix/types_aix.go          |  236 ++
 vendor/golang.org/x/sys/unix/types_darwin.go       |  277 ++
 vendor/golang.org/x/sys/unix/types_dragonfly.go    |  263 ++
 vendor/golang.org/x/sys/unix/types_freebsd.go      |  385 +++
 vendor/golang.org/x/sys/unix/types_netbsd.go       |  287 ++
 vendor/golang.org/x/sys/unix/types_openbsd.go      |  272 ++
 vendor/golang.org/x/sys/unix/types_solaris.go      |  266 ++
 vendor/golang.org/x/sys/unix/xattr_bsd.go          |  231 ++
 vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go    | 1372 ++++++++++
 vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go  | 1373 ++++++++++
 vendor/golang.org/x/sys/unix/zerrors_darwin_386.go | 1783 +++++++++++++
 .../golang.org/x/sys/unix/zerrors_darwin_amd64.go  | 1783 +++++++++++++
 vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go | 1783 +++++++++++++
 .../golang.org/x/sys/unix/zerrors_darwin_arm64.go  | 1783 +++++++++++++
 .../x/sys/unix/zerrors_dragonfly_amd64.go          | 1650 ++++++++++++
 .../golang.org/x/sys/unix/zerrors_freebsd_386.go   | 1793 +++++++++++++
 .../golang.org/x/sys/unix/zerrors_freebsd_amd64.go | 1794 +++++++++++++
 .../golang.org/x/sys/unix/zerrors_freebsd_arm.go   | 1802 +++++++++++++
 vendor/golang.org/x/sys/unix/zerrors_linux_386.go  | 2695 +++++++++++++++++++
 .../golang.org/x/sys/unix/zerrors_linux_amd64.go   | 2695 +++++++++++++++++++
 vendor/golang.org/x/sys/unix/zerrors_linux_arm.go  | 2701 +++++++++++++++++++
 .../golang.org/x/sys/unix/zerrors_linux_arm64.go   | 2686 +++++++++++++++++++
 vendor/golang.org/x/sys/unix/zerrors_linux_mips.go | 2702 +++++++++++++++++++
 .../golang.org/x/sys/unix/zerrors_linux_mips64.go  | 2702 +++++++++++++++++++
 .../x/sys/unix/zerrors_linux_mips64le.go           | 2702 +++++++++++++++++++
 .../golang.org/x/sys/unix/zerrors_linux_mipsle.go  | 2702 +++++++++++++++++++
 .../golang.org/x/sys/unix/zerrors_linux_ppc64.go   | 2755 ++++++++++++++++++++
 .../golang.org/x/sys/unix/zerrors_linux_ppc64le.go | 2755 ++++++++++++++++++++
 .../golang.org/x/sys/unix/zerrors_linux_riscv64.go | 2682 +++++++++++++++++++
 .../golang.org/x/sys/unix/zerrors_linux_s390x.go   | 2755 ++++++++++++++++++++
 .../golang.org/x/sys/unix/zerrors_linux_sparc64.go | 2150 +++++++++++++++
 vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go | 1772 +++++++++++++
 .../golang.org/x/sys/unix/zerrors_netbsd_amd64.go  | 1762 +++++++++++++
 vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go | 1751 +++++++++++++
 .../golang.org/x/sys/unix/zerrors_openbsd_386.go   | 1654 ++++++++++++
 .../golang.org/x/sys/unix/zerrors_openbsd_amd64.go | 1765 +++++++++++++
 .../golang.org/x/sys/unix/zerrors_openbsd_arm.go   | 1656 ++++++++++++
 .../golang.org/x/sys/unix/zerrors_solaris_amd64.go | 1532 +++++++++++
 vendor/golang.org/x/sys/unix/zptrace386_linux.go   |   80 +
 vendor/golang.org/x/sys/unix/zptracearm_linux.go   |   41 +
 vendor/golang.org/x/sys/unix/zptracemips_linux.go  |   50 +
 .../golang.org/x/sys/unix/zptracemipsle_linux.go   |   50 +
 vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go   | 1450 +++++++++++
 vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go | 1408 ++++++++++
 .../golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go | 1162 +++++++++
 .../x/sys/unix/zsyscall_aix_ppc64_gccgo.go         | 1042 ++++++++
 .../golang.org/x/sys/unix/zsyscall_darwin_386.go   | 1769 +++++++++++++
 .../golang.org/x/sys/unix/zsyscall_darwin_amd64.go | 1769 +++++++++++++
 .../golang.org/x/sys/unix/zsyscall_darwin_arm.go   | 1769 +++++++++++++
 .../golang.org/x/sys/unix/zsyscall_darwin_arm64.go | 1769 +++++++++++++
 .../x/sys/unix/zsyscall_dragonfly_amd64.go         | 1508 +++++++++++
 .../golang.org/x/sys/unix/zsyscall_freebsd_386.go  | 1935 ++++++++++++++
 .../x/sys/unix/zsyscall_freebsd_amd64.go           | 1935 ++++++++++++++
 .../golang.org/x/sys/unix/zsyscall_freebsd_arm.go  | 1935 ++++++++++++++
 vendor/golang.org/x/sys/unix/zsyscall_linux_386.go | 2131 +++++++++++++++
 .../golang.org/x/sys/unix/zsyscall_linux_amd64.go  | 2313 ++++++++++++++++
 vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go | 2233 ++++++++++++++++
 .../golang.org/x/sys/unix/zsyscall_linux_arm64.go  | 2140 +++++++++++++++
 .../golang.org/x/sys/unix/zsyscall_linux_mips.go   | 2311 ++++++++++++++++
 .../golang.org/x/sys/unix/zsyscall_linux_mips64.go | 2282 ++++++++++++++++
 .../x/sys/unix/zsyscall_linux_mips64le.go          | 2282 ++++++++++++++++
 .../golang.org/x/sys/unix/zsyscall_linux_mipsle.go | 2311 ++++++++++++++++
 .../golang.org/x/sys/unix/zsyscall_linux_ppc64.go  | 2360 +++++++++++++++++
 .../x/sys/unix/zsyscall_linux_ppc64le.go           | 2360 +++++++++++++++++
 .../x/sys/unix/zsyscall_linux_riscv64.go           | 2140 +++++++++++++++
 .../golang.org/x/sys/unix/zsyscall_linux_s390x.go  | 2130 +++++++++++++++
 .../x/sys/unix/zsyscall_linux_sparc64.go           | 2172 +++++++++++++++
 .../golang.org/x/sys/unix/zsyscall_netbsd_386.go   | 1653 ++++++++++++
 .../golang.org/x/sys/unix/zsyscall_netbsd_amd64.go | 1653 ++++++++++++
 .../golang.org/x/sys/unix/zsyscall_netbsd_arm.go   | 1653 ++++++++++++
 .../golang.org/x/sys/unix/zsyscall_openbsd_386.go  | 1508 +++++++++++
 .../x/sys/unix/zsyscall_openbsd_amd64.go           | 1508 +++++++++++
 .../golang.org/x/sys/unix/zsyscall_openbsd_arm.go  | 1508 +++++++++++
 .../x/sys/unix/zsyscall_solaris_amd64.go           | 1953 ++++++++++++++
 .../golang.org/x/sys/unix/zsysctl_openbsd_386.go   |  270 ++
 .../golang.org/x/sys/unix/zsysctl_openbsd_amd64.go |  270 ++
 .../golang.org/x/sys/unix/zsysctl_openbsd_arm.go   |  270 ++
 vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go |  436 ++++
 .../golang.org/x/sys/unix/zsysnum_darwin_amd64.go  |  436 ++++
 vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go |  436 ++++
 .../golang.org/x/sys/unix/zsysnum_darwin_arm64.go  |  436 ++++
 .../x/sys/unix/zsysnum_dragonfly_amd64.go          |  315 +++
 .../golang.org/x/sys/unix/zsysnum_freebsd_386.go   |  403 +++
 .../golang.org/x/sys/unix/zsysnum_freebsd_amd64.go |  403 +++
 .../golang.org/x/sys/unix/zsysnum_freebsd_arm.go   |  403 +++
 vendor/golang.org/x/sys/unix/zsysnum_linux_386.go  |  392 +++
 .../golang.org/x/sys/unix/zsysnum_linux_amd64.go   |  344 +++
 vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go  |  363 +++
 .../golang.org/x/sys/unix/zsysnum_linux_arm64.go   |  287 ++
 vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go |  377 +++
 .../golang.org/x/sys/unix/zsysnum_linux_mips64.go  |  337 +++
 .../x/sys/unix/zsysnum_linux_mips64le.go           |  337 +++
 .../golang.org/x/sys/unix/zsysnum_linux_mipsle.go  |  377 +++
 .../golang.org/x/sys/unix/zsysnum_linux_ppc64.go   |  375 +++
 .../golang.org/x/sys/unix/zsysnum_linux_ppc64le.go |  375 +++
 .../golang.org/x/sys/unix/zsysnum_linux_riscv64.go |  286 ++
 .../golang.org/x/sys/unix/zsysnum_linux_s390x.go   |  337 +++
 .../golang.org/x/sys/unix/zsysnum_linux_sparc64.go |  348 +++
 vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go |  274 ++
 .../golang.org/x/sys/unix/zsysnum_netbsd_amd64.go  |  274 ++
 vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go |  274 ++
 .../golang.org/x/sys/unix/zsysnum_openbsd_386.go   |  207 ++
 .../golang.org/x/sys/unix/zsysnum_openbsd_amd64.go |  218 ++
 .../golang.org/x/sys/unix/zsysnum_openbsd_arm.go   |  213 ++
 vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go     |  345 +++
 vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go   |  354 +++
 vendor/golang.org/x/sys/unix/ztypes_darwin_386.go  |  489 ++++
 .../golang.org/x/sys/unix/ztypes_darwin_amd64.go   |  499 ++++
 vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go  |  490 ++++
 .../golang.org/x/sys/unix/ztypes_darwin_arm64.go   |  499 ++++
 .../x/sys/unix/ztypes_dragonfly_amd64.go           |  469 ++++
 vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go |  536 ++++
 .../golang.org/x/sys/unix/ztypes_freebsd_amd64.go  |  539 ++++
 vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go |  539 ++++
 vendor/golang.org/x/sys/unix/ztypes_linux_386.go   | 1988 ++++++++++++++
 vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go | 2010 ++++++++++++++
 vendor/golang.org/x/sys/unix/ztypes_linux_arm.go   | 1978 ++++++++++++++
 vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go | 1989 ++++++++++++++
 vendor/golang.org/x/sys/unix/ztypes_linux_mips.go  | 1983 ++++++++++++++
 .../golang.org/x/sys/unix/ztypes_linux_mips64.go   | 1991 ++++++++++++++
 .../golang.org/x/sys/unix/ztypes_linux_mips64le.go | 1991 ++++++++++++++
 .../golang.org/x/sys/unix/ztypes_linux_mipsle.go   | 1983 ++++++++++++++
 vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go | 1999 ++++++++++++++
 .../golang.org/x/sys/unix/ztypes_linux_ppc64le.go  | 1999 ++++++++++++++
 .../golang.org/x/sys/unix/ztypes_linux_riscv64.go  | 2016 ++++++++++++++
 vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go | 2016 ++++++++++++++
 .../golang.org/x/sys/unix/ztypes_linux_sparc64.go  |  690 +++++
 vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go  |  458 ++++
 .../golang.org/x/sys/unix/ztypes_netbsd_amd64.go   |  465 ++++
 vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go  |  463 ++++
 vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go |  558 ++++
 .../golang.org/x/sys/unix/ztypes_openbsd_amd64.go  |  558 ++++
 vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go |  551 ++++
 .../golang.org/x/sys/unix/ztypes_solaris_amd64.go  |  442 ++++
 vendor/gopkg.in/ini.v1/file.go                     |   47 +-
 vendor/gopkg.in/ini.v1/ini.go                      |   26 +-
 vendor/gopkg.in/ini.v1/parser.go                   |  143 +-
 vendor/gopkg.in/ini.v1/section.go                  |    1 +
 391 files changed, 190395 insertions(+), 10559 deletions(-)
 copy cmk.go => cli/history.go (73%)
 delete mode 100644 cli/selector.go
 delete mode 100644 cmd/login.go
 create mode 100644 go.sum
 copy vendor/github.com/{mattn/go-colorable => c-bata/go-prompt}/LICENSE (94%)
 create mode 100644 vendor/github.com/c-bata/go-prompt/buffer.go
 create mode 100644 vendor/github.com/c-bata/go-prompt/completion.go
 create mode 100644 vendor/github.com/c-bata/go-prompt/document.go
 create mode 100644 vendor/github.com/c-bata/go-prompt/emacs.go
 create mode 100644 vendor/github.com/c-bata/go-prompt/filter.go
 create mode 100644 vendor/github.com/c-bata/go-prompt/history.go
 create mode 100644 vendor/github.com/c-bata/go-prompt/input.go
 create mode 100644 vendor/github.com/c-bata/go-prompt/input_posix.go
 create mode 100644 vendor/github.com/c-bata/go-prompt/input_windows.go
 create mode 100644 vendor/github.com/c-bata/go-prompt/key.go
 create mode 100644 vendor/github.com/c-bata/go-prompt/key_bind.go
 create mode 100644 vendor/github.com/c-bata/go-prompt/key_bind_func.go
 create mode 100644 vendor/github.com/c-bata/go-prompt/key_string.go
 create mode 100644 vendor/github.com/c-bata/go-prompt/option.go
 create mode 100644 vendor/github.com/c-bata/go-prompt/output.go
 create mode 100644 vendor/github.com/c-bata/go-prompt/output_posix.go
 create mode 100644 vendor/github.com/c-bata/go-prompt/output_vt100.go
 create mode 100644 vendor/github.com/c-bata/go-prompt/output_windows.go
 create mode 100644 vendor/github.com/c-bata/go-prompt/prompt.go
 create mode 100644 vendor/github.com/c-bata/go-prompt/render.go
 create mode 100644 vendor/github.com/c-bata/go-prompt/shortcut.go
 create mode 100644 vendor/github.com/c-bata/go-prompt/signal_posix.go
 create mode 100644 vendor/github.com/c-bata/go-prompt/signal_windows.go
 delete mode 100644 vendor/github.com/chzyer/readline/ansi_windows.go
 delete mode 100644 vendor/github.com/chzyer/readline/complete.go
 delete mode 100644 vendor/github.com/chzyer/readline/complete_helper.go
 delete mode 100644 vendor/github.com/chzyer/readline/complete_segment.go
 delete mode 100644 vendor/github.com/chzyer/readline/history.go
 delete mode 100644 vendor/github.com/chzyer/readline/operation.go
 delete mode 100644 vendor/github.com/chzyer/readline/password.go
 delete mode 100644 vendor/github.com/chzyer/readline/rawreader_windows.go
 delete mode 100644 vendor/github.com/chzyer/readline/readline.go
 delete mode 100644 vendor/github.com/chzyer/readline/remote.go
 delete mode 100644 vendor/github.com/chzyer/readline/runebuf.go
 delete mode 100644 vendor/github.com/chzyer/readline/runes.go
 delete mode 100644 vendor/github.com/chzyer/readline/runes/runes.go
 delete mode 100644 vendor/github.com/chzyer/readline/search.go
 delete mode 100644 vendor/github.com/chzyer/readline/std.go
 delete mode 100644 vendor/github.com/chzyer/readline/std_windows.go
 delete mode 100644 vendor/github.com/chzyer/readline/term.go
 delete mode 100644 vendor/github.com/chzyer/readline/term_bsd.go
 delete mode 100644 vendor/github.com/chzyer/readline/term_linux.go
 delete mode 100644 vendor/github.com/chzyer/readline/term_solaris.go
 delete mode 100644 vendor/github.com/chzyer/readline/term_unix.go
 delete mode 100644 vendor/github.com/chzyer/readline/term_windows.go
 delete mode 100644 vendor/github.com/chzyer/readline/terminal.go
 delete mode 100644 vendor/github.com/chzyer/readline/utils.go
 delete mode 100644 vendor/github.com/chzyer/readline/utils_unix.go
 delete mode 100644 vendor/github.com/chzyer/readline/utils_windows.go
 delete mode 100644 vendor/github.com/chzyer/readline/vim.go
 delete mode 100644 vendor/github.com/chzyer/readline/windows_api.go
 create mode 100644 vendor/github.com/fatih/color/doc.go
 delete mode 100644 vendor/github.com/juju/ansiterm/attribute.go
 delete mode 100644 vendor/github.com/juju/ansiterm/color.go
 delete mode 100644 vendor/github.com/juju/ansiterm/context.go
 delete mode 100644 vendor/github.com/juju/ansiterm/doc.go
 delete mode 100644 vendor/github.com/juju/ansiterm/style.go
 delete mode 100644 vendor/github.com/juju/ansiterm/tabwriter.go
 delete mode 100644 vendor/github.com/juju/ansiterm/tabwriter/tabwriter.go
 delete mode 100644 vendor/github.com/juju/ansiterm/terminal.go
 delete mode 100644 vendor/github.com/juju/ansiterm/writer.go
 delete mode 100644 vendor/github.com/lunixbochs/vtclean/io.go
 delete mode 100644 vendor/github.com/lunixbochs/vtclean/line.go
 delete mode 100644 vendor/github.com/lunixbochs/vtclean/vtclean.go
 delete mode 100644 vendor/github.com/lunixbochs/vtclean/vtclean/vtclean.go
 delete mode 100644 vendor/github.com/manifoldco/promptui/codes.go
 delete mode 100644 vendor/github.com/manifoldco/promptui/keycodes.go
 delete mode 100644 vendor/github.com/manifoldco/promptui/keycodes_windows.go
 delete mode 100644 vendor/github.com/manifoldco/promptui/list/list.go
 delete mode 100644 vendor/github.com/manifoldco/promptui/prompt.go
 delete mode 100644 vendor/github.com/manifoldco/promptui/promptui.go
 delete mode 100644 vendor/github.com/manifoldco/promptui/screenbuf/screenbuf.go
 delete mode 100644 vendor/github.com/manifoldco/promptui/select.go
 delete mode 100644 vendor/github.com/manifoldco/promptui/styles.go
 delete mode 100644 vendor/github.com/manifoldco/promptui/styles_windows.go
 delete mode 100644 vendor/github.com/mattn/go-colorable/cmd/colorable/colorable.go
 delete mode 100644 vendor/github.com/mattn/go-runewidth/runewidth_posix_test.go
 delete mode 100644 vendor/github.com/mattn/go-runewidth/runewidth_test.go
 delete mode 100644 vendor/github.com/mattn/go-shellwords/util_go15.go
 create mode 100644 vendor/github.com/mattn/go-tty/.travis.yml
 copy vendor/github.com/mattn/{go-colorable => go-tty}/LICENSE (96%)
 create mode 100644 vendor/github.com/mattn/go-tty/README.md
 create mode 100644 vendor/github.com/mattn/go-tty/tty.go
 create mode 100644 vendor/github.com/mattn/go-tty/tty_bsd.go
 create mode 100644 vendor/github.com/mattn/go-tty/tty_linux.go
 create mode 100644 vendor/github.com/mattn/go-tty/tty_plan9.go
 create mode 100644 vendor/github.com/mattn/go-tty/tty_unix.go
 create mode 100644 vendor/github.com/mattn/go-tty/tty_windows.go
 delete mode 100644 vendor/github.com/olekukonko/tablewriter/csv2table/README.md
 delete mode 100644 vendor/github.com/olekukonko/tablewriter/csv2table/csv2table.go
 delete mode 100644 vendor/github.com/olekukonko/tablewriter/table_test.go
 delete mode 100644 vendor/github.com/olekukonko/tablewriter/wrap_test.go
 create mode 100644 vendor/github.com/pkg/term/LICENSE
 create mode 100644 vendor/github.com/pkg/term/termios/doc.go
 create mode 100644 vendor/github.com/pkg/term/termios/ioctl.go
 create mode 100644 vendor/github.com/pkg/term/termios/ioctl_darwin.go
 create mode 100644 vendor/github.com/pkg/term/termios/ioctl_solaris.go
 create mode 100644 vendor/github.com/pkg/term/termios/pty.go
 create mode 100644 vendor/github.com/pkg/term/termios/pty_bsd.go
 create mode 100644 vendor/github.com/pkg/term/termios/pty_darwin.go
 create mode 100644 vendor/github.com/pkg/term/termios/pty_linux.go
 create mode 100644 vendor/github.com/pkg/term/termios/pty_solaris.go
 create mode 100644 vendor/github.com/pkg/term/termios/termios.go
 create mode 100644 vendor/github.com/pkg/term/termios/termios_bsd.go
 create mode 100644 vendor/github.com/pkg/term/termios/termios_const.go
 create mode 100644 vendor/github.com/pkg/term/termios/termios_const_solaris.go
 create mode 100644 vendor/github.com/pkg/term/termios/termios_linux.go
 create mode 100644 vendor/github.com/pkg/term/termios/termios_solaris.go
 create mode 100644 vendor/github.com/pkg/term/termios/termios_windows.go
 create mode 100644 vendor/golang.org/x/sys/AUTHORS
 create mode 100644 vendor/golang.org/x/sys/CONTRIBUTORS
 create mode 100644 vendor/golang.org/x/sys/LICENSE
 create mode 100644 vendor/golang.org/x/sys/PATENTS
 create mode 100644 vendor/golang.org/x/sys/unix/.gitignore
 create mode 100644 vendor/golang.org/x/sys/unix/README.md
 create mode 100644 vendor/golang.org/x/sys/unix/affinity_linux.go
 create mode 100644 vendor/golang.org/x/sys/unix/aliases.go
 create mode 100644 vendor/golang.org/x/sys/unix/asm_aix_ppc64.s
 create mode 100644 vendor/golang.org/x/sys/unix/asm_darwin_386.s
 create mode 100644 vendor/golang.org/x/sys/unix/asm_darwin_amd64.s
 create mode 100644 vendor/golang.org/x/sys/unix/asm_darwin_arm.s
 create mode 100644 vendor/golang.org/x/sys/unix/asm_darwin_arm64.s
 create mode 100644 vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s
 create mode 100644 vendor/golang.org/x/sys/unix/asm_freebsd_386.s
 create mode 100644 vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s
 create mode 100644 vendor/golang.org/x/sys/unix/asm_freebsd_arm.s
 create mode 100644 vendor/golang.org/x/sys/unix/asm_linux_386.s
 create mode 100644 vendor/golang.org/x/sys/unix/asm_linux_amd64.s
 create mode 100644 vendor/golang.org/x/sys/unix/asm_linux_arm.s
 create mode 100644 vendor/golang.org/x/sys/unix/asm_linux_arm64.s
 create mode 100644 vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
 create mode 100644 vendor/golang.org/x/sys/unix/asm_linux_mipsx.s
 create mode 100644 vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s
 create mode 100644 vendor/golang.org/x/sys/unix/asm_linux_s390x.s
 create mode 100644 vendor/golang.org/x/sys/unix/asm_netbsd_386.s
 create mode 100644 vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s
 create mode 100644 vendor/golang.org/x/sys/unix/asm_netbsd_arm.s
 create mode 100644 vendor/golang.org/x/sys/unix/asm_openbsd_386.s
 create mode 100644 vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s
 create mode 100644 vendor/golang.org/x/sys/unix/asm_openbsd_arm.s
 create mode 100644 vendor/golang.org/x/sys/unix/asm_solaris_amd64.s
 create mode 100644 vendor/golang.org/x/sys/unix/bluetooth_linux.go
 create mode 100644 vendor/golang.org/x/sys/unix/cap_freebsd.go
 create mode 100644 vendor/golang.org/x/sys/unix/constants.go
 create mode 100644 vendor/golang.org/x/sys/unix/dev_aix_ppc.go
 create mode 100644 vendor/golang.org/x/sys/unix/dev_aix_ppc64.go
 create mode 100644 vendor/golang.org/x/sys/unix/dev_darwin.go
 create mode 100644 vendor/golang.org/x/sys/unix/dev_dragonfly.go
 create mode 100644 vendor/golang.org/x/sys/unix/dev_freebsd.go
 create mode 100644 vendor/golang.org/x/sys/unix/dev_linux.go
 create mode 100644 vendor/golang.org/x/sys/unix/dev_netbsd.go
 create mode 100644 vendor/golang.org/x/sys/unix/dev_openbsd.go
 create mode 100644 vendor/golang.org/x/sys/unix/dirent.go
 create mode 100644 vendor/golang.org/x/sys/unix/endian_big.go
 create mode 100644 vendor/golang.org/x/sys/unix/endian_little.go
 create mode 100644 vendor/golang.org/x/sys/unix/env_unix.go
 create mode 100644 vendor/golang.org/x/sys/unix/errors_freebsd_386.go
 create mode 100644 vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/errors_freebsd_arm.go
 create mode 100644 vendor/golang.org/x/sys/unix/fcntl.go
 create mode 100644 vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go
 create mode 100644 vendor/golang.org/x/sys/unix/gccgo.go
 create mode 100644 vendor/golang.org/x/sys/unix/gccgo_c.c
 create mode 100644 vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/ioctl.go
 create mode 100644 vendor/golang.org/x/sys/unix/mkall.sh
 create mode 100644 vendor/golang.org/x/sys/unix/mkerrors.sh
 create mode 100644 vendor/golang.org/x/sys/unix/mkpost.go
 create mode 100644 vendor/golang.org/x/sys/unix/mksyscall.pl
 create mode 100644 vendor/golang.org/x/sys/unix/mksyscall_aix_ppc.pl
 create mode 100644 vendor/golang.org/x/sys/unix/mksyscall_aix_ppc64.pl
 create mode 100644 vendor/golang.org/x/sys/unix/mksyscall_solaris.pl
 create mode 100644 vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl
 create mode 100644 vendor/golang.org/x/sys/unix/mksysnum_darwin.pl
 create mode 100644 vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl
 create mode 100644 vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl
 create mode 100644 vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl
 create mode 100644 vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl
 create mode 100644 vendor/golang.org/x/sys/unix/openbsd_pledge.go
 create mode 100644 vendor/golang.org/x/sys/unix/pagesize_unix.go
 create mode 100644 vendor/golang.org/x/sys/unix/race.go
 create mode 100644 vendor/golang.org/x/sys/unix/race0.go
 create mode 100644 vendor/golang.org/x/sys/unix/sockcmsg_linux.go
 create mode 100644 vendor/golang.org/x/sys/unix/sockcmsg_unix.go
 create mode 100644 vendor/golang.org/x/sys/unix/str.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_aix.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_aix_ppc.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_bsd.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_386.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_dragonfly.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_386.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_arm.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_gc.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_solaris.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_unix.go
 create mode 100644 vendor/golang.org/x/sys/unix/syscall_unix_gc.go
 create mode 100644 vendor/golang.org/x/sys/unix/timestruct.go
 create mode 100644 vendor/golang.org/x/sys/unix/types_aix.go
 create mode 100644 vendor/golang.org/x/sys/unix/types_darwin.go
 create mode 100644 vendor/golang.org/x/sys/unix/types_dragonfly.go
 create mode 100644 vendor/golang.org/x/sys/unix/types_freebsd.go
 create mode 100644 vendor/golang.org/x/sys/unix/types_netbsd.go
 create mode 100644 vendor/golang.org/x/sys/unix/types_openbsd.go
 create mode 100644 vendor/golang.org/x/sys/unix/types_solaris.go
 create mode 100644 vendor/golang.org/x/sys/unix/xattr_bsd.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_darwin_386.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_386.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go
 create mode 100644 vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zptrace386_linux.go
 create mode 100644 vendor/golang.org/x/sys/unix/zptracearm_linux.go
 create mode 100644 vendor/golang.org/x/sys/unix/zptracemips_linux.go
 create mode 100644 vendor/golang.org/x/sys/unix/zptracemipsle_linux.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_darwin_386.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_386.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go
 create mode 100644 vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go


[cloudstack-cloudmonkey] 04/04: cmk: rewrite CLI using go-prompt

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack-cloudmonkey.git

commit c948d698f179e6718e95244ee4c336cb02303d88
Author: Rohit Yadav <ro...@apache.org>
AuthorDate: Sun Oct 21 05:14:26 2018 +0530

    cmk: rewrite CLI using go-prompt
    
    - Remove readline/prompt-ui based implementation
    - Simplify autocompletion logic
    - Migrate to go mod
    - Update all dependencies
    
    Signed-off-by: Rohit Yadav <ro...@apache.org>
---
 cli/completer.go                                   |  321 +--
 cli/exec.go                                        |   24 +-
 cmd/version.go => cli/history.go                   |   29 +-
 cli/selector.go                                    |  105 -
 cli/shell.go                                       |  101 +-
 cmd/exit.go                                        |   11 +-
 cmd/login.go                                       |   93 -
 cmd/version.go                                     |    3 +-
 config/about.go                                    |   14 +-
 config/cache.go                                    |    4 +-
 go.mod                                             |   15 +-
 go.sum                                             |   17 +
 vendor/github.com/c-bata/go-prompt/LICENSE         |   21 +
 vendor/github.com/c-bata/go-prompt/buffer.go       |  206 ++
 vendor/github.com/c-bata/go-prompt/completion.go   |  194 ++
 vendor/github.com/c-bata/go-prompt/document.go     |  533 ++++
 vendor/github.com/c-bata/go-prompt/emacs.go        |  119 +
 vendor/github.com/c-bata/go-prompt/filter.go       |   72 +
 vendor/github.com/c-bata/go-prompt/history.go      |   61 +
 vendor/github.com/c-bata/go-prompt/input.go        |  158 ++
 vendor/github.com/c-bata/go-prompt/input_posix.go  |  128 +
 .../github.com/c-bata/go-prompt/input_windows.go   |   94 +
 vendor/github.com/c-bata/go-prompt/key.go          |  127 +
 vendor/github.com/c-bata/go-prompt/key_bind.go     |   59 +
 .../github.com/c-bata/go-prompt/key_bind_func.go   |   48 +
 vendor/github.com/c-bata/go-prompt/key_string.go   |   16 +
 vendor/github.com/c-bata/go-prompt/option.go       |  266 ++
 vendor/github.com/c-bata/go-prompt/output.go       |  148 ++
 vendor/github.com/c-bata/go-prompt/output_posix.go |   35 +
 vendor/github.com/c-bata/go-prompt/output_vt100.go |  333 +++
 .../github.com/c-bata/go-prompt/output_windows.go  |   36 +
 vendor/github.com/c-bata/go-prompt/prompt.go       |  286 ++
 vendor/github.com/c-bata/go-prompt/render.go       |  286 ++
 vendor/github.com/c-bata/go-prompt/shortcut.go     |   43 +
 vendor/github.com/c-bata/go-prompt/signal_posix.go |   48 +
 .../github.com/c-bata/go-prompt/signal_windows.go  |   43 +
 vendor/github.com/chzyer/readline/ansi_windows.go  |  249 --
 vendor/github.com/chzyer/readline/complete.go      |  285 --
 .../github.com/chzyer/readline/complete_helper.go  |  165 --
 .../github.com/chzyer/readline/complete_segment.go |   82 -
 vendor/github.com/chzyer/readline/history.go       |  330 ---
 vendor/github.com/chzyer/readline/operation.go     |  531 ----
 vendor/github.com/chzyer/readline/password.go      |   33 -
 .../chzyer/readline/rawreader_windows.go           |  125 -
 vendor/github.com/chzyer/readline/readline.go      |  326 ---
 vendor/github.com/chzyer/readline/remote.go        |  475 ----
 vendor/github.com/chzyer/readline/runebuf.go       |  629 -----
 vendor/github.com/chzyer/readline/runes.go         |  224 --
 vendor/github.com/chzyer/readline/runes/runes.go   |  155 --
 vendor/github.com/chzyer/readline/search.go        |  164 --
 vendor/github.com/chzyer/readline/std.go           |  197 --
 vendor/github.com/chzyer/readline/std_windows.go   |    9 -
 vendor/github.com/chzyer/readline/term.go          |  123 -
 vendor/github.com/chzyer/readline/term_bsd.go      |   29 -
 vendor/github.com/chzyer/readline/term_linux.go    |   33 -
 vendor/github.com/chzyer/readline/term_solaris.go  |   32 -
 vendor/github.com/chzyer/readline/term_unix.go     |   24 -
 vendor/github.com/chzyer/readline/term_windows.go  |  171 --
 vendor/github.com/chzyer/readline/terminal.go      |  238 --
 vendor/github.com/chzyer/readline/utils.go         |  277 --
 vendor/github.com/chzyer/readline/utils_unix.go    |   83 -
 vendor/github.com/chzyer/readline/utils_windows.go |   41 -
 vendor/github.com/chzyer/readline/vim.go           |  176 --
 vendor/github.com/chzyer/readline/windows_api.go   |  152 --
 vendor/github.com/fatih/color/doc.go               |  133 +
 vendor/github.com/juju/ansiterm/attribute.go       |   50 -
 vendor/github.com/juju/ansiterm/color.go           |  119 -
 vendor/github.com/juju/ansiterm/context.go         |   95 -
 vendor/github.com/juju/ansiterm/doc.go             |    6 -
 vendor/github.com/juju/ansiterm/style.go           |   72 -
 vendor/github.com/juju/ansiterm/tabwriter.go       |   64 -
 .../juju/ansiterm/tabwriter/tabwriter.go           |  587 -----
 vendor/github.com/juju/ansiterm/terminal.go        |   32 -
 vendor/github.com/juju/ansiterm/writer.go          |   74 -
 vendor/github.com/lunixbochs/vtclean/io.go         |   93 -
 vendor/github.com/lunixbochs/vtclean/line.go       |  113 -
 vendor/github.com/lunixbochs/vtclean/vtclean.go    |   95 -
 vendor/github.com/manifoldco/promptui/codes.go     |  120 -
 vendor/github.com/manifoldco/promptui/keycodes.go  |   31 -
 .../manifoldco/promptui/keycodes_windows.go        |   29 -
 vendor/github.com/manifoldco/promptui/list/list.go |  200 --
 vendor/github.com/manifoldco/promptui/prompt.go    |  367 ---
 vendor/github.com/manifoldco/promptui/promptui.go  |   27 -
 .../manifoldco/promptui/screenbuf/screenbuf.go     |  138 -
 vendor/github.com/manifoldco/promptui/select.go    |  584 -----
 vendor/github.com/manifoldco/promptui/styles.go    |   23 -
 .../manifoldco/promptui/styles_windows.go          |   21 -
 vendor/github.com/mattn/go-tty/.travis.yml         |    4 +
 vendor/github.com/mattn/go-tty/LICENSE             |   21 +
 vendor/github.com/mattn/go-tty/README.md           |   49 +
 vendor/github.com/mattn/go-tty/tty.go              |  120 +
 vendor/github.com/mattn/go-tty/tty_bsd.go          |   12 +
 vendor/github.com/mattn/go-tty/tty_linux.go        |    8 +
 vendor/github.com/mattn/go-tty/tty_plan9.go        |   63 +
 vendor/github.com/mattn/go-tty/tty_unix.go         |  130 +
 vendor/github.com/mattn/go-tty/tty_windows.go      |  323 +++
 vendor/github.com/pkg/term/LICENSE                 |   10 +
 vendor/github.com/pkg/term/termios/doc.go          |    4 +
 vendor/github.com/pkg/term/termios/ioctl.go        |   12 +
 vendor/github.com/pkg/term/termios/ioctl_darwin.go |   10 +
 .../github.com/pkg/term/termios/ioctl_solaris.go   |    7 +
 vendor/github.com/pkg/term/termios/pty.go          |   45 +
 vendor/github.com/pkg/term/termios/pty_bsd.go      |   41 +
 vendor/github.com/pkg/term/termios/pty_darwin.go   |   35 +
 vendor/github.com/pkg/term/termios/pty_linux.go    |   30 +
 vendor/github.com/pkg/term/termios/pty_solaris.go  |   33 +
 vendor/github.com/pkg/term/termios/termios.go      |   46 +
 vendor/github.com/pkg/term/termios/termios_bsd.go  |   90 +
 .../github.com/pkg/term/termios/termios_const.go   |   13 +
 .../pkg/term/termios/termios_const_solaris.go      |   14 +
 .../github.com/pkg/term/termios/termios_linux.go   |   81 +
 .../github.com/pkg/term/termios/termios_solaris.go |  102 +
 .../github.com/pkg/term/termios/termios_windows.go |    1 +
 vendor/golang.org/x/sys/AUTHORS                    |    3 +
 vendor/golang.org/x/sys/CONTRIBUTORS               |    3 +
 vendor/golang.org/x/sys/LICENSE                    |   27 +
 vendor/golang.org/x/sys/PATENTS                    |   22 +
 vendor/golang.org/x/sys/unix/.gitignore            |    2 +
 vendor/golang.org/x/sys/unix/README.md             |  173 ++
 vendor/golang.org/x/sys/unix/affinity_linux.go     |  124 +
 vendor/golang.org/x/sys/unix/aliases.go            |   14 +
 vendor/golang.org/x/sys/unix/asm_aix_ppc64.s       |   17 +
 vendor/golang.org/x/sys/unix/asm_darwin_386.s      |   29 +
 vendor/golang.org/x/sys/unix/asm_darwin_amd64.s    |   29 +
 vendor/golang.org/x/sys/unix/asm_darwin_arm.s      |   30 +
 vendor/golang.org/x/sys/unix/asm_darwin_arm64.s    |   30 +
 vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s |   29 +
 vendor/golang.org/x/sys/unix/asm_freebsd_386.s     |   29 +
 vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s   |   29 +
 vendor/golang.org/x/sys/unix/asm_freebsd_arm.s     |   29 +
 vendor/golang.org/x/sys/unix/asm_linux_386.s       |   65 +
 vendor/golang.org/x/sys/unix/asm_linux_amd64.s     |   57 +
 vendor/golang.org/x/sys/unix/asm_linux_arm.s       |   56 +
 vendor/golang.org/x/sys/unix/asm_linux_arm64.s     |   52 +
 vendor/golang.org/x/sys/unix/asm_linux_mips64x.s   |   56 +
 vendor/golang.org/x/sys/unix/asm_linux_mipsx.s     |   54 +
 vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s    |   56 +
 vendor/golang.org/x/sys/unix/asm_linux_s390x.s     |   56 +
 vendor/golang.org/x/sys/unix/asm_netbsd_386.s      |   29 +
 vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s    |   29 +
 vendor/golang.org/x/sys/unix/asm_netbsd_arm.s      |   29 +
 vendor/golang.org/x/sys/unix/asm_openbsd_386.s     |   29 +
 vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s   |   29 +
 vendor/golang.org/x/sys/unix/asm_openbsd_arm.s     |   29 +
 vendor/golang.org/x/sys/unix/asm_solaris_amd64.s   |   17 +
 vendor/golang.org/x/sys/unix/bluetooth_linux.go    |   35 +
 vendor/golang.org/x/sys/unix/cap_freebsd.go        |  195 ++
 vendor/golang.org/x/sys/unix/constants.go          |   13 +
 vendor/golang.org/x/sys/unix/dev_aix_ppc.go        |   27 +
 vendor/golang.org/x/sys/unix/dev_aix_ppc64.go      |   29 +
 vendor/golang.org/x/sys/unix/dev_darwin.go         |   24 +
 vendor/golang.org/x/sys/unix/dev_dragonfly.go      |   30 +
 vendor/golang.org/x/sys/unix/dev_freebsd.go        |   30 +
 vendor/golang.org/x/sys/unix/dev_linux.go          |   42 +
 vendor/golang.org/x/sys/unix/dev_netbsd.go         |   29 +
 vendor/golang.org/x/sys/unix/dev_openbsd.go        |   29 +
 vendor/golang.org/x/sys/unix/dirent.go             |   17 +
 vendor/golang.org/x/sys/unix/endian_big.go         |    9 +
 vendor/golang.org/x/sys/unix/endian_little.go      |    9 +
 vendor/golang.org/x/sys/unix/env_unix.go           |   31 +
 vendor/golang.org/x/sys/unix/errors_freebsd_386.go |  227 ++
 .../golang.org/x/sys/unix/errors_freebsd_amd64.go  |  227 ++
 vendor/golang.org/x/sys/unix/errors_freebsd_arm.go |  226 ++
 vendor/golang.org/x/sys/unix/fcntl.go              |   32 +
 vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go  |   13 +
 vendor/golang.org/x/sys/unix/gccgo.go              |   62 +
 vendor/golang.org/x/sys/unix/gccgo_c.c             |   39 +
 vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go  |   20 +
 vendor/golang.org/x/sys/unix/ioctl.go              |   30 +
 vendor/golang.org/x/sys/unix/mkall.sh              |  204 ++
 vendor/golang.org/x/sys/unix/mkerrors.sh           |  654 +++++
 vendor/golang.org/x/sys/unix/mkpost.go             |   98 +
 vendor/golang.org/x/sys/unix/mksyscall.pl          |  341 +++
 vendor/golang.org/x/sys/unix/mksyscall_aix_ppc.pl  |  384 +++
 .../golang.org/x/sys/unix/mksyscall_aix_ppc64.pl   |  579 ++++
 vendor/golang.org/x/sys/unix/mksyscall_solaris.pl  |  294 +++
 vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl   |  265 ++
 vendor/golang.org/x/sys/unix/mksysnum_darwin.pl    |   39 +
 vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl |   50 +
 vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl   |   50 +
 vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl    |   58 +
 vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl   |   50 +
 vendor/golang.org/x/sys/unix/openbsd_pledge.go     |   95 +
 vendor/golang.org/x/sys/unix/pagesize_unix.go      |   15 +
 vendor/golang.org/x/sys/unix/race.go               |   30 +
 vendor/golang.org/x/sys/unix/race0.go              |   25 +
 vendor/golang.org/x/sys/unix/sockcmsg_linux.go     |   36 +
 vendor/golang.org/x/sys/unix/sockcmsg_unix.go      |  104 +
 vendor/golang.org/x/sys/unix/str.go                |   26 +
 vendor/golang.org/x/sys/unix/syscall.go            |   54 +
 vendor/golang.org/x/sys/unix/syscall_aix.go        |  547 ++++
 vendor/golang.org/x/sys/unix/syscall_aix_ppc.go    |   34 +
 vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go  |   34 +
 vendor/golang.org/x/sys/unix/syscall_bsd.go        |  624 +++++
 vendor/golang.org/x/sys/unix/syscall_darwin.go     |  700 +++++
 vendor/golang.org/x/sys/unix/syscall_darwin_386.go |   68 +
 .../golang.org/x/sys/unix/syscall_darwin_amd64.go  |   68 +
 vendor/golang.org/x/sys/unix/syscall_darwin_arm.go |   66 +
 .../golang.org/x/sys/unix/syscall_darwin_arm64.go  |   68 +
 vendor/golang.org/x/sys/unix/syscall_dragonfly.go  |  523 ++++
 .../x/sys/unix/syscall_dragonfly_amd64.go          |   52 +
 vendor/golang.org/x/sys/unix/syscall_freebsd.go    |  535 ++++
 .../golang.org/x/sys/unix/syscall_freebsd_386.go   |   52 +
 .../golang.org/x/sys/unix/syscall_freebsd_amd64.go |   52 +
 .../golang.org/x/sys/unix/syscall_freebsd_arm.go   |   52 +
 vendor/golang.org/x/sys/unix/syscall_linux.go      | 1628 ++++++++++++
 vendor/golang.org/x/sys/unix/syscall_linux_386.go  |  385 +++
 .../golang.org/x/sys/unix/syscall_linux_amd64.go   |  175 ++
 .../x/sys/unix/syscall_linux_amd64_gc.go           |   13 +
 vendor/golang.org/x/sys/unix/syscall_linux_arm.go  |  259 ++
 .../golang.org/x/sys/unix/syscall_linux_arm64.go   |  212 ++
 vendor/golang.org/x/sys/unix/syscall_linux_gc.go   |   14 +
 .../golang.org/x/sys/unix/syscall_linux_gc_386.go  |   16 +
 .../x/sys/unix/syscall_linux_gccgo_386.go          |   30 +
 .../x/sys/unix/syscall_linux_gccgo_arm.go          |   20 +
 .../golang.org/x/sys/unix/syscall_linux_mips64x.go |  214 ++
 .../golang.org/x/sys/unix/syscall_linux_mipsx.go   |  233 ++
 .../golang.org/x/sys/unix/syscall_linux_ppc64x.go  |  151 ++
 .../golang.org/x/sys/unix/syscall_linux_riscv64.go |  212 ++
 .../golang.org/x/sys/unix/syscall_linux_s390x.go   |  337 +++
 .../golang.org/x/sys/unix/syscall_linux_sparc64.go |  146 ++
 vendor/golang.org/x/sys/unix/syscall_netbsd.go     |  597 +++++
 vendor/golang.org/x/sys/unix/syscall_netbsd_386.go |   33 +
 .../golang.org/x/sys/unix/syscall_netbsd_amd64.go  |   33 +
 vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go |   33 +
 vendor/golang.org/x/sys/unix/syscall_openbsd.go    |  385 +++
 .../golang.org/x/sys/unix/syscall_openbsd_386.go   |   33 +
 .../golang.org/x/sys/unix/syscall_openbsd_amd64.go |   37 +
 .../golang.org/x/sys/unix/syscall_openbsd_arm.go   |   33 +
 vendor/golang.org/x/sys/unix/syscall_solaris.go    |  730 ++++++
 .../golang.org/x/sys/unix/syscall_solaris_amd64.go |   23 +
 vendor/golang.org/x/sys/unix/syscall_unix.go       |  394 +++
 vendor/golang.org/x/sys/unix/syscall_unix_gc.go    |   15 +
 vendor/golang.org/x/sys/unix/timestruct.go         |   82 +
 vendor/golang.org/x/sys/unix/types_aix.go          |  236 ++
 vendor/golang.org/x/sys/unix/types_darwin.go       |  277 ++
 vendor/golang.org/x/sys/unix/types_dragonfly.go    |  263 ++
 vendor/golang.org/x/sys/unix/types_freebsd.go      |  385 +++
 vendor/golang.org/x/sys/unix/types_netbsd.go       |  287 ++
 vendor/golang.org/x/sys/unix/types_openbsd.go      |  272 ++
 vendor/golang.org/x/sys/unix/types_solaris.go      |  266 ++
 vendor/golang.org/x/sys/unix/xattr_bsd.go          |  231 ++
 vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go    | 1372 ++++++++++
 vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go  | 1373 ++++++++++
 vendor/golang.org/x/sys/unix/zerrors_darwin_386.go | 1783 +++++++++++++
 .../golang.org/x/sys/unix/zerrors_darwin_amd64.go  | 1783 +++++++++++++
 vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go | 1783 +++++++++++++
 .../golang.org/x/sys/unix/zerrors_darwin_arm64.go  | 1783 +++++++++++++
 .../x/sys/unix/zerrors_dragonfly_amd64.go          | 1650 ++++++++++++
 .../golang.org/x/sys/unix/zerrors_freebsd_386.go   | 1793 +++++++++++++
 .../golang.org/x/sys/unix/zerrors_freebsd_amd64.go | 1794 +++++++++++++
 .../golang.org/x/sys/unix/zerrors_freebsd_arm.go   | 1802 +++++++++++++
 vendor/golang.org/x/sys/unix/zerrors_linux_386.go  | 2695 +++++++++++++++++++
 .../golang.org/x/sys/unix/zerrors_linux_amd64.go   | 2695 +++++++++++++++++++
 vendor/golang.org/x/sys/unix/zerrors_linux_arm.go  | 2701 +++++++++++++++++++
 .../golang.org/x/sys/unix/zerrors_linux_arm64.go   | 2686 +++++++++++++++++++
 vendor/golang.org/x/sys/unix/zerrors_linux_mips.go | 2702 +++++++++++++++++++
 .../golang.org/x/sys/unix/zerrors_linux_mips64.go  | 2702 +++++++++++++++++++
 .../x/sys/unix/zerrors_linux_mips64le.go           | 2702 +++++++++++++++++++
 .../golang.org/x/sys/unix/zerrors_linux_mipsle.go  | 2702 +++++++++++++++++++
 .../golang.org/x/sys/unix/zerrors_linux_ppc64.go   | 2755 ++++++++++++++++++++
 .../golang.org/x/sys/unix/zerrors_linux_ppc64le.go | 2755 ++++++++++++++++++++
 .../golang.org/x/sys/unix/zerrors_linux_riscv64.go | 2682 +++++++++++++++++++
 .../golang.org/x/sys/unix/zerrors_linux_s390x.go   | 2755 ++++++++++++++++++++
 .../golang.org/x/sys/unix/zerrors_linux_sparc64.go | 2150 +++++++++++++++
 vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go | 1772 +++++++++++++
 .../golang.org/x/sys/unix/zerrors_netbsd_amd64.go  | 1762 +++++++++++++
 vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go | 1751 +++++++++++++
 .../golang.org/x/sys/unix/zerrors_openbsd_386.go   | 1654 ++++++++++++
 .../golang.org/x/sys/unix/zerrors_openbsd_amd64.go | 1765 +++++++++++++
 .../golang.org/x/sys/unix/zerrors_openbsd_arm.go   | 1656 ++++++++++++
 .../golang.org/x/sys/unix/zerrors_solaris_amd64.go | 1532 +++++++++++
 vendor/golang.org/x/sys/unix/zptrace386_linux.go   |   80 +
 vendor/golang.org/x/sys/unix/zptracearm_linux.go   |   41 +
 vendor/golang.org/x/sys/unix/zptracemips_linux.go  |   50 +
 .../golang.org/x/sys/unix/zptracemipsle_linux.go   |   50 +
 vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go   | 1450 +++++++++++
 vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go | 1408 ++++++++++
 .../golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go | 1162 +++++++++
 .../x/sys/unix/zsyscall_aix_ppc64_gccgo.go         | 1042 ++++++++
 .../golang.org/x/sys/unix/zsyscall_darwin_386.go   | 1769 +++++++++++++
 .../golang.org/x/sys/unix/zsyscall_darwin_amd64.go | 1769 +++++++++++++
 .../golang.org/x/sys/unix/zsyscall_darwin_arm.go   | 1769 +++++++++++++
 .../golang.org/x/sys/unix/zsyscall_darwin_arm64.go | 1769 +++++++++++++
 .../x/sys/unix/zsyscall_dragonfly_amd64.go         | 1508 +++++++++++
 .../golang.org/x/sys/unix/zsyscall_freebsd_386.go  | 1935 ++++++++++++++
 .../x/sys/unix/zsyscall_freebsd_amd64.go           | 1935 ++++++++++++++
 .../golang.org/x/sys/unix/zsyscall_freebsd_arm.go  | 1935 ++++++++++++++
 vendor/golang.org/x/sys/unix/zsyscall_linux_386.go | 2131 +++++++++++++++
 .../golang.org/x/sys/unix/zsyscall_linux_amd64.go  | 2313 ++++++++++++++++
 vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go | 2233 ++++++++++++++++
 .../golang.org/x/sys/unix/zsyscall_linux_arm64.go  | 2140 +++++++++++++++
 .../golang.org/x/sys/unix/zsyscall_linux_mips.go   | 2311 ++++++++++++++++
 .../golang.org/x/sys/unix/zsyscall_linux_mips64.go | 2282 ++++++++++++++++
 .../x/sys/unix/zsyscall_linux_mips64le.go          | 2282 ++++++++++++++++
 .../golang.org/x/sys/unix/zsyscall_linux_mipsle.go | 2311 ++++++++++++++++
 .../golang.org/x/sys/unix/zsyscall_linux_ppc64.go  | 2360 +++++++++++++++++
 .../x/sys/unix/zsyscall_linux_ppc64le.go           | 2360 +++++++++++++++++
 .../x/sys/unix/zsyscall_linux_riscv64.go           | 2140 +++++++++++++++
 .../golang.org/x/sys/unix/zsyscall_linux_s390x.go  | 2130 +++++++++++++++
 .../x/sys/unix/zsyscall_linux_sparc64.go           | 2172 +++++++++++++++
 .../golang.org/x/sys/unix/zsyscall_netbsd_386.go   | 1653 ++++++++++++
 .../golang.org/x/sys/unix/zsyscall_netbsd_amd64.go | 1653 ++++++++++++
 .../golang.org/x/sys/unix/zsyscall_netbsd_arm.go   | 1653 ++++++++++++
 .../golang.org/x/sys/unix/zsyscall_openbsd_386.go  | 1508 +++++++++++
 .../x/sys/unix/zsyscall_openbsd_amd64.go           | 1508 +++++++++++
 .../golang.org/x/sys/unix/zsyscall_openbsd_arm.go  | 1508 +++++++++++
 .../x/sys/unix/zsyscall_solaris_amd64.go           | 1953 ++++++++++++++
 .../golang.org/x/sys/unix/zsysctl_openbsd_386.go   |  270 ++
 .../golang.org/x/sys/unix/zsysctl_openbsd_amd64.go |  270 ++
 .../golang.org/x/sys/unix/zsysctl_openbsd_arm.go   |  270 ++
 vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go |  436 ++++
 .../golang.org/x/sys/unix/zsysnum_darwin_amd64.go  |  436 ++++
 vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go |  436 ++++
 .../golang.org/x/sys/unix/zsysnum_darwin_arm64.go  |  436 ++++
 .../x/sys/unix/zsysnum_dragonfly_amd64.go          |  315 +++
 .../golang.org/x/sys/unix/zsysnum_freebsd_386.go   |  403 +++
 .../golang.org/x/sys/unix/zsysnum_freebsd_amd64.go |  403 +++
 .../golang.org/x/sys/unix/zsysnum_freebsd_arm.go   |  403 +++
 vendor/golang.org/x/sys/unix/zsysnum_linux_386.go  |  392 +++
 .../golang.org/x/sys/unix/zsysnum_linux_amd64.go   |  344 +++
 vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go  |  363 +++
 .../golang.org/x/sys/unix/zsysnum_linux_arm64.go   |  287 ++
 vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go |  377 +++
 .../golang.org/x/sys/unix/zsysnum_linux_mips64.go  |  337 +++
 .../x/sys/unix/zsysnum_linux_mips64le.go           |  337 +++
 .../golang.org/x/sys/unix/zsysnum_linux_mipsle.go  |  377 +++
 .../golang.org/x/sys/unix/zsysnum_linux_ppc64.go   |  375 +++
 .../golang.org/x/sys/unix/zsysnum_linux_ppc64le.go |  375 +++
 .../golang.org/x/sys/unix/zsysnum_linux_riscv64.go |  286 ++
 .../golang.org/x/sys/unix/zsysnum_linux_s390x.go   |  337 +++
 .../golang.org/x/sys/unix/zsysnum_linux_sparc64.go |  348 +++
 vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go |  274 ++
 .../golang.org/x/sys/unix/zsysnum_netbsd_amd64.go  |  274 ++
 vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go |  274 ++
 .../golang.org/x/sys/unix/zsysnum_openbsd_386.go   |  207 ++
 .../golang.org/x/sys/unix/zsysnum_openbsd_amd64.go |  218 ++
 .../golang.org/x/sys/unix/zsysnum_openbsd_arm.go   |  213 ++
 vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go     |  345 +++
 vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go   |  354 +++
 vendor/golang.org/x/sys/unix/ztypes_darwin_386.go  |  489 ++++
 .../golang.org/x/sys/unix/ztypes_darwin_amd64.go   |  499 ++++
 vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go  |  490 ++++
 .../golang.org/x/sys/unix/ztypes_darwin_arm64.go   |  499 ++++
 .../x/sys/unix/ztypes_dragonfly_amd64.go           |  469 ++++
 vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go |  536 ++++
 .../golang.org/x/sys/unix/ztypes_freebsd_amd64.go  |  539 ++++
 vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go |  539 ++++
 vendor/golang.org/x/sys/unix/ztypes_linux_386.go   | 1988 ++++++++++++++
 vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go | 2010 ++++++++++++++
 vendor/golang.org/x/sys/unix/ztypes_linux_arm.go   | 1978 ++++++++++++++
 vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go | 1989 ++++++++++++++
 vendor/golang.org/x/sys/unix/ztypes_linux_mips.go  | 1983 ++++++++++++++
 .../golang.org/x/sys/unix/ztypes_linux_mips64.go   | 1991 ++++++++++++++
 .../golang.org/x/sys/unix/ztypes_linux_mips64le.go | 1991 ++++++++++++++
 .../golang.org/x/sys/unix/ztypes_linux_mipsle.go   | 1983 ++++++++++++++
 vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go | 1999 ++++++++++++++
 .../golang.org/x/sys/unix/ztypes_linux_ppc64le.go  | 1999 ++++++++++++++
 .../golang.org/x/sys/unix/ztypes_linux_riscv64.go  | 2016 ++++++++++++++
 vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go | 2016 ++++++++++++++
 .../golang.org/x/sys/unix/ztypes_linux_sparc64.go  |  690 +++++
 vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go  |  458 ++++
 .../golang.org/x/sys/unix/ztypes_netbsd_amd64.go   |  465 ++++
 vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go  |  463 ++++
 vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go |  558 ++++
 .../golang.org/x/sys/unix/ztypes_openbsd_amd64.go  |  558 ++++
 vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go |  551 ++++
 .../golang.org/x/sys/unix/ztypes_solaris_amd64.go  |  442 ++++
 368 files changed, 190073 insertions(+), 8785 deletions(-)

diff --git a/cli/completer.go b/cli/completer.go
index 8afbc7d..2345bbf 100644
--- a/cli/completer.go
+++ b/cli/completer.go
@@ -21,18 +21,12 @@ import (
 	"fmt"
 	"sort"
 	"strings"
-	"unicode"
 
 	"github.com/apache/cloudstack-cloudmonkey/cmd"
 	"github.com/apache/cloudstack-cloudmonkey/config"
-
-	"github.com/chzyer/readline/runes"
+	prompt "github.com/c-bata/go-prompt"
 )
 
-type autoCompleter struct {
-	Config *config.Config
-}
-
 func buildAPICacheMap(apiMap map[string][]*config.API) map[string][]*config.API {
 	for _, cmd := range cmd.AllCommands() {
 		verb := cmd.Name
@@ -66,207 +60,170 @@ func buildAPICacheMap(apiMap map[string][]*config.API) map[string][]*config.API
 	return apiMap
 }
 
-func trimSpaceLeft(in []rune) []rune {
-	firstIndex := len(in)
-	for i, r := range in {
-		if unicode.IsSpace(r) == false {
-			firstIndex = i
-			break
+func inArray(s string, array []string) bool {
+	for _, item := range array {
+		if s == item {
+			return true
 		}
 	}
-	return in[firstIndex:]
+	return false
 }
 
-func doInternal(line []rune, pos int, lineLen int, argName []rune) (newLine [][]rune, offset int) {
-	offset = lineLen
-	if lineLen >= len(argName) {
-		if runes.HasPrefix(line, argName) {
-			if lineLen == len(argName) {
-				newLine = append(newLine, []rune{' '})
-			} else {
-				newLine = append(newLine, argName)
-			}
-			offset = offset - len(argName) - 1
-		}
-	} else {
-		if runes.HasPrefix(argName, line) {
-			newLine = append(newLine, argName[offset:])
-		}
-	}
-	return
-}
+var cachedResponse map[string]interface{}
 
-func (t *autoCompleter) Do(line []rune, pos int) (options [][]rune, offset int) {
-	apiMap := buildAPICacheMap(t.Config.GetAPIVerbMap())
-
-	var verbs []string
-	for verb := range apiMap {
-		verbs = append(verbs, verb)
-		sort.Slice(apiMap[verb], func(i, j int) bool {
-			return apiMap[verb][i].Name < apiMap[verb][j].Name
-		})
+func completer(in prompt.Document) []prompt.Suggest {
+	if in.TextBeforeCursor() == "" {
+		return []prompt.Suggest{}
 	}
-	sort.Strings(verbs)
-
-	line = trimSpaceLeft(line[:pos])
+	args := strings.Split(strings.TrimLeft(in.TextBeforeCursor(), " "), " ")
 
-	// Auto-complete verb
-	var verbFound string
-	for _, verb := range verbs {
-		search := verb + " "
-		if !runes.HasPrefix(line, []rune(search)) {
-			sLine, sOffset := doInternal(line, pos, len(line), []rune(search))
-			options = append(options, sLine...)
-			offset = sOffset
-		} else {
-			verbFound = verb
-			break
+	for i := range args {
+		if args[i] == "|" {
+			return []prompt.Suggest{}
 		}
 	}
-	if len(verbFound) == 0 {
-		return
-	}
 
-	// Auto-complete noun
-	var nounFound string
-	line = trimSpaceLeft(line[len(verbFound):])
-	for _, api := range apiMap[verbFound] {
-		search := api.Noun + " "
-		if !runes.HasPrefix(line, []rune(search)) {
-			sLine, sOffset := doInternal(line, pos, len(line), []rune(search))
-			options = append(options, sLine...)
-			offset = sOffset
-		} else {
-			nounFound = api.Noun
-			break
-		}
-	}
-	if len(nounFound) == 0 {
-		return
-	}
+	w := in.GetWordBeforeCursor()
+	s := []prompt.Suggest{}
+	apiMap := buildAPICacheMap(cfg.GetAPIVerbMap())
 
-	// Find API
-	var apiFound *config.API
-	for _, api := range apiMap[verbFound] {
-		if api.Noun == nounFound {
-			apiFound = api
-			break
+	if len(args) <= 1 {
+		for verb := range apiMap {
+			s = append(s, prompt.Suggest{
+				Text: verb,
+			})
 		}
-	}
-	if apiFound == nil {
-		return
-	}
-
-	// Auto-complete api args
-	splitLine := strings.Split(string(line), " ")
-	line = trimSpaceLeft([]rune(splitLine[len(splitLine)-1]))
-	for _, arg := range apiFound.Args {
-		search := arg.Name
-		if !runes.HasPrefix(line, []rune(search)) {
-			sLine, sOffset := doInternal(line, pos, len(line), []rune(search))
-			options = append(options, sLine...)
-			offset = sOffset
-		} else {
-			if arg.Type == "boolean" {
-				options = [][]rune{[]rune("true "), []rune("false ")}
-				offset = 0
-				return
-			}
-			if arg.Type == config.FAKE && arg.Name == "filter=" {
-				options = [][]rune{}
-				offset = 0
-				for _, key := range apiFound.ResponseKeys {
-					options = append(options, []rune(key))
-				}
-				return
-			}
-
-			argName := strings.Replace(arg.Name, "=", "", -1)
-			var autocompleteAPI *config.API
-			var relatedNoun string
-			if argName == "id" || argName == "ids" {
-				relatedNoun = apiFound.Noun
-				if apiFound.Verb != "list" {
-					relatedNoun += "s"
-				}
-			} else if argName == "account" {
-				relatedNoun = "accounts"
-			} else {
-				relatedNoun = strings.Replace(strings.Replace(argName, "ids", "", -1), "id", "", -1) + "s"
-			}
-			for _, related := range apiMap["list"] {
-				if relatedNoun == related.Noun {
-					autocompleteAPI = related
-					break
-				}
-			}
-
-			if autocompleteAPI == nil {
-				return nil, 0
+	} else if len(args) == 2 {
+		for _, api := range apiMap[args[0]] {
+			s = append(s, prompt.Suggest{
+				Text:        api.Noun,
+				Description: api.Description,
+			})
+		}
+	} else {
+		var apiFound *config.API
+		for _, api := range apiMap[args[0]] {
+			if api.Noun == args[1] {
+				apiFound = api
+				break
 			}
-
-			r := cmd.NewRequest(nil, completer.Config, nil)
-			autocompleteAPIArgs := []string{"listall=true"}
-			if autocompleteAPI.Noun == "templates" {
-				autocompleteAPIArgs = append(autocompleteAPIArgs, "templatefilter=executable")
+		}
+		opts := []string{}
+		for _, arg := range args[2:] {
+			if strings.Contains(arg, "=") {
+				opts = append(opts, strings.Split(arg, "=")[0])
 			}
-
-			fmt.Println("")
-			spinner := t.Config.StartSpinner("fetching options, please wait...")
-			response, _ := cmd.NewAPIRequest(r, autocompleteAPI.Name, autocompleteAPIArgs, false)
-			t.Config.StopSpinner(spinner)
-
-			var autocompleteOptions []selectOption
-			for _, v := range response {
-				switch obj := v.(type) {
-				case []interface{}:
-					if obj == nil {
+		}
+		if apiFound != nil {
+			if strings.HasSuffix(w, "=") {
+				var argFound *config.APIArg
+				for _, arg := range apiFound.Args {
+					if arg.Name+"=" == w {
+						argFound = arg
 						break
 					}
-					for _, item := range obj {
-						resource, ok := item.(map[string]interface{})
-						if !ok {
-							continue
-						}
-						opt := selectOption{}
-						if resource["id"] != nil {
-							opt.ID = resource["id"].(string)
-						}
-						if resource["name"] != nil {
-							opt.Name = resource["name"].(string)
-						} else if resource["username"] != nil {
-							opt.Name = resource["username"].(string)
+				}
+				if argFound != nil {
+					switch argFound.Type {
+					case "boolean":
+						s = append(s, prompt.Suggest{
+							Text: "true",
+						})
+						s = append(s, prompt.Suggest{
+							Text: "false",
+						})
+					case config.FAKE:
+						// No suggestions for filter
+					default:
+						argName := argFound.Name
+						var optionsAPI *config.API
+						var relatedNoun string
+						if argName == "id" || argName == "ids" {
+							relatedNoun = apiFound.Noun
+							if apiFound.Verb != "list" {
+								relatedNoun += "s"
+							}
+						} else if argName == "account" {
+							relatedNoun = "accounts"
+						} else {
+							relatedNoun = strings.Replace(strings.Replace(argName, "ids", "", -1), "id", "", -1) + "s"
 						}
-						if resource["displaytext"] != nil {
-							opt.Detail = resource["displaytext"].(string)
+
+						for _, related := range apiMap["list"] {
+							if relatedNoun == related.Noun {
+								optionsAPI = related
+								break
+							}
 						}
+						if optionsAPI != nil {
+							r := cmd.NewRequest(nil, cfg, nil)
+							optionsArgs := []string{"listall=true"}
+							if optionsAPI.Noun == "templates" {
+								optionsArgs = append(optionsArgs, "templatefilter=executable")
+							}
+
+							if cachedResponse == nil {
+								fmt.Println("")
+								spinner := cfg.StartSpinner("fetching options, please wait...")
+								cachedResponse, _ = cmd.NewAPIRequest(r, optionsAPI.Name, optionsArgs, false)
+								cfg.StopSpinner(spinner)
+							}
+
+							for _, v := range cachedResponse {
+								switch obj := v.(type) {
+								case []interface{}:
+									if obj == nil {
+										break
+									}
+									for _, item := range obj {
+										resource, ok := item.(map[string]interface{})
+										if !ok {
+											continue
+										}
+										opt := prompt.Suggest{}
+										if resource["id"] != nil {
+											opt.Text = resource["id"].(string)
+										}
+										if resource["name"] != nil {
+											opt.Description = resource["name"].(string)
+										} else if resource["username"] != nil {
+											opt.Description = resource["username"].(string)
+										}
+										if opt.Text == "" {
+											opt.Text = opt.Description
+										}
+										s = append(s, opt)
+									}
+									break
+								}
+							}
 
-						autocompleteOptions = append(autocompleteOptions, opt)
+						}
+					}
+					for idx, es := range s {
+						s[idx].Text = w + es.Text
 					}
-					break
+					return s
 				}
-			}
 
-			var selected string
-			if len(autocompleteOptions) > 1 {
-				sort.Slice(autocompleteOptions, func(i, j int) bool {
-					return autocompleteOptions[i].Name < autocompleteOptions[j].Name
-				})
-				selectedOption := showSelector(autocompleteOptions)
-				if strings.HasSuffix(arg.Name, "id=") || strings.HasSuffix(arg.Name, "ids=") {
-					selected = selectedOption.ID
-				} else {
-					selected = selectedOption.Name
-				}
 			} else {
-				if len(autocompleteOptions) == 1 {
-					selected = autocompleteOptions[0].ID
+				for _, arg := range apiFound.Args {
+					if inArray(arg.Name, opts) {
+						continue
+					}
+					s = append(s, prompt.Suggest{
+						Text:        arg.Name,
+						Description: arg.Description,
+					})
 				}
+				cachedResponse = nil
 			}
-			options = [][]rune{[]rune(selected + " ")}
-			offset = 0
 		}
 	}
 
-	return options, offset
+	sort.Slice(s, func(i, j int) bool {
+		return s[i].Text < s[j].Text
+	})
+
+	return prompt.FilterHasPrefix(s, w, true)
 }
diff --git a/cli/exec.go b/cli/exec.go
index 0857672..1c14418 100644
--- a/cli/exec.go
+++ b/cli/exec.go
@@ -18,12 +18,32 @@
 package cli
 
 import (
+	"fmt"
+	"strings"
+
 	"github.com/apache/cloudstack-cloudmonkey/cmd"
-	"github.com/apache/cloudstack-cloudmonkey/config"
+	"github.com/mattn/go-shellwords"
 )
 
+func ExecLine(line string) error {
+	shellwords.ParseEnv = true
+	parser := shellwords.NewParser()
+	args, err := parser.Parse(line)
+	if err != nil {
+		fmt.Println("🙈 Failed to parse line:", err)
+		return err
+	}
+
+	if parser.Position > 0 {
+		line = fmt.Sprintf("shell %s %v", cfg.Name(), line)
+		args = strings.Split(line, " ")
+	}
+
+	return ExecCmd(args)
+}
+
 // ExecCmd executes a single provided command
-func ExecCmd(cfg *config.Config, args []string) error {
+func ExecCmd(args []string) error {
 	if len(args) < 1 {
 		return nil
 	}
diff --git a/cmd/version.go b/cli/history.go
similarity index 71%
copy from cmd/version.go
copy to cli/history.go
index 09f48b8..7e2ca3f 100644
--- a/cmd/version.go
+++ b/cli/history.go
@@ -14,19 +14,24 @@
 // KIND, either express or implied.  See the License for the
 // specific language governing permissions and limitations
 // under the License.
+package cli
 
-package cmd
+import (
+	"bufio"
+	"os"
+)
 
-import "fmt"
+func readLines(path string) ([]string, error) {
+	file, err := os.Open(path)
+	if err != nil {
+		return nil, err
+	}
+	defer file.Close()
 
-func init() {
-	AddCommand(&Command{
-		Name: "version",
-		Help: "Version info",
-		Handle: func(r *Request) error {
-			fmt.Println(r.Config.Name(), r.Config.Version())
-			fmt.Println("Copyright 2018 The Apache Software Foundation (http://www.apache.org/)")
-			return nil
-		},
-	})
+	var lines []string
+	scanner := bufio.NewScanner(file)
+	for scanner.Scan() {
+		lines = append(lines, scanner.Text())
+	}
+	return lines, scanner.Err()
 }
diff --git a/cli/selector.go b/cli/selector.go
deleted file mode 100644
index d40caf7..0000000
--- a/cli/selector.go
+++ /dev/null
@@ -1,105 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-package cli
-
-import (
-	"fmt"
-	"strings"
-
-	"github.com/chzyer/readline"
-	"github.com/manifoldco/promptui"
-)
-
-type selectOption struct {
-	ID     string
-	Name   string
-	Detail string
-}
-
-type selector struct {
-	InUse bool
-}
-
-var optionSelector selector
-
-func init() {
-	optionSelector = selector{
-		InUse: false,
-	}
-}
-
-func (s selector) lock() {
-	s.InUse = true
-}
-
-func (s selector) unlock() {
-	s.InUse = false
-}
-
-func showSelector(options []selectOption) selectOption {
-	if optionSelector.InUse {
-		return selectOption{}
-	}
-	optionSelector.lock()
-	defer optionSelector.unlock()
-
-	templates := &promptui.SelectTemplates{
-		Label:    "{{ . | magenta }}",
-		Active:   "▶  {{ .Name | cyan }} ({{ .ID | green }})",
-		Inactive: "   {{ .Name }} ({{ .ID }})",
-		Selected: "Selected option: {{ .Name | cyan }} ({{ .ID | green }})",
-		Details: `
---------- Current Selection ----------
-{{ "ID:" | faint }}  {{ .ID }}
-{{ "Name:" | faint }} {{ .Name }}
-{{ "Info:" | faint }}  {{ .Detail }}`,
-	}
-
-	searcher := func(input string, index int) bool {
-		pepper := options[index]
-		name := strings.Replace(strings.ToLower(pepper.Name), " ", "", -1)
-		input = strings.Replace(strings.ToLower(input), " ", "", -1)
-
-		return strings.Contains(name, input)
-	}
-
-	prompt := promptui.Select{
-		Label:             "Use the arrow keys to navigate: ↓ ↑ → ← press / to toggle 🔍 search",
-		Items:             options,
-		Templates:         templates,
-		Size:              5,
-		Searcher:          searcher,
-		StartInSearchMode: false,
-		Keys: &promptui.SelectKeys{
-			Prev:     promptui.Key{Code: readline.CharPrev, Display: "↑"},
-			Next:     promptui.Key{Code: readline.CharNext, Display: "↓"},
-			PageUp:   promptui.Key{Code: readline.CharBackward, Display: "←"},
-			PageDown: promptui.Key{Code: readline.CharForward, Display: "→"},
-			Search:   promptui.Key{Code: '/', Display: "/"},
-		},
-	}
-
-	i, _, err := prompt.Run()
-
-	if err != nil {
-		fmt.Printf("Prompt failed %v\n", err)
-		return selectOption{}
-	}
-
-	return options[i]
-}
diff --git a/cli/shell.go b/cli/shell.go
index e875c3f..f9550d1 100644
--- a/cli/shell.go
+++ b/cli/shell.go
@@ -19,27 +19,30 @@ package cli
 
 import (
 	"fmt"
-	"io"
 	"os"
-	"strings"
 
 	"github.com/apache/cloudstack-cloudmonkey/config"
-	"github.com/chzyer/readline"
-	"github.com/mattn/go-shellwords"
+	"github.com/c-bata/go-prompt"
 )
 
-var completer *autoCompleter
-var shell *readline.Instance
+var cfg *config.Config
+
+func executor(in string) {
+	if err := ExecLine(in); err != nil {
+		fmt.Println("🙈 Error:", err)
+	}
+}
+
+func prefix() (string, bool) {
+	return cfg.GetPrompt(), true
+}
 
 // ExecShell starts a shell
 func ExecShell(sysArgs []string) {
-	cfg := config.NewConfig()
-	completer = &autoCompleter{
-		Config: cfg,
-	}
+	cfg = config.NewConfig()
 
 	if len(sysArgs) > 0 {
-		err := ExecCmd(cfg, sysArgs)
+		err := ExecCmd(sysArgs)
 		if err != nil {
 			fmt.Println("🙈 Error:", err)
 			os.Exit(1)
@@ -47,61 +50,31 @@ func ExecShell(sysArgs []string) {
 		os.Exit(0)
 	}
 
-	shell, err := readline.NewEx(&readline.Config{
-		Prompt:            cfg.GetPrompt(),
-		HistoryFile:       cfg.HistoryFile,
-		AutoComplete:      completer,
-		InterruptPrompt:   "^C",
-		EOFPrompt:         "exit",
-		VimMode:           false,
-		HistorySearchFold: true,
-		FuncFilterInputRune: func(r rune) (rune, bool) {
-			switch r {
-			case readline.CharCtrlZ:
-				return r, false
-			}
-			return r, true
-		},
-	})
-
-	if err != nil {
-		panic(err)
-	}
-	defer shell.Close()
-
 	cfg.HasShell = true
 	cfg.PrintHeader()
 
-	for {
-		shell.SetPrompt(cfg.GetPrompt())
-		line, err := shell.Readline()
-		if err == readline.ErrInterrupt {
-			continue
-		} else if err == io.EOF {
-			break
-		}
+	lines, _ := readLines(cfg.HistoryFile)
 
-		line = strings.TrimSpace(line)
-		if len(line) < 1 {
-			continue
-		}
-
-		shellwords.ParseEnv = true
-		parser := shellwords.NewParser()
-		args, err := parser.Parse(line)
-		if err != nil {
-			fmt.Println("Failed to parse line:", err)
-			continue
-		}
-
-		if parser.Position > 0 {
-			line = fmt.Sprintf("shell %s %v", cfg.Name(), line)
-			args = strings.Split(line, " ")
-		}
-
-		err = ExecCmd(cfg, args)
-		if err != nil {
-			fmt.Println("🙈 Error:", err)
-		}
-	}
+	shell := prompt.New(
+		executor,
+		completer,
+		prompt.OptionTitle("cloudmonkey"),
+		prompt.OptionPrefix(cfg.GetPrompt()),
+		prompt.OptionLivePrefix(prefix),
+		prompt.OptionMaxSuggestion(8),
+		prompt.OptionHistory(lines),
+		prompt.OptionPrefixTextColor(prompt.DefaultColor),
+		prompt.OptionPreviewSuggestionTextColor(prompt.DarkBlue),
+		prompt.OptionSelectedSuggestionTextColor(prompt.White),
+		prompt.OptionSelectedSuggestionBGColor(prompt.DarkBlue),
+		prompt.OptionSelectedDescriptionTextColor(prompt.White),
+		prompt.OptionSelectedDescriptionBGColor(prompt.DarkGray),
+		prompt.OptionSuggestionTextColor(prompt.Black),
+		prompt.OptionSuggestionBGColor(prompt.White),
+		prompt.OptionDescriptionTextColor(prompt.Black),
+		prompt.OptionDescriptionBGColor(prompt.LightGray),
+		prompt.OptionScrollbarThumbColor(prompt.DarkBlue),
+		prompt.OptionScrollbarBGColor(prompt.LightGray),
+	)
+	shell.Run()
 }
diff --git a/cmd/exit.go b/cmd/exit.go
index 104c5b2..0712c59 100644
--- a/cmd/exit.go
+++ b/cmd/exit.go
@@ -19,8 +19,6 @@ package cmd
 
 import (
 	"os"
-
-	"github.com/manifoldco/promptui"
 )
 
 func init() {
@@ -28,14 +26,7 @@ func init() {
 		Name: "exit",
 		Help: "Exits",
 		Handle: func(r *Request) error {
-			prompt := promptui.Prompt{
-				Label:     "Do you really want to exit ([y]/n)?",
-				IsConfirm: true,
-			}
-
-			if result, _ := prompt.Run(); result == "y" {
-				os.Exit(0)
-			}
+			os.Exit(0)
 			return nil
 		},
 	})
diff --git a/cmd/login.go b/cmd/login.go
deleted file mode 100644
index bb1655d..0000000
--- a/cmd/login.go
+++ /dev/null
@@ -1,93 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-package cmd
-
-import (
-	"errors"
-	"fmt"
-
-	"github.com/manifoldco/promptui"
-)
-
-func init() {
-	AddCommand(&Command{
-		Name: "login",
-		Help: "Log in to your account",
-		Handle: func(r *Request) error {
-			if len(r.Args) > 0 {
-				return errors.New("this does not accept any additional arguments")
-			}
-
-			validate := func(input string) error {
-				if len(input) < 1 {
-					return errors.New("You have not entered anything")
-				}
-				return nil
-			}
-
-			// username
-			prompt := promptui.Prompt{
-				Label:    "Username",
-				Validate: validate,
-				Default:  "",
-			}
-			username, err := prompt.Run()
-			if err != nil {
-				fmt.Printf("Prompt failed %v\n", err)
-				return nil
-			}
-
-			//password
-			prompt = promptui.Prompt{
-				Label:    "Password",
-				Validate: validate,
-				Mask:     '*',
-			}
-			password, err := prompt.Run()
-			if err != nil {
-				fmt.Printf("Prompt failed %v\n", err)
-				return nil
-			}
-
-			// domain
-			prompt = promptui.Prompt{
-				Label:    "Domain",
-				Validate: validate,
-				Default:  "/",
-			}
-			domain, err := prompt.Run()
-			if err != nil {
-				fmt.Printf("Prompt failed %v\n", err)
-				return nil
-			}
-
-			r.Config.ActiveProfile.Username = username
-			r.Config.ActiveProfile.Password = password
-			r.Config.ActiveProfile.Domain = domain
-
-			if sessionKey, err := Login(r); err != nil || sessionKey == "" {
-				fmt.Println("Failed to login, check credentials and try again.")
-			} else {
-				fmt.Println("Successfully logged in and saved credentials to the server profile.")
-				r.Config.UpdateConfig("", "")
-			}
-
-			return nil
-		},
-	})
-}
diff --git a/cmd/version.go b/cmd/version.go
index 09f48b8..15bcfd9 100644
--- a/cmd/version.go
+++ b/cmd/version.go
@@ -24,8 +24,7 @@ func init() {
 		Name: "version",
 		Help: "Version info",
 		Handle: func(r *Request) error {
-			fmt.Println(r.Config.Name(), r.Config.Version())
-			fmt.Println("Copyright 2018 The Apache Software Foundation (http://www.apache.org/)")
+			fmt.Println(r.Config.About())
 			return nil
 		},
 	})
diff --git a/config/about.go b/config/about.go
index af7a49b..6438a05 100644
--- a/config/about.go
+++ b/config/about.go
@@ -21,18 +21,16 @@ import "fmt"
 
 // Name of the CLI
 func (c *Config) Name() string {
-	return "Apache CloudStack 🐵 cloudmonkey"
+	return "cmk"
 }
 
-// Version of the CLI
-func (c *Config) Version() string {
-	return "6.0.0-alpha1"
+// About CLI
+func (c *Config) About() string {
+	return "Apache CloudStack 🐵 CloudMonkey 6.0.0-beta1"
 }
 
 // PrintHeader prints startup message in CLI mode
 func (c *Config) PrintHeader() {
-	fmt.Println(c.Name(), c.Version())
-	fmt.Println("Type \"help\" for details, \"sync\" to update API cache or press tab to list options")
-	fmt.Println("Report issues here: https://github.com/apache/cloudstack-cloudmonkey/issues")
-	fmt.Println()
+	fmt.Println(c.About())
+	fmt.Println("Report issues: https://github.com/apache/cloudstack-cloudmonkey/issues")
 }
diff --git a/config/cache.go b/config/cache.go
index 2037ff7..8e3cc12 100644
--- a/config/cache.go
+++ b/config/cache.go
@@ -136,7 +136,7 @@ func (c *Config) UpdateCache(response map[string]interface{}) interface{} {
 				sort.Strings(related)
 			}
 			apiArgs = append(apiArgs, &APIArg{
-				Name:        apiArg["name"].(string) + "=",
+				Name:        apiArg["name"].(string),
 				Type:        apiArg["type"].(string),
 				Required:    apiArg["required"].(bool),
 				Related:     related,
@@ -146,7 +146,7 @@ func (c *Config) UpdateCache(response map[string]interface{}) interface{} {
 
 		// Add filter arg
 		apiArgs = append(apiArgs, &APIArg{
-			Name:        "filter=",
+			Name:        "filter",
 			Type:        FAKE,
 			Description: "cloudmonkey specific response key filtering",
 		})
diff --git a/go.mod b/go.mod
index 3f5dec8..523a813 100644
--- a/go.mod
+++ b/go.mod
@@ -19,19 +19,20 @@ module github.com/apache/cloudstack-cloudmonkey
 
 require (
 	github.com/briandowns/spinner v0.0.0-20181018151057-dd69c579ff20
-	github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e
+	github.com/c-bata/go-prompt v0.2.2
 	github.com/fatih/color v1.7.0 // indirect
-	github.com/golang/lint v0.0.0-20181011164241-5906bd5c48cd // indirect
-	github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a // indirect
-	github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a // indirect
-	github.com/manifoldco/promptui v0.3.1
+	github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 // indirect
+	github.com/jtolds/gls v4.2.1+incompatible // indirect
 	github.com/mattn/go-colorable v0.0.9 // indirect
 	github.com/mattn/go-isatty v0.0.4 // indirect
 	github.com/mattn/go-runewidth v0.0.3 // indirect
 	github.com/mattn/go-shellwords v1.0.3
+	github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104 // indirect
 	github.com/mitchellh/go-homedir v1.0.0
 	github.com/olekukonko/tablewriter v0.0.0-20180912035003-be2c049b30cc
-	golang.org/x/lint v0.0.0-20181011164241-5906bd5c48cd // indirect
-	golang.org/x/tools v0.0.0-20181019174312-a019f6b7c5bf // indirect
+	github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5 // indirect
+	github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d // indirect
+	github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a // indirect
+	golang.org/x/sys v0.0.0-20181019160139-8e24a49d80f8 // indirect
 	gopkg.in/ini.v1 v1.39.0
 )
diff --git a/go.sum b/go.sum
new file mode 100644
index 0000000..3c210b2
--- /dev/null
+++ b/go.sum
@@ -0,0 +1,17 @@
+github.com/briandowns/spinner v0.0.0-20181018151057-dd69c579ff20/go.mod h1:hw/JEQBIE+c/BLI4aKM8UU8v+ZqrD3h7HC27kKt8JQU=
+github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34=
+github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
+github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
+github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
+github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
+github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
+github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
+github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o=
+github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE=
+github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
+github.com/olekukonko/tablewriter v0.0.0-20180912035003-be2c049b30cc/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
+github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ=
+github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
+github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s=
+golang.org/x/sys v0.0.0-20181019160139-8e24a49d80f8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+gopkg.in/ini.v1 v1.39.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
diff --git a/vendor/github.com/c-bata/go-prompt/LICENSE b/vendor/github.com/c-bata/go-prompt/LICENSE
new file mode 100644
index 0000000..a86acaa
--- /dev/null
+++ b/vendor/github.com/c-bata/go-prompt/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2017 Masashi SHIBATA
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/github.com/c-bata/go-prompt/buffer.go b/vendor/github.com/c-bata/go-prompt/buffer.go
new file mode 100644
index 0000000..6c29b46
--- /dev/null
+++ b/vendor/github.com/c-bata/go-prompt/buffer.go
@@ -0,0 +1,206 @@
+package prompt
+
+import (
+	"log"
+	"strings"
+)
+
+// Buffer emulates the console buffer.
+type Buffer struct {
+	workingLines    []string // The working lines. Similar to history
+	workingIndex    int
+	cursorPosition  int
+	cacheDocument   *Document
+	preferredColumn int // Remember the original column for the next up/down movement.
+}
+
+// Text returns string of the current line.
+func (b *Buffer) Text() string {
+	return b.workingLines[b.workingIndex]
+}
+
+// Document method to return document instance from the current text and cursor position.
+func (b *Buffer) Document() (d *Document) {
+	if b.cacheDocument == nil ||
+		b.cacheDocument.Text != b.Text() ||
+		b.cacheDocument.cursorPosition != b.cursorPosition {
+		b.cacheDocument = &Document{
+			Text:           b.Text(),
+			cursorPosition: b.cursorPosition,
+		}
+	}
+	return b.cacheDocument
+}
+
+// DisplayCursorPosition returns the cursor position on rendered text on terminal emulators.
+// So if Document is "日本(cursor)語", DisplayedCursorPosition returns 4 because '日' and '本' are double width characters.
+func (b *Buffer) DisplayCursorPosition() int {
+	return b.Document().DisplayCursorPosition()
+}
+
+// InsertText insert string from current line.
+func (b *Buffer) InsertText(v string, overwrite bool, moveCursor bool) {
+	or := []rune(b.Text())
+	oc := b.cursorPosition
+
+	if overwrite {
+		overwritten := string(or[oc : oc+len(v)])
+		if strings.Contains(overwritten, "\n") {
+			i := strings.IndexAny(overwritten, "\n")
+			overwritten = overwritten[:i]
+		}
+		b.setText(string(or[:oc]) + v + string(or[oc+len(overwritten):]))
+	} else {
+		b.setText(string(or[:oc]) + v + string(or[oc:]))
+	}
+
+	if moveCursor {
+		b.cursorPosition += len([]rune(v))
+	}
+}
+
+// SetText method to set text and update cursorPosition.
+// (When doing this, make sure that the cursor_position is valid for this text.
+// text/cursor_position should be consistent at any time, otherwise set a Document instead.)
+func (b *Buffer) setText(v string) {
+	if b.cursorPosition > len([]rune(v)) {
+		log.Print("[ERROR] The length of input value should be shorter than the position of cursor.")
+	}
+	o := b.workingLines[b.workingIndex]
+	b.workingLines[b.workingIndex] = v
+
+	if o != v {
+		// Text is changed.
+		// TODO: Call callback function triggered by text changed. And also history search text should reset.
+		// https://github.com/jonathanslenders/python-prompt-toolkit/blob/master/prompt_toolkit/buffer.py#L380-L384
+	}
+}
+
+// Set cursor position. Return whether it changed.
+func (b *Buffer) setCursorPosition(p int) {
+	o := b.cursorPosition
+	if p > 0 {
+		b.cursorPosition = p
+	} else {
+		b.cursorPosition = 0
+	}
+	if p != o {
+		// Cursor position is changed.
+		// TODO: Call a onCursorPositionChanged function.
+	}
+}
+
+func (b *Buffer) setDocument(d *Document) {
+	b.cacheDocument = d
+	b.setCursorPosition(d.cursorPosition) // Call before setText because setText check the relation between cursorPosition and line length.
+	b.setText(d.Text)
+}
+
+// CursorLeft move to left on the current line.
+func (b *Buffer) CursorLeft(count int) {
+	l := b.Document().GetCursorLeftPosition(count)
+	b.cursorPosition += l
+	return
+}
+
+// CursorRight move to right on the current line.
+func (b *Buffer) CursorRight(count int) {
+	l := b.Document().GetCursorRightPosition(count)
+	b.cursorPosition += l
+	return
+}
+
+// CursorUp move cursor to the previous line.
+// (for multi-line edit).
+func (b *Buffer) CursorUp(count int) {
+	orig := b.preferredColumn
+	if b.preferredColumn == -1 { // -1 means nil
+		orig = b.Document().CursorPositionCol()
+	}
+	b.cursorPosition += b.Document().GetCursorUpPosition(count, orig)
+
+	// Remember the original column for the next up/down movement.
+	b.preferredColumn = orig
+}
+
+// CursorDown move cursor to the next line.
+// (for multi-line edit).
+func (b *Buffer) CursorDown(count int) {
+	orig := b.preferredColumn
+	if b.preferredColumn == -1 { // -1 means nil
+		orig = b.Document().CursorPositionCol()
+	}
+	b.cursorPosition += b.Document().GetCursorDownPosition(count, orig)
+
+	// Remember the original column for the next up/down movement.
+	b.preferredColumn = orig
+}
+
+// DeleteBeforeCursor delete specified number of characters before cursor and return the deleted text.
+func (b *Buffer) DeleteBeforeCursor(count int) (deleted string) {
+	if count <= 0 {
+		log.Print("[ERROR] The count argument on DeleteBeforeCursor should grater than 0.")
+	}
+	r := []rune(b.Text())
+
+	if b.cursorPosition > 0 {
+		start := b.cursorPosition - count
+		if start < 0 {
+			start = 0
+		}
+		deleted = string(r[start:b.cursorPosition])
+		b.setDocument(&Document{
+			Text:           string(r[:start]) + string(r[b.cursorPosition:]),
+			cursorPosition: b.cursorPosition - len([]rune(deleted)),
+		})
+	}
+	return
+}
+
+// NewLine means CR.
+func (b *Buffer) NewLine(copyMargin bool) {
+	if copyMargin {
+		b.InsertText("\n"+b.Document().leadingWhitespaceInCurrentLine(), false, true)
+	} else {
+		b.InsertText("\n", false, true)
+	}
+}
+
+// Delete specified number of characters and Return the deleted text.
+func (b *Buffer) Delete(count int) (deleted string) {
+	r := []rune(b.Text())
+	if b.cursorPosition < len(r) {
+		deleted = b.Document().TextAfterCursor()[:count]
+		b.setText(string(r[:b.cursorPosition]) + string(r[b.cursorPosition+len(deleted):]))
+	}
+	return
+}
+
+// JoinNextLine joins the next line to the current one by deleting the line ending after the current line.
+func (b *Buffer) JoinNextLine(separator string) {
+	if !b.Document().OnLastLine() {
+		b.cursorPosition += b.Document().GetEndOfLinePosition()
+		b.Delete(1)
+		// Remove spaces
+		b.setText(b.Document().TextBeforeCursor() + separator + strings.TrimLeft(b.Document().TextAfterCursor(), " "))
+	}
+}
+
+// SwapCharactersBeforeCursor swaps the last two characters before the cursor.
+func (b *Buffer) SwapCharactersBeforeCursor() {
+	if b.cursorPosition >= 2 {
+		x := b.Text()[b.cursorPosition-2 : b.cursorPosition-1]
+		y := b.Text()[b.cursorPosition-1 : b.cursorPosition]
+		b.setText(b.Text()[:b.cursorPosition-2] + y + x + b.Text()[b.cursorPosition:])
+	}
+}
+
+// NewBuffer is constructor of Buffer struct.
+func NewBuffer() (b *Buffer) {
+	b = &Buffer{
+		workingLines:    []string{""},
+		workingIndex:    0,
+		preferredColumn: -1, // -1 means nil
+	}
+	return
+}
diff --git a/vendor/github.com/c-bata/go-prompt/completion.go b/vendor/github.com/c-bata/go-prompt/completion.go
new file mode 100644
index 0000000..5f69803
--- /dev/null
+++ b/vendor/github.com/c-bata/go-prompt/completion.go
@@ -0,0 +1,194 @@
+package prompt
+
+import (
+	"log"
+	"strings"
+
+	"github.com/mattn/go-runewidth"
+)
+
+const (
+	shortenSuffix = "..."
+	leftPrefix    = " "
+	leftSuffix    = " "
+	rightPrefix   = " "
+	rightSuffix   = " "
+)
+
+var (
+	leftMargin       = runewidth.StringWidth(leftPrefix + leftSuffix)
+	rightMargin      = runewidth.StringWidth(rightPrefix + rightSuffix)
+	completionMargin = leftMargin + rightMargin
+)
+
+// Suggest is printed when completing.
+type Suggest struct {
+	Text        string
+	Description string
+}
+
+// CompletionManager manages which suggestion is now selected.
+type CompletionManager struct {
+	selected  int // -1 means nothing one is selected.
+	tmp       []Suggest
+	max       uint16
+	completer Completer
+
+	verticalScroll int
+	wordSeparator  string
+}
+
+// GetSelectedSuggestion returns the selected item.
+func (c *CompletionManager) GetSelectedSuggestion() (s Suggest, ok bool) {
+	if c.selected == -1 {
+		return Suggest{}, false
+	} else if c.selected < -1 {
+		log.Printf("[ERROR] shoud be reached here, selected=%d", c.selected)
+		c.selected = -1
+		return Suggest{}, false
+	}
+	return c.tmp[c.selected], true
+}
+
+// GetSuggestions returns the list of suggestion.
+func (c *CompletionManager) GetSuggestions() []Suggest {
+	return c.tmp
+}
+
+// Reset to select nothing.
+func (c *CompletionManager) Reset() {
+	c.selected = -1
+	c.verticalScroll = 0
+	c.Update(*NewDocument())
+	return
+}
+
+// Update to update the suggestions.
+func (c *CompletionManager) Update(in Document) {
+	c.tmp = c.completer(in)
+	return
+}
+
+// Previous to select the previous suggestion item.
+func (c *CompletionManager) Previous() {
+	if c.verticalScroll == c.selected && c.selected > 0 {
+		c.verticalScroll--
+	}
+	c.selected--
+	c.update()
+	return
+}
+
+// Next to select the next suggestion item.
+func (c *CompletionManager) Next() {
+	if c.verticalScroll+int(c.max)-1 == c.selected {
+		c.verticalScroll++
+	}
+	c.selected++
+	c.update()
+	return
+}
+
+// Completing returns whether the CompletionManager selects something one.
+func (c *CompletionManager) Completing() bool {
+	return c.selected != -1
+}
+
+func (c *CompletionManager) update() {
+	max := int(c.max)
+	if len(c.tmp) < max {
+		max = len(c.tmp)
+	}
+
+	if c.selected >= len(c.tmp) {
+		c.Reset()
+	} else if c.selected < -1 {
+		c.selected = len(c.tmp) - 1
+		c.verticalScroll = len(c.tmp) - max
+	}
+}
+
+func deleteBreakLineCharacters(s string) string {
+	s = strings.Replace(s, "\n", "", -1)
+	s = strings.Replace(s, "\r", "", -1)
+	return s
+}
+
+func formatTexts(o []string, max int, prefix, suffix string) (new []string, width int) {
+	l := len(o)
+	n := make([]string, l)
+
+	lenPrefix := runewidth.StringWidth(prefix)
+	lenSuffix := runewidth.StringWidth(suffix)
+	lenShorten := runewidth.StringWidth(shortenSuffix)
+	min := lenPrefix + lenSuffix + lenShorten
+	for i := 0; i < l; i++ {
+		o[i] = deleteBreakLineCharacters(o[i])
+
+		w := runewidth.StringWidth(o[i])
+		if width < w {
+			width = w
+		}
+	}
+
+	if width == 0 {
+		return n, 0
+	}
+	if min >= max {
+		log.Println("[WARN] formatTexts: max is lower than length of prefix and suffix.")
+		return n, 0
+	}
+	if lenPrefix+width+lenSuffix > max {
+		width = max - lenPrefix - lenSuffix
+	}
+
+	for i := 0; i < l; i++ {
+		x := runewidth.StringWidth(o[i])
+		if x <= width {
+			spaces := strings.Repeat(" ", width-x)
+			n[i] = prefix + o[i] + spaces + suffix
+		} else if x > width {
+			x := runewidth.Truncate(o[i], width, shortenSuffix)
+			// When calling runewidth.Truncate("您好xxx您好xxx", 11, "...") returns "您好xxx..."
+			// But the length of this result is 10. So we need fill right using runewidth.FillRight.
+			n[i] = prefix + runewidth.FillRight(x, width) + suffix
+		}
+	}
+	return n, lenPrefix + width + lenSuffix
+}
+
+func formatSuggestions(suggests []Suggest, max int) (new []Suggest, width int) {
+	num := len(suggests)
+	new = make([]Suggest, num)
+
+	left := make([]string, num)
+	for i := 0; i < num; i++ {
+		left[i] = suggests[i].Text
+	}
+	right := make([]string, num)
+	for i := 0; i < num; i++ {
+		right[i] = suggests[i].Description
+	}
+
+	left, leftWidth := formatTexts(left, max, leftPrefix, leftSuffix)
+	if leftWidth == 0 {
+		return []Suggest{}, 0
+	}
+	right, rightWidth := formatTexts(right, max-leftWidth, rightPrefix, rightSuffix)
+
+	for i := 0; i < num; i++ {
+		new[i] = Suggest{Text: left[i], Description: right[i]}
+	}
+	return new, leftWidth + rightWidth
+}
+
+// NewCompletionManager returns initialized CompletionManager object.
+func NewCompletionManager(completer Completer, max uint16) *CompletionManager {
+	return &CompletionManager{
+		selected:  -1,
+		max:       max,
+		completer: completer,
+
+		verticalScroll: 0,
+	}
+}
diff --git a/vendor/github.com/c-bata/go-prompt/document.go b/vendor/github.com/c-bata/go-prompt/document.go
new file mode 100644
index 0000000..06b436a
--- /dev/null
+++ b/vendor/github.com/c-bata/go-prompt/document.go
@@ -0,0 +1,533 @@
+package prompt
+
+import (
+	"sort"
+	"strings"
+	"unicode/utf8"
+
+	"github.com/mattn/go-runewidth"
+)
+
+// Document has text displayed in terminal and cursor position.
+type Document struct {
+	Text string
+	// This represents a index in a rune array of Document.Text.
+	// So if Document is "日本(cursor)語", cursorPosition is 2.
+	// But DisplayedCursorPosition returns 4 because '日' and '本' are double width characters.
+	cursorPosition int
+}
+
+// NewDocument return the new empty document.
+func NewDocument() *Document {
+	return &Document{
+		Text:           "",
+		cursorPosition: 0,
+	}
+}
+
+// DisplayCursorPosition returns the cursor position on rendered text on terminal emulators.
+// So if Document is "日本(cursor)語", DisplayedCursorPosition returns 4 because '日' and '本' are double width characters.
+func (d *Document) DisplayCursorPosition() int {
+	var position int
+	runes := []rune(d.Text)[:d.cursorPosition]
+	for i := range runes {
+		position += runewidth.RuneWidth(runes[i])
+	}
+	return position
+}
+
+// GetCharRelativeToCursor return character relative to cursor position, or empty string
+func (d *Document) GetCharRelativeToCursor(offset int) (r rune) {
+	s := d.Text
+	cnt := 0
+
+	for len(s) > 0 {
+		cnt++
+		r, size := utf8.DecodeRuneInString(s)
+		if cnt == d.cursorPosition+offset {
+			return r
+		}
+		s = s[size:]
+	}
+	return 0
+}
+
+// TextBeforeCursor returns the text before the cursor.
+func (d *Document) TextBeforeCursor() string {
+	r := []rune(d.Text)
+	return string(r[:d.cursorPosition])
+}
+
+// TextAfterCursor returns the text after the cursor.
+func (d *Document) TextAfterCursor() string {
+	r := []rune(d.Text)
+	return string(r[d.cursorPosition:])
+}
+
+// GetWordBeforeCursor returns the word before the cursor.
+// If we have whitespace before the cursor this returns an empty string.
+func (d *Document) GetWordBeforeCursor() string {
+	x := d.TextBeforeCursor()
+	return x[d.FindStartOfPreviousWord():]
+}
+
+// GetWordAfterCursor returns the word after the cursor.
+// If we have whitespace after the cursor this returns an empty string.
+func (d *Document) GetWordAfterCursor() string {
+	x := d.TextAfterCursor()
+	return x[:d.FindEndOfCurrentWord()]
+}
+
+// GetWordBeforeCursorWithSpace returns the word before the cursor.
+// Unlike GetWordBeforeCursor, it returns string containing space
+func (d *Document) GetWordBeforeCursorWithSpace() string {
+	x := d.TextBeforeCursor()
+	return x[d.FindStartOfPreviousWordWithSpace():]
+}
+
+// GetWordAfterCursorWithSpace returns the word after the cursor.
+// Unlike GetWordAfterCursor, it returns string containing space
+func (d *Document) GetWordAfterCursorWithSpace() string {
+	x := d.TextAfterCursor()
+	return x[:d.FindEndOfCurrentWordWithSpace()]
+}
+
+// GetWordBeforeCursorUntilSeparator returns the text before the cursor until next separator.
+func (d *Document) GetWordBeforeCursorUntilSeparator(sep string) string {
+	x := d.TextBeforeCursor()
+	return x[d.FindStartOfPreviousWordUntilSeparator(sep):]
+}
+
+// GetWordAfterCursorUntilSeparator returns the text after the cursor until next separator.
+func (d *Document) GetWordAfterCursorUntilSeparator(sep string) string {
+	x := d.TextAfterCursor()
+	return x[:d.FindEndOfCurrentWordUntilSeparator(sep)]
+}
+
+// GetWordBeforeCursorUntilSeparatorIgnoreNextToCursor returns the word before the cursor.
+// Unlike GetWordBeforeCursor, it returns string containing space
+func (d *Document) GetWordBeforeCursorUntilSeparatorIgnoreNextToCursor(sep string) string {
+	x := d.TextBeforeCursor()
+	return x[d.FindStartOfPreviousWordUntilSeparatorIgnoreNextToCursor(sep):]
+}
+
+// GetWordAfterCursorUntilSeparatorIgnoreNextToCursor returns the word after the cursor.
+// Unlike GetWordAfterCursor, it returns string containing space
+func (d *Document) GetWordAfterCursorUntilSeparatorIgnoreNextToCursor(sep string) string {
+	x := d.TextAfterCursor()
+	return x[:d.FindEndOfCurrentWordUntilSeparatorIgnoreNextToCursor(sep)]
+}
+
+// FindStartOfPreviousWord returns an index relative to the cursor position
+// pointing to the start of the previous word. Return 0 if nothing was found.
+func (d *Document) FindStartOfPreviousWord() int {
+	x := d.TextBeforeCursor()
+	i := strings.LastIndexByte(x, ' ')
+	if i != -1 {
+		return i + 1
+	}
+	return 0
+}
+
+// FindStartOfPreviousWordWithSpace is almost the same as FindStartOfPreviousWord.
+// The only difference is to ignore contiguous spaces.
+func (d *Document) FindStartOfPreviousWordWithSpace() int {
+	x := d.TextBeforeCursor()
+	end := lastIndexByteNot(x, ' ')
+	if end == -1 {
+		return 0
+	}
+
+	start := strings.LastIndexByte(x[:end], ' ')
+	if start == -1 {
+		return 0
+	}
+	return start + 1
+}
+
+// FindStartOfPreviousWordUntilSeparator is almost the same as FindStartOfPreviousWord.
+// But this can specify Separator. Return 0 if nothing was found.
+func (d *Document) FindStartOfPreviousWordUntilSeparator(sep string) int {
+	if sep == "" {
+		return d.FindStartOfPreviousWord()
+	}
+
+	x := d.TextBeforeCursor()
+	i := strings.LastIndexAny(x, sep)
+	if i != -1 {
+		return i + 1
+	}
+	return 0
+}
+
+// FindStartOfPreviousWordUntilSeparatorIgnoreNextToCursor is almost the same as FindStartOfPreviousWordWithSpace.
+// But this can specify Separator. Return 0 if nothing was found.
+func (d *Document) FindStartOfPreviousWordUntilSeparatorIgnoreNextToCursor(sep string) int {
+	if sep == "" {
+		return d.FindStartOfPreviousWordWithSpace()
+	}
+
+	x := d.TextBeforeCursor()
+	end := lastIndexAnyNot(x, sep)
+	if end == -1 {
+		return 0
+	}
+	start := strings.LastIndexAny(x[:end], sep)
+	if start == -1 {
+		return 0
+	}
+	return start + 1
+}
+
+// FindEndOfCurrentWord returns an index relative to the cursor position.
+// pointing to the end of the current word. Return 0 if nothing was found.
+func (d *Document) FindEndOfCurrentWord() int {
+	x := d.TextAfterCursor()
+	i := strings.IndexByte(x, ' ')
+	if i != -1 {
+		return i
+	}
+	return len(x)
+}
+
+// FindEndOfCurrentWordWithSpace is almost the same as FindEndOfCurrentWord.
+// The only difference is to ignore contiguous spaces.
+func (d *Document) FindEndOfCurrentWordWithSpace() int {
+	x := d.TextAfterCursor()
+
+	start := indexByteNot(x, ' ')
+	if start == -1 {
+		return len(x)
+	}
+
+	end := strings.IndexByte(x[start:], ' ')
+	if end == -1 {
+		return len(x)
+	}
+
+	return start + end
+}
+
+// FindEndOfCurrentWordUntilSeparator is almost the same as FindEndOfCurrentWord.
+// But this can specify Separator. Return 0 if nothing was found.
+func (d *Document) FindEndOfCurrentWordUntilSeparator(sep string) int {
+	if sep == "" {
+		return d.FindEndOfCurrentWord()
+	}
+
+	x := d.TextAfterCursor()
+	i := strings.IndexAny(x, sep)
+	if i != -1 {
+		return i
+	}
+	return len(x)
+}
+
+// FindEndOfCurrentWordUntilSeparatorIgnoreNextToCursor is almost the same as FindEndOfCurrentWordWithSpace.
+// But this can specify Separator. Return 0 if nothing was found.
+func (d *Document) FindEndOfCurrentWordUntilSeparatorIgnoreNextToCursor(sep string) int {
+	if sep == "" {
+		return d.FindEndOfCurrentWordWithSpace()
+	}
+
+	x := d.TextAfterCursor()
+
+	start := indexAnyNot(x, sep)
+	if start == -1 {
+		return len(x)
+	}
+
+	end := strings.IndexAny(x[start:], sep)
+	if end == -1 {
+		return len(x)
+	}
+
+	return start + end
+}
+
+// CurrentLineBeforeCursor returns the text from the start of the line until the cursor.
+func (d *Document) CurrentLineBeforeCursor() string {
+	s := strings.Split(d.TextBeforeCursor(), "\n")
+	return s[len(s)-1]
+}
+
+// CurrentLineAfterCursor returns the text from the cursor until the end of the line.
+func (d *Document) CurrentLineAfterCursor() string {
+	return strings.Split(d.TextAfterCursor(), "\n")[0]
+}
+
+// CurrentLine return the text on the line where the cursor is. (when the input
+// consists of just one line, it equals `text`.
+func (d *Document) CurrentLine() string {
+	return d.CurrentLineBeforeCursor() + d.CurrentLineAfterCursor()
+}
+
+// Array pointing to the start indexes of all the lines.
+func (d *Document) lineStartIndexes() []int {
+	// TODO: Cache, because this is often reused.
+	// (If it is used, it's often used many times.
+	// And this has to be fast for editing big documents!)
+	lc := d.LineCount()
+	lengths := make([]int, lc)
+	for i, l := range d.Lines() {
+		lengths[i] = len(l)
+	}
+
+	// Calculate cumulative sums.
+	indexes := make([]int, lc+1)
+	indexes[0] = 0 // https://github.com/jonathanslenders/python-prompt-toolkit/blob/master/prompt_toolkit/document.py#L189
+	pos := 0
+	for i, l := range lengths {
+		pos += l + 1
+		indexes[i+1] = pos
+	}
+	if lc > 1 {
+		// Pop the last item. (This is not a new line.)
+		indexes = indexes[:lc]
+	}
+	return indexes
+}
+
+// For the index of a character at a certain line, calculate the index of
+// the first character on that line.
+func (d *Document) findLineStartIndex(index int) (pos int, lineStartIndex int) {
+	indexes := d.lineStartIndexes()
+	pos = bisectRight(indexes, index) - 1
+	lineStartIndex = indexes[pos]
+	return
+}
+
+// CursorPositionRow returns the current row. (0-based.)
+func (d *Document) CursorPositionRow() (row int) {
+	row, _ = d.findLineStartIndex(d.cursorPosition)
+	return
+}
+
+// CursorPositionCol returns the current column. (0-based.)
+func (d *Document) CursorPositionCol() (col int) {
+	// Don't use self.text_before_cursor to calculate this. Creating substrings
+	// and splitting is too expensive for getting the cursor position.
+	_, index := d.findLineStartIndex(d.cursorPosition)
+	col = d.cursorPosition - index
+	return
+}
+
+// GetCursorLeftPosition returns the relative position for cursor left.
+func (d *Document) GetCursorLeftPosition(count int) int {
+	if count < 0 {
+		return d.GetCursorRightPosition(-count)
+	}
+	if d.CursorPositionCol() > count {
+		return -count
+	}
+	return -d.CursorPositionCol()
+}
+
+// GetCursorRightPosition returns relative position for cursor right.
+func (d *Document) GetCursorRightPosition(count int) int {
+	if count < 0 {
+		return d.GetCursorLeftPosition(-count)
+	}
+	if len(d.CurrentLineAfterCursor()) > count {
+		return count
+	}
+	return len(d.CurrentLineAfterCursor())
+}
+
+// GetCursorUpPosition return the relative cursor position (character index) where we would be
+// if the user pressed the arrow-up button.
+func (d *Document) GetCursorUpPosition(count int, preferredColumn int) int {
+	var col int
+	if preferredColumn == -1 { // -1 means nil
+		col = d.CursorPositionCol()
+	} else {
+		col = preferredColumn
+	}
+
+	row := d.CursorPositionRow() - count
+	if row < 0 {
+		row = 0
+	}
+	return d.TranslateRowColToIndex(row, col) - d.cursorPosition
+}
+
+// GetCursorDownPosition return the relative cursor position (character index) where we would be if the
+// user pressed the arrow-down button.
+func (d *Document) GetCursorDownPosition(count int, preferredColumn int) int {
+	var col int
+	if preferredColumn == -1 { // -1 means nil
+		col = d.CursorPositionCol()
+	} else {
+		col = preferredColumn
+	}
+	row := d.CursorPositionRow() + count
+	return d.TranslateRowColToIndex(row, col) - d.cursorPosition
+}
+
+// Lines returns the array of all the lines.
+func (d *Document) Lines() []string {
+	// TODO: Cache, because this one is reused very often.
+	return strings.Split(d.Text, "\n")
+}
+
+// LineCount return the number of lines in this document. If the document ends
+// with a trailing \n, that counts as the beginning of a new line.
+func (d *Document) LineCount() int {
+	return len(d.Lines())
+}
+
+// TranslateIndexToPosition given an index for the text, return the corresponding (row, col) tuple.
+// (0-based. Returns (0, 0) for index=0.)
+func (d *Document) TranslateIndexToPosition(index int) (row int, col int) {
+	row, rowIndex := d.findLineStartIndex(index)
+	col = index - rowIndex
+	return
+}
+
+// TranslateRowColToIndex given a (row, col), return the corresponding index.
+// (Row and col params are 0-based.)
+func (d *Document) TranslateRowColToIndex(row int, column int) (index int) {
+	indexes := d.lineStartIndexes()
+	if row < 0 {
+		row = 0
+	} else if row > len(indexes) {
+		row = len(indexes) - 1
+	}
+	index = indexes[row]
+	line := d.Lines()[row]
+
+	// python) result += max(0, min(col, len(line)))
+	if column > 0 || len(line) > 0 {
+		if column > len(line) {
+			index += len(line)
+		} else {
+			index += column
+		}
+	}
+
+	// Keep in range. (len(self.text) is included, because the cursor can be
+	// right after the end of the text as well.)
+	// python) result = max(0, min(result, len(self.text)))
+	if index > len(d.Text) {
+		index = len(d.Text)
+	}
+	if index < 0 {
+		index = 0
+	}
+	return index
+}
+
+// OnLastLine returns true when we are at the last line.
+func (d *Document) OnLastLine() bool {
+	return d.CursorPositionRow() == (d.LineCount() - 1)
+}
+
+// GetEndOfLinePosition returns relative position for the end of this line.
+func (d *Document) GetEndOfLinePosition() int {
+	return len([]rune(d.CurrentLineAfterCursor()))
+}
+
+func (d *Document) leadingWhitespaceInCurrentLine() (margin string) {
+	trimmed := strings.TrimSpace(d.CurrentLine())
+	margin = d.CurrentLine()[:len(d.CurrentLine())-len(trimmed)]
+	return
+}
+
+// bisectRight to Locate the insertion point for v in a to maintain sorted order.
+func bisectRight(a []int, v int) int {
+	return bisectRightRange(a, v, 0, len(a))
+}
+
+func bisectRightRange(a []int, v int, lo, hi int) int {
+	s := a[lo:hi]
+	return sort.Search(len(s), func(i int) bool {
+		return s[i] > v
+	})
+}
+
+func indexByteNot(s string, c byte) int {
+	n := len(s)
+	for i := 0; i < n; i++ {
+		if s[i] != c {
+			return i
+		}
+	}
+	return -1
+}
+
+func lastIndexByteNot(s string, c byte) int {
+	for i := len(s) - 1; i >= 0; i-- {
+		if s[i] != c {
+			return i
+		}
+	}
+	return -1
+}
+
+type asciiSet [8]uint32
+
+func (as *asciiSet) notContains(c byte) bool {
+	return (as[c>>5] & (1 << uint(c&31))) == 0
+}
+
+func makeASCIISet(chars string) (as asciiSet, ok bool) {
+	for i := 0; i < len(chars); i++ {
+		c := chars[i]
+		if c >= utf8.RuneSelf {
+			return as, false
+		}
+		as[c>>5] |= 1 << uint(c&31)
+	}
+	return as, true
+}
+
+func indexAnyNot(s, chars string) int {
+	if len(chars) > 0 {
+		if len(s) > 8 {
+			if as, isASCII := makeASCIISet(chars); isASCII {
+				for i := 0; i < len(s); i++ {
+					if as.notContains(s[i]) {
+						return i
+					}
+				}
+				return -1
+			}
+		}
+		for i := 0; i < len(s); {
+			// I don't know why strings.IndexAny doesn't add rune count here.
+			r, size := utf8.DecodeRuneInString(s[i:])
+			i += size
+			for _, c := range chars {
+				if r != c {
+					return i
+				}
+			}
+		}
+	}
+	return -1
+}
+
+func lastIndexAnyNot(s, chars string) int {
+	if len(chars) > 0 {
+		if len(s) > 8 {
+			if as, isASCII := makeASCIISet(chars); isASCII {
+				for i := len(s) - 1; i >= 0; i-- {
+					if as.notContains(s[i]) {
+						return i
+					}
+				}
+				return -1
+			}
+		}
+		for i := len(s); i > 0; {
+			r, size := utf8.DecodeLastRuneInString(s[:i])
+			i -= size
+			for _, c := range chars {
+				if r != c {
+					return i
+				}
+			}
+		}
+	}
+	return -1
+}
diff --git a/vendor/github.com/c-bata/go-prompt/emacs.go b/vendor/github.com/c-bata/go-prompt/emacs.go
new file mode 100644
index 0000000..9dc71ed
--- /dev/null
+++ b/vendor/github.com/c-bata/go-prompt/emacs.go
@@ -0,0 +1,119 @@
+package prompt
+
+/*
+
+========
+PROGRESS
+========
+
+Moving the cursor
+-----------------
+
+* [x] Ctrl + a   Go to the beginning of the line (Home)
+* [x] Ctrl + e   Go to the End of the line (End)
+* [x] Ctrl + p   Previous command (Up arrow)
+* [x] Ctrl + n   Next command (Down arrow)
+* [x] Ctrl + f   Forward one character
+* [x] Ctrl + b   Backward one character
+* [x] Ctrl + xx  Toggle between the start of line and current cursor position
+
+Editing
+-------
+
+* [x] Ctrl + L   Clear the Screen, similar to the clear command
+* [x] Ctrl + d   Delete character under the cursor
+* [x] Ctrl + h   Delete character before the cursor (Backspace)
+
+* [x] Ctrl + w   Cut the Word before the cursor to the clipboard.
+* [x] Ctrl + k   Cut the Line after the cursor to the clipboard.
+* [x] Ctrl + u   Cut/delete the Line before the cursor to the clipboard.
+
+* [ ] Ctrl + t   Swap the last two characters before the cursor (typo).
+* [ ] Esc  + t   Swap the last two words before the cursor.
+
+* [ ] ctrl + y   Paste the last thing to be cut (yank)
+* [ ] ctrl + _   Undo
+
+*/
+
+var emacsKeyBindings = []KeyBind{
+	// Go to the End of the line
+	{
+		Key: ControlE,
+		Fn: func(buf *Buffer) {
+			x := []rune(buf.Document().TextAfterCursor())
+			buf.CursorRight(len(x))
+		},
+	},
+	// Go to the beginning of the line
+	{
+		Key: ControlA,
+		Fn: func(buf *Buffer) {
+			x := []rune(buf.Document().TextBeforeCursor())
+			buf.CursorLeft(len(x))
+		},
+	},
+	// Cut the Line after the cursor
+	{
+		Key: ControlK,
+		Fn: func(buf *Buffer) {
+			x := []rune(buf.Document().TextAfterCursor())
+			buf.Delete(len(x))
+		},
+	},
+	// Cut/delete the Line before the cursor
+	{
+		Key: ControlU,
+		Fn: func(buf *Buffer) {
+			x := []rune(buf.Document().TextBeforeCursor())
+			buf.DeleteBeforeCursor(len(x))
+		},
+	},
+	// Delete character under the cursor
+	{
+		Key: ControlD,
+		Fn: func(buf *Buffer) {
+			if buf.Text() != "" {
+				buf.Delete(1)
+			}
+		},
+	},
+	// Backspace
+	{
+		Key: ControlH,
+		Fn: func(buf *Buffer) {
+			buf.DeleteBeforeCursor(1)
+		},
+	},
+	// Right allow: Forward one character
+	{
+		Key: ControlF,
+		Fn: func(buf *Buffer) {
+			buf.CursorRight(1)
+		},
+	},
+	// Left allow: Backward one character
+	{
+		Key: ControlB,
+		Fn: func(buf *Buffer) {
+			buf.CursorLeft(1)
+		},
+	},
+	// Cut the Word before the cursor.
+	{
+		Key: ControlW,
+		Fn: func(buf *Buffer) {
+			buf.DeleteBeforeCursor(len([]rune(buf.Document().GetWordBeforeCursorWithSpace())))
+		},
+	},
+	// Clear the Screen, similar to the clear command
+	{
+		Key: ControlL,
+		Fn: func(buf *Buffer) {
+			out := NewStandardOutputWriter()
+			out.EraseScreen()
+			out.CursorGoTo(0, 0)
+			out.Flush()
+		},
+	},
+}
diff --git a/vendor/github.com/c-bata/go-prompt/filter.go b/vendor/github.com/c-bata/go-prompt/filter.go
new file mode 100644
index 0000000..583674a
--- /dev/null
+++ b/vendor/github.com/c-bata/go-prompt/filter.go
@@ -0,0 +1,72 @@
+package prompt
+
+import "strings"
+
+// Filter is the type to filter the prompt.Suggestion array.
+type Filter func([]Suggest, string, bool) []Suggest
+
+// FilterHasPrefix checks whether the string completions.Text begins with sub.
+func FilterHasPrefix(completions []Suggest, sub string, ignoreCase bool) []Suggest {
+	if sub == "" {
+		return completions
+	}
+	if ignoreCase {
+		sub = strings.ToUpper(sub)
+	}
+
+	ret := make([]Suggest, 0, len(completions))
+	for i := range completions {
+		c := completions[i].Text
+		if ignoreCase {
+			c = strings.ToUpper(c)
+		}
+		if strings.HasPrefix(c, sub) {
+			ret = append(ret, completions[i])
+		}
+	}
+	return ret
+}
+
+// FilterHasSuffix checks whether the completion.Text ends with sub.
+func FilterHasSuffix(completions []Suggest, sub string, ignoreCase bool) []Suggest {
+	if sub == "" {
+		return completions
+	}
+	if ignoreCase {
+		sub = strings.ToUpper(sub)
+	}
+
+	ret := make([]Suggest, 0, len(completions))
+	for i := range completions {
+		c := completions[i].Text
+		if ignoreCase {
+			c = strings.ToUpper(c)
+		}
+		if strings.HasSuffix(c, sub) {
+			ret = append(ret, completions[i])
+		}
+	}
+	return ret
+}
+
+// FilterContains checks whether the completion.Text contains sub.
+func FilterContains(completions []Suggest, sub string, ignoreCase bool) []Suggest {
+	if sub == "" {
+		return completions
+	}
+	if ignoreCase {
+		sub = strings.ToUpper(sub)
+	}
+
+	ret := make([]Suggest, 0, len(completions))
+	for i := range completions {
+		c := completions[i].Text
+		if ignoreCase {
+			c = strings.ToUpper(c)
+		}
+		if strings.Contains(c, sub) {
+			ret = append(ret, completions[i])
+		}
+	}
+	return ret
+}
diff --git a/vendor/github.com/c-bata/go-prompt/history.go b/vendor/github.com/c-bata/go-prompt/history.go
new file mode 100644
index 0000000..e75c645
--- /dev/null
+++ b/vendor/github.com/c-bata/go-prompt/history.go
@@ -0,0 +1,61 @@
+package prompt
+
+// History stores the texts that are entered.
+type History struct {
+	histories []string
+	tmp       []string
+	selected  int
+}
+
+// Add to add text in history.
+func (h *History) Add(input string) {
+	h.histories = append(h.histories, input)
+	h.Clear()
+}
+
+// Clear to clear the history.
+func (h *History) Clear() {
+	h.tmp = make([]string, len(h.histories))
+	for i := range h.histories {
+		h.tmp[i] = h.histories[i]
+	}
+	h.tmp = append(h.tmp, "")
+	h.selected = len(h.tmp) - 1
+}
+
+// Older saves a buffer of current line and get a buffer of previous line by up-arrow.
+// The changes of line buffers are stored until new history is created.
+func (h *History) Older(buf *Buffer) (new *Buffer, changed bool) {
+	if len(h.tmp) == 1 || h.selected == 0 {
+		return buf, false
+	}
+	h.tmp[h.selected] = buf.Text()
+
+	h.selected--
+	new = NewBuffer()
+	new.InsertText(h.tmp[h.selected], false, true)
+	return new, true
+}
+
+// Newer saves a buffer of current line and get a buffer of next line by up-arrow.
+// The changes of line buffers are stored until new history is created.
+func (h *History) Newer(buf *Buffer) (new *Buffer, changed bool) {
+	if h.selected >= len(h.tmp)-1 {
+		return buf, false
+	}
+	h.tmp[h.selected] = buf.Text()
+
+	h.selected++
+	new = NewBuffer()
+	new.InsertText(h.tmp[h.selected], false, true)
+	return new, true
+}
+
+// NewHistory returns new history object.
+func NewHistory() *History {
+	return &History{
+		histories: []string{},
+		tmp:       []string{""},
+		selected:  0,
+	}
+}
diff --git a/vendor/github.com/c-bata/go-prompt/input.go b/vendor/github.com/c-bata/go-prompt/input.go
new file mode 100644
index 0000000..4c90b0f
--- /dev/null
+++ b/vendor/github.com/c-bata/go-prompt/input.go
@@ -0,0 +1,158 @@
+package prompt
+
+// WinSize represents the width and height of terminal.
+type WinSize struct {
+	Row uint16
+	Col uint16
+}
+
+// ConsoleParser is an interface to abstract input layer.
+type ConsoleParser interface {
+	// Setup should be called before starting input
+	Setup() error
+	// TearDown should be called after stopping input
+	TearDown() error
+	// GetKey returns Key correspond to input byte codes.
+	GetKey(b []byte) Key
+	// GetWinSize returns WinSize object to represent width and height of terminal.
+	GetWinSize() *WinSize
+	// Read returns byte array.
+	Read() ([]byte, error)
+}
+
+var asciiSequences = []*ASCIICode{
+	{Key: Escape, ASCIICode: []byte{0x1b}},
+
+	{Key: ControlSpace, ASCIICode: []byte{0x00}},
+	{Key: ControlA, ASCIICode: []byte{0x1}},
+	{Key: ControlB, ASCIICode: []byte{0x2}},
+	{Key: ControlC, ASCIICode: []byte{0x3}},
+	{Key: ControlD, ASCIICode: []byte{0x4}},
+	{Key: ControlE, ASCIICode: []byte{0x5}},
+	{Key: ControlF, ASCIICode: []byte{0x6}},
+	{Key: ControlG, ASCIICode: []byte{0x7}},
+	{Key: ControlH, ASCIICode: []byte{0x8}},
+	//{Key: ControlI, ASCIICode: []byte{0x9}},
+	//{Key: ControlJ, ASCIICode: []byte{0xa}},
+	{Key: ControlK, ASCIICode: []byte{0xb}},
+	{Key: ControlL, ASCIICode: []byte{0xc}},
+	{Key: ControlM, ASCIICode: []byte{0xd}},
+	{Key: ControlN, ASCIICode: []byte{0xe}},
+	{Key: ControlO, ASCIICode: []byte{0xf}},
+	{Key: ControlP, ASCIICode: []byte{0x10}},
+	{Key: ControlQ, ASCIICode: []byte{0x11}},
+	{Key: ControlR, ASCIICode: []byte{0x12}},
+	{Key: ControlS, ASCIICode: []byte{0x13}},
+	{Key: ControlT, ASCIICode: []byte{0x14}},
+	{Key: ControlU, ASCIICode: []byte{0x15}},
+	{Key: ControlV, ASCIICode: []byte{0x16}},
+	{Key: ControlW, ASCIICode: []byte{0x17}},
+	{Key: ControlX, ASCIICode: []byte{0x18}},
+	{Key: ControlY, ASCIICode: []byte{0x19}},
+	{Key: ControlZ, ASCIICode: []byte{0x1a}},
+
+	{Key: ControlBackslash, ASCIICode: []byte{0x1c}},
+	{Key: ControlSquareClose, ASCIICode: []byte{0x1d}},
+	{Key: ControlCircumflex, ASCIICode: []byte{0x1e}},
+	{Key: ControlUnderscore, ASCIICode: []byte{0x1f}},
+	{Key: Backspace, ASCIICode: []byte{0x7f}},
+
+	{Key: Up, ASCIICode: []byte{0x1b, 0x5b, 0x41}},
+	{Key: Down, ASCIICode: []byte{0x1b, 0x5b, 0x42}},
+	{Key: Right, ASCIICode: []byte{0x1b, 0x5b, 0x43}},
+	{Key: Left, ASCIICode: []byte{0x1b, 0x5b, 0x44}},
+	{Key: Home, ASCIICode: []byte{0x1b, 0x5b, 0x48}},
+	{Key: Home, ASCIICode: []byte{0x1b, 0x30, 0x48}},
+	{Key: End, ASCIICode: []byte{0x1b, 0x5b, 0x46}},
+	{Key: End, ASCIICode: []byte{0x1b, 0x30, 0x46}},
+
+	{Key: Enter, ASCIICode: []byte{0xa}},
+	{Key: Delete, ASCIICode: []byte{0x1b, 0x5b, 0x33, 0x7e}},
+	{Key: ShiftDelete, ASCIICode: []byte{0x1b, 0x5b, 0x33, 0x3b, 0x32, 0x7e}},
+	{Key: ControlDelete, ASCIICode: []byte{0x1b, 0x5b, 0x33, 0x3b, 0x35, 0x7e}},
+	{Key: Home, ASCIICode: []byte{0x1b, 0x5b, 0x31, 0x7e}},
+	{Key: End, ASCIICode: []byte{0x1b, 0x5b, 0x34, 0x7e}},
+	{Key: PageUp, ASCIICode: []byte{0x1b, 0x5b, 0x35, 0x7e}},
+	{Key: PageDown, ASCIICode: []byte{0x1b, 0x5b, 0x36, 0x7e}},
+	{Key: Home, ASCIICode: []byte{0x1b, 0x5b, 0x37, 0x7e}},
+	{Key: End, ASCIICode: []byte{0x1b, 0x5b, 0x38, 0x7e}},
+	{Key: Tab, ASCIICode: []byte{0x9}},
+	{Key: BackTab, ASCIICode: []byte{0x1b, 0x5b, 0x5a}},
+	{Key: Insert, ASCIICode: []byte{0x1b, 0x5b, 0x32, 0x7e}},
+
+	{Key: F1, ASCIICode: []byte{0x1b, 0x4f, 0x50}},
+	{Key: F2, ASCIICode: []byte{0x1b, 0x4f, 0x51}},
+	{Key: F3, ASCIICode: []byte{0x1b, 0x4f, 0x52}},
+	{Key: F4, ASCIICode: []byte{0x1b, 0x4f, 0x53}},
+
+	{Key: F1, ASCIICode: []byte{0x1b, 0x4f, 0x50, 0x41}}, // Linux console
+	{Key: F2, ASCIICode: []byte{0x1b, 0x5b, 0x5b, 0x42}}, // Linux console
+	{Key: F3, ASCIICode: []byte{0x1b, 0x5b, 0x5b, 0x43}}, // Linux console
+	{Key: F4, ASCIICode: []byte{0x1b, 0x5b, 0x5b, 0x44}}, // Linux console
+	{Key: F5, ASCIICode: []byte{0x1b, 0x5b, 0x5b, 0x45}}, // Linux console
+
+	{Key: F1, ASCIICode: []byte{0x1b, 0x5b, 0x11, 0x7e}}, // rxvt-unicode
+	{Key: F2, ASCIICode: []byte{0x1b, 0x5b, 0x12, 0x7e}}, // rxvt-unicode
+	{Key: F3, ASCIICode: []byte{0x1b, 0x5b, 0x13, 0x7e}}, // rxvt-unicode
+	{Key: F4, ASCIICode: []byte{0x1b, 0x5b, 0x14, 0x7e}}, // rxvt-unicode
+
+	{Key: F5, ASCIICode: []byte{0x1b, 0x5b, 0x31, 0x35, 0x7e}},
+	{Key: F6, ASCIICode: []byte{0x1b, 0x5b, 0x31, 0x37, 0x7e}},
+	{Key: F7, ASCIICode: []byte{0x1b, 0x5b, 0x31, 0x38, 0x7e}},
+	{Key: F8, ASCIICode: []byte{0x1b, 0x5b, 0x31, 0x39, 0x7e}},
+	{Key: F9, ASCIICode: []byte{0x1b, 0x5b, 0x32, 0x30, 0x7e}},
+	{Key: F10, ASCIICode: []byte{0x1b, 0x5b, 0x32, 0x31, 0x7e}},
+	{Key: F11, ASCIICode: []byte{0x1b, 0x5b, 0x32, 0x32, 0x7e}},
+	{Key: F12, ASCIICode: []byte{0x1b, 0x5b, 0x32, 0x34, 0x7e, 0x8}},
+	{Key: F13, ASCIICode: []byte{0x1b, 0x5b, 0x25, 0x7e}},
+	{Key: F14, ASCIICode: []byte{0x1b, 0x5b, 0x26, 0x7e}},
+	{Key: F15, ASCIICode: []byte{0x1b, 0x5b, 0x28, 0x7e}},
+	{Key: F16, ASCIICode: []byte{0x1b, 0x5b, 0x29, 0x7e}},
+	{Key: F17, ASCIICode: []byte{0x1b, 0x5b, 0x31, 0x7e}},
+	{Key: F18, ASCIICode: []byte{0x1b, 0x5b, 0x32, 0x7e}},
+	{Key: F19, ASCIICode: []byte{0x1b, 0x5b, 0x33, 0x7e}},
+	{Key: F20, ASCIICode: []byte{0x1b, 0x5b, 0x34, 0x7e}},
+
+	// Xterm
+	{Key: F13, ASCIICode: []byte{0x1b, 0x5b, 0x31, 0x3b, 0x32, 0x50}},
+	{Key: F14, ASCIICode: []byte{0x1b, 0x5b, 0x31, 0x3b, 0x32, 0x51}},
+	// &ASCIICode{Key: F15, ASCIICode: []byte{0x1b, 0x5b, 0x31, 0x3b, 0x32, 0x52}},  // Conflicts with CPR response
+	{Key: F16, ASCIICode: []byte{0x1b, 0x5b, 0x31, 0x3b, 0x32, 0x52}},
+	{Key: F17, ASCIICode: []byte{0x1b, 0x5b, 0x15, 0x3b, 0x32, 0x7e}},
+	{Key: F18, ASCIICode: []byte{0x1b, 0x5b, 0x17, 0x3b, 0x32, 0x7e}},
+	{Key: F19, ASCIICode: []byte{0x1b, 0x5b, 0x18, 0x3b, 0x32, 0x7e}},
+	{Key: F20, ASCIICode: []byte{0x1b, 0x5b, 0x19, 0x3b, 0x32, 0x7e}},
+	{Key: F21, ASCIICode: []byte{0x1b, 0x5b, 0x20, 0x3b, 0x32, 0x7e}},
+	{Key: F22, ASCIICode: []byte{0x1b, 0x5b, 0x21, 0x3b, 0x32, 0x7e}},
+	{Key: F23, ASCIICode: []byte{0x1b, 0x5b, 0x23, 0x3b, 0x32, 0x7e}},
+	{Key: F24, ASCIICode: []byte{0x1b, 0x5b, 0x24, 0x3b, 0x32, 0x7e}},
+
+	{Key: ControlUp, ASCIICode: []byte{0x1b, 0x5b, 0x31, 0x3b, 0x35, 0x41}},
+	{Key: ControlDown, ASCIICode: []byte{0x1b, 0x5b, 0x31, 0x3b, 0x35, 0x42}},
+	{Key: ControlRight, ASCIICode: []byte{0x1b, 0x5b, 0x31, 0x3b, 0x35, 0x43}},
+	{Key: ControlLeft, ASCIICode: []byte{0x1b, 0x5b, 0x31, 0x3b, 0x35, 0x44}},
+
+	{Key: ShiftUp, ASCIICode: []byte{0x1b, 0x5b, 0x31, 0x3b, 0x32, 0x41}},
+	{Key: ShiftDown, ASCIICode: []byte{0x1b, 0x5b, 0x31, 0x3b, 0x32, 0x42}},
+	{Key: ShiftRight, ASCIICode: []byte{0x1b, 0x5b, 0x31, 0x3b, 0x32, 0x43}},
+	{Key: ShiftLeft, ASCIICode: []byte{0x1b, 0x5b, 0x31, 0x3b, 0x32, 0x44}},
+
+	// Tmux sends following keystrokes when control+arrow is pressed, but for
+	// Emacs ansi-term sends the same sequences for normal arrow keys. Consider
+	// it a normal arrow press, because that's more important.
+	{Key: Up, ASCIICode: []byte{0x1b, 0x4f, 0x41}},
+	{Key: Down, ASCIICode: []byte{0x1b, 0x4f, 0x42}},
+	{Key: Right, ASCIICode: []byte{0x1b, 0x4f, 0x43}},
+	{Key: Left, ASCIICode: []byte{0x1b, 0x4f, 0x44}},
+
+	{Key: ControlUp, ASCIICode: []byte{0x1b, 0x5b, 0x35, 0x41}},
+	{Key: ControlDown, ASCIICode: []byte{0x1b, 0x5b, 0x35, 0x42}},
+	{Key: ControlRight, ASCIICode: []byte{0x1b, 0x5b, 0x35, 0x43}},
+	{Key: ControlLeft, ASCIICode: []byte{0x1b, 0x5b, 0x35, 0x44}},
+
+	{Key: ControlRight, ASCIICode: []byte{0x1b, 0x5b, 0x4f, 0x63}}, // rxvt
+	{Key: ControlLeft, ASCIICode: []byte{0x1b, 0x5b, 0x4f, 0x64}},  // rxvt
+
+	{Key: Ignore, ASCIICode: []byte{0x1b, 0x5b, 0x45}}, // Xterm
+	{Key: Ignore, ASCIICode: []byte{0x1b, 0x5b, 0x46}}, // Linux console
+}
diff --git a/vendor/github.com/c-bata/go-prompt/input_posix.go b/vendor/github.com/c-bata/go-prompt/input_posix.go
new file mode 100644
index 0000000..46ecb51
--- /dev/null
+++ b/vendor/github.com/c-bata/go-prompt/input_posix.go
@@ -0,0 +1,128 @@
+// +build !windows
+
+package prompt
+
+import (
+	"bytes"
+	"log"
+	"syscall"
+	"unsafe"
+
+	"github.com/pkg/term/termios"
+)
+
+const maxReadBytes = 1024
+
+// PosixParser is a ConsoleParser implementation for POSIX environment.
+type PosixParser struct {
+	fd          int
+	origTermios syscall.Termios
+}
+
+// Setup should be called before starting input
+func (t *PosixParser) Setup() error {
+	// Set NonBlocking mode because if syscall.Read block this goroutine, it cannot receive data from stopCh.
+	if err := syscall.SetNonblock(t.fd, true); err != nil {
+		log.Println("[ERROR] Cannot set non blocking mode.")
+		return err
+	}
+	if err := t.setRawMode(); err != nil {
+		log.Println("[ERROR] Cannot set raw mode.")
+		return err
+	}
+	return nil
+}
+
+// TearDown should be called after stopping input
+func (t *PosixParser) TearDown() error {
+	if err := syscall.SetNonblock(t.fd, false); err != nil {
+		log.Println("[ERROR] Cannot set blocking mode.")
+		return err
+	}
+	if err := t.resetRawMode(); err != nil {
+		log.Println("[ERROR] Cannot reset from raw mode.")
+		return err
+	}
+	return nil
+}
+
+// Read returns byte array.
+func (t *PosixParser) Read() ([]byte, error) {
+	buf := make([]byte, maxReadBytes)
+	n, err := syscall.Read(syscall.Stdin, buf)
+	if err != nil {
+		return []byte{}, err
+	}
+	return buf[:n], nil
+}
+
+func (t *PosixParser) setRawMode() error {
+	x := t.origTermios.Lflag
+	if x &^= syscall.ICANON; x != 0 && x == t.origTermios.Lflag {
+		// fd is already raw mode
+		return nil
+	}
+	var n syscall.Termios
+	if err := termios.Tcgetattr(uintptr(t.fd), &t.origTermios); err != nil {
+		return err
+	}
+	n = t.origTermios
+	// "&^=" used like: https://play.golang.org/p/8eJw3JxS4O
+	n.Lflag &^= syscall.ECHO | syscall.ICANON | syscall.IEXTEN | syscall.ISIG
+	n.Cc[syscall.VMIN] = 1
+	n.Cc[syscall.VTIME] = 0
+	termios.Tcsetattr(uintptr(t.fd), termios.TCSANOW, &n)
+	return nil
+}
+
+func (t *PosixParser) resetRawMode() error {
+	if t.origTermios.Lflag == 0 {
+		return nil
+	}
+	return termios.Tcsetattr(uintptr(t.fd), termios.TCSANOW, &t.origTermios)
+}
+
+// GetKey returns Key correspond to input byte codes.
+func (t *PosixParser) GetKey(b []byte) Key {
+	for _, k := range asciiSequences {
+		if bytes.Equal(k.ASCIICode, b) {
+			return k.Key
+		}
+	}
+	return NotDefined
+}
+
+// winsize is winsize struct got from the ioctl(2) system call.
+type ioctlWinsize struct {
+	Row uint16
+	Col uint16
+	X   uint16 // pixel value
+	Y   uint16 // pixel value
+}
+
+// GetWinSize returns WinSize object to represent width and height of terminal.
+func (t *PosixParser) GetWinSize() *WinSize {
+	ws := &ioctlWinsize{}
+	retCode, _, errno := syscall.Syscall(
+		syscall.SYS_IOCTL,
+		uintptr(t.fd),
+		uintptr(syscall.TIOCGWINSZ),
+		uintptr(unsafe.Pointer(ws)))
+
+	if int(retCode) == -1 {
+		panic(errno)
+	}
+	return &WinSize{
+		Row: ws.Row,
+		Col: ws.Col,
+	}
+}
+
+var _ ConsoleParser = &PosixParser{}
+
+// NewStandardInputParser returns ConsoleParser object to read from stdin.
+func NewStandardInputParser() *PosixParser {
+	return &PosixParser{
+		fd: syscall.Stdin,
+	}
+}
diff --git a/vendor/github.com/c-bata/go-prompt/input_windows.go b/vendor/github.com/c-bata/go-prompt/input_windows.go
new file mode 100644
index 0000000..f52b538
--- /dev/null
+++ b/vendor/github.com/c-bata/go-prompt/input_windows.go
@@ -0,0 +1,94 @@
+// +build windows
+
+package prompt
+
+import (
+	"bytes"
+	"errors"
+	"syscall"
+	"unicode/utf8"
+	"unsafe"
+
+	"github.com/mattn/go-tty"
+)
+
+const maxReadBytes = 1024
+
+var kernel32 = syscall.NewLazyDLL("kernel32.dll")
+
+var procGetNumberOfConsoleInputEvents = kernel32.NewProc("GetNumberOfConsoleInputEvents")
+
+// WindowsParser is a ConsoleParser implementation for Win32 console.
+type WindowsParser struct {
+	tty *tty.TTY
+}
+
+// Setup should be called before starting input
+func (p *WindowsParser) Setup() error {
+	t, err := tty.Open()
+	if err != nil {
+		return err
+	}
+	p.tty = t
+	return nil
+}
+
+// TearDown should be called after stopping input
+func (p *WindowsParser) TearDown() error {
+	return p.tty.Close()
+}
+
+// GetKey returns Key correspond to input byte codes.
+func (p *WindowsParser) GetKey(b []byte) Key {
+	for _, k := range asciiSequences {
+		if bytes.Compare(k.ASCIICode, b) == 0 {
+			return k.Key
+		}
+	}
+	return NotDefined
+}
+
+// Read returns byte array.
+func (p *WindowsParser) Read() ([]byte, error) {
+	var ev uint32
+	r0, _, err := procGetNumberOfConsoleInputEvents.Call(p.tty.Input().Fd(), uintptr(unsafe.Pointer(&ev)))
+	if r0 == 0 {
+		return nil, err
+	}
+	if ev == 0 {
+		return nil, errors.New("EAGAIN")
+	}
+
+	r, err := p.tty.ReadRune()
+	if err != nil {
+		return nil, err
+	}
+
+	buf := make([]byte, maxReadBytes)
+	n := utf8.EncodeRune(buf[:], r)
+	for p.tty.Buffered() && n < maxReadBytes {
+		r, err := p.tty.ReadRune()
+		if err != nil {
+			break
+		}
+		n += utf8.EncodeRune(buf[n:], r)
+	}
+	return buf[:n], nil
+}
+
+// GetWinSize returns WinSize object to represent width and height of terminal.
+func (p *WindowsParser) GetWinSize() *WinSize {
+	w, h, err := p.tty.Size()
+	if err != nil {
+		panic(err)
+	}
+	return &WinSize{
+		Row: uint16(h),
+		Col: uint16(w),
+	}
+}
+
+// NewStandardInputParser returns ConsoleParser object to read from stdin.
+func NewStandardInputParser() *WindowsParser {
+	return &WindowsParser{}
+}
diff --git a/vendor/github.com/c-bata/go-prompt/key.go b/vendor/github.com/c-bata/go-prompt/key.go
new file mode 100644
index 0000000..068b70e
--- /dev/null
+++ b/vendor/github.com/c-bata/go-prompt/key.go
@@ -0,0 +1,127 @@
+// Code generated "This is a fake comment to avoid golint errors"; DO NOT EDIT.
+// FIXME: This is a little bit stupid, but there are many public constants which is no value for writing godoc comment.
+
+package prompt
+
+// Key is the type express the key inserted from user.
+type Key int
+
+// ASCIICode is the type contains Key and it's ascii byte array.
+type ASCIICode struct {
+	Key       Key
+	ASCIICode []byte
+}
+
+const (
+	Escape Key = iota
+
+	ControlA
+	ControlB
+	ControlC
+	ControlD
+	ControlE
+	ControlF
+	ControlG
+	ControlH
+	ControlI
+	ControlJ
+	ControlK
+	ControlL
+	ControlM
+	ControlN
+	ControlO
+	ControlP
+	ControlQ
+	ControlR
+	ControlS
+	ControlT
+	ControlU
+	ControlV
+	ControlW
+	ControlX
+	ControlY
+	ControlZ
+
+	ControlSpace
+	ControlBackslash
+	ControlSquareClose
+	ControlCircumflex
+	ControlUnderscore
+	ControlLeft
+	ControlRight
+	ControlUp
+	ControlDown
+
+	Up
+	Down
+	Right
+	Left
+
+	ShiftLeft
+	ShiftUp
+	ShiftDown
+	ShiftRight
+
+	Home
+	End
+	Delete
+	ShiftDelete
+	ControlDelete
+	PageUp
+	PageDown
+	BackTab
+	Insert
+	Backspace
+
+	// Aliases.
+	Tab
+	Enter
+	// Actually Enter equals ControlM, not ControlJ,
+	// However, in prompt_toolkit, we made the mistake of translating
+	// \r into \n during the input, so everyone is now handling the
+	// enter key by binding ControlJ.
+
+	// From now on, it's better to bind `ASCII_SEQUENCES.Enter` everywhere,
+	// because that's future compatible, and will still work when we
+	// stop replacing \r by \n.
+
+	F1
+	F2
+	F3
+	F4
+	F5
+	F6
+	F7
+	F8
+	F9
+	F10
+	F11
+	F12
+	F13
+	F14
+	F15
+	F16
+	F17
+	F18
+	F19
+	F20
+	F21
+	F22
+	F23
+	F24
+
+	// Matches any key.
+	Any
+
+	// Special
+	CPRResponse
+	Vt100MouseEvent
+	WindowsMouseEvent
+	BracketedPaste
+
+	// Key which is ignored. (The key binding for this key should not do anything.)
+	Ignore
+
+	// Key is not defined
+	NotDefined
+)
diff --git a/vendor/github.com/c-bata/go-prompt/key_bind.go b/vendor/github.com/c-bata/go-prompt/key_bind.go
new file mode 100644
index 0000000..42669e7
--- /dev/null
+++ b/vendor/github.com/c-bata/go-prompt/key_bind.go
@@ -0,0 +1,59 @@
+package prompt
+
+// KeyBindFunc receives buffer and processed it.
+type KeyBindFunc func(*Buffer)
+
+// KeyBind represents which key should do what operation.
+type KeyBind struct {
+	Key Key
+	Fn  KeyBindFunc
+}
+
+// ASCIICodeBind represents which []byte should do what operation
+type ASCIICodeBind struct {
+	ASCIICode []byte
+	Fn        KeyBindFunc
+}
+
+// KeyBindMode to switch a key binding flexibly.
+type KeyBindMode string
+
+const (
+	// CommonKeyBind is a mode without any keyboard shortcut
+	CommonKeyBind KeyBindMode = "common"
+	// EmacsKeyBind is a mode to use emacs-like keyboard shortcut
+	EmacsKeyBind KeyBindMode = "emacs"
+)
+
+var commonKeyBindings = []KeyBind{
+	// Go to the End of the line
+	{
+		Key: End,
+		Fn:  GoLineEnd,
+	},
+	// Go to the beginning of the line
+	{
+		Key: Home,
+		Fn:  GoLineBeginning,
+	},
+	// Delete character under the cursor
+	{
+		Key: Delete,
+		Fn:  DeleteChar,
+	},
+	// Backspace
+	{
+		Key: Backspace,
+		Fn:  DeleteBeforeChar,
+	},
+	// Right allow: Forward one character
+	{
+		Key: Right,
+		Fn:  GoRightChar,
+	},
+	// Left allow: Backward one character
+	{
+		Key: Left,
+		Fn:  GoLeftChar,
+	},
+}
diff --git a/vendor/github.com/c-bata/go-prompt/key_bind_func.go b/vendor/github.com/c-bata/go-prompt/key_bind_func.go
new file mode 100644
index 0000000..7b2ecdf
--- /dev/null
+++ b/vendor/github.com/c-bata/go-prompt/key_bind_func.go
@@ -0,0 +1,48 @@
+package prompt
+
+// GoLineEnd Go to the End of the line
+func GoLineEnd(buf *Buffer) {
+	x := []rune(buf.Document().TextAfterCursor())
+	buf.CursorRight(len(x))
+}
+
+// GoLineBeginning Go to the beginning of the line
+func GoLineBeginning(buf *Buffer) {
+	x := []rune(buf.Document().TextBeforeCursor())
+	buf.CursorLeft(len(x))
+}
+
+// DeleteChar Delete character under the cursor
+func DeleteChar(buf *Buffer) {
+	buf.Delete(1)
+}
+
+// DeleteWord Delete word before the cursor
+func DeleteWord(buf *Buffer) {
+	buf.DeleteBeforeCursor(len([]rune(buf.Document().TextBeforeCursor())) - buf.Document().FindStartOfPreviousWordWithSpace())
+}
+
+// DeleteBeforeChar Go to Backspace
+func DeleteBeforeChar(buf *Buffer) {
+	buf.DeleteBeforeCursor(1)
+}
+
+// GoRightChar Forward one character
+func GoRightChar(buf *Buffer) {
+	buf.CursorRight(1)
+}
+
+// GoLeftChar Backward one character
+func GoLeftChar(buf *Buffer) {
+	buf.CursorLeft(1)
+}
+
+// GoRightWord Forward one word
+func GoRightWord(buf *Buffer) {
+	buf.CursorRight(buf.Document().FindEndOfCurrentWordWithSpace())
+}
+
+// GoLeftWord Backward one word
+func GoLeftWord(buf *Buffer) {
+	buf.CursorLeft(len([]rune(buf.Document().TextBeforeCursor())) - buf.Document().FindStartOfPreviousWordWithSpace())
+}
diff --git a/vendor/github.com/c-bata/go-prompt/key_string.go b/vendor/github.com/c-bata/go-prompt/key_string.go
new file mode 100644
index 0000000..fce6ea3
--- /dev/null
+++ b/vendor/github.com/c-bata/go-prompt/key_string.go
@@ -0,0 +1,16 @@
+// Code generated by "stringer -type=Key"; DO NOT EDIT.
+
+package prompt
+
+import "strconv"
+
+const _Key_name = "EscapeControlAControlBControlCControlDControlEControlFControlGControlHControlIControlJControlKControlLControlMControlNControlOControlPControlQControlRControlSControlTControlUControlVControlWControlXControlYControlZControlSpaceControlBackslashControlSquareCloseControlCircumflexControlUnderscoreControlLeftControlRightControlUpControlDownUpDownRightLeftShiftLeftShiftUpShiftDownShiftRightHomeEndDeleteShiftDeleteControlDeletePageUpPageDownBackTabInsertBackspaceTabEnterF1F2F [...]
+
+var _Key_index = [...]uint16{0, 6, 14, 22, 30, 38, 46, 54, 62, 70, 78, 86, 94, 102, 110, 118, 126, 134, 142, 150, 158, 166, 174, 182, 190, 198, 206, 214, 226, 242, 260, 277, 294, 305, 317, 326, 337, 339, 343, 348, 352, 361, 368, 377, 387, 391, 394, 400, 411, 424, 430, 438, 445, 451, 460, 463, 468, 470, 472, 474, 476, 478, 480, 482, 484, 486, 489, 492, 495, 498, 501, 504, 507, 510, 513, 516, 519, 522, 525, 528, 531, 534, 545, 560, 577, 591, 597, 607}
+
+func (i Key) String() string {
+	if i < 0 || i >= Key(len(_Key_index)-1) {
+		return "Key(" + strconv.FormatInt(int64(i), 10) + ")"
+	}
+	return _Key_name[_Key_index[i]:_Key_index[i+1]]
+}
diff --git a/vendor/github.com/c-bata/go-prompt/option.go b/vendor/github.com/c-bata/go-prompt/option.go
new file mode 100644
index 0000000..9a7f386
--- /dev/null
+++ b/vendor/github.com/c-bata/go-prompt/option.go
@@ -0,0 +1,266 @@
+package prompt
+
+// Option is the type to replace default parameters.
+// prompt.New accepts any number of options (this is functional option pattern).
+type Option func(prompt *Prompt) error
+
+// OptionParser to set a custom ConsoleParser object. An argument should implement ConsoleParser interface.
+func OptionParser(x ConsoleParser) Option {
+	return func(p *Prompt) error {
+		p.in = x
+		return nil
+	}
+}
+
+// OptionWriter to set a custom ConsoleWriter object. An argument should implement ConsoleWriter interface.
+func OptionWriter(x ConsoleWriter) Option {
+	return func(p *Prompt) error {
+		p.renderer.out = x
+		return nil
+	}
+}
+
+// OptionTitle to set title displayed at the header bar of terminal.
+func OptionTitle(x string) Option {
+	return func(p *Prompt) error {
+		p.renderer.title = x
+		return nil
+	}
+}
+
+// OptionPrefix to set prefix string.
+func OptionPrefix(x string) Option {
+	return func(p *Prompt) error {
+		p.renderer.prefix = x
+		return nil
+	}
+}
+
+// OptionCompletionWordSeparator to set word separators. Enable only ' ' if empty.
+func OptionCompletionWordSeparator(x string) Option {
+	return func(p *Prompt) error {
+		p.completion.wordSeparator = x
+		return nil
+	}
+}
+
+// OptionLivePrefix to change the prefix dynamically by callback function
+func OptionLivePrefix(f func() (prefix string, useLivePrefix bool)) Option {
+	return func(p *Prompt) error {
+		p.renderer.livePrefixCallback = f
+		return nil
+	}
+}
+
+// OptionPrefixTextColor change a text color of prefix string
+func OptionPrefixTextColor(x Color) Option {
+	return func(p *Prompt) error {
+		p.renderer.prefixTextColor = x
+		return nil
+	}
+}
+
+// OptionPrefixBackgroundColor to change a background color of prefix string
+func OptionPrefixBackgroundColor(x Color) Option {
+	return func(p *Prompt) error {
+		p.renderer.prefixBGColor = x
+		return nil
+	}
+}
+
+// OptionInputTextColor to change a color of text which is input by user
+func OptionInputTextColor(x Color) Option {
+	return func(p *Prompt) error {
+		p.renderer.inputTextColor = x
+		return nil
+	}
+}
+
+// OptionInputBGColor to change a color of background which is input by user
+func OptionInputBGColor(x Color) Option {
+	return func(p *Prompt) error {
+		p.renderer.inputBGColor = x
+		return nil
+	}
+}
+
+// OptionPreviewSuggestionTextColor to change a text color which is completed
+func OptionPreviewSuggestionTextColor(x Color) Option {
+	return func(p *Prompt) error {
+		p.renderer.previewSuggestionTextColor = x
+		return nil
+	}
+}
+
+// OptionPreviewSuggestionBGColor to change a background color which is completed
+func OptionPreviewSuggestionBGColor(x Color) Option {
+	return func(p *Prompt) error {
+		p.renderer.previewSuggestionBGColor = x
+		return nil
+	}
+}
+
+// OptionSuggestionTextColor to change a text color in drop down suggestions.
+func OptionSuggestionTextColor(x Color) Option {
+	return func(p *Prompt) error {
+		p.renderer.suggestionTextColor = x
+		return nil
+	}
+}
+
+// OptionSuggestionBGColor change a background color in drop down suggestions.
+func OptionSuggestionBGColor(x Color) Option {
+	return func(p *Prompt) error {
+		p.renderer.suggestionBGColor = x
+		return nil
+	}
+}
+
+// OptionSelectedSuggestionTextColor to change a text color for completed text which is selected inside suggestions drop down box.
+func OptionSelectedSuggestionTextColor(x Color) Option {
+	return func(p *Prompt) error {
+		p.renderer.selectedSuggestionTextColor = x
+		return nil
+	}
+}
+
+// OptionSelectedSuggestionBGColor to change a background color for completed text which is selected inside suggestions drop down box.
+func OptionSelectedSuggestionBGColor(x Color) Option {
+	return func(p *Prompt) error {
+		p.renderer.selectedSuggestionBGColor = x
+		return nil
+	}
+}
+
+// OptionDescriptionTextColor to change a background color of description text in drop down suggestions.
+func OptionDescriptionTextColor(x Color) Option {
+	return func(p *Prompt) error {
+		p.renderer.descriptionTextColor = x
+		return nil
+	}
+}
+
+// OptionDescriptionBGColor to change a background color of description text in drop down suggestions.
+func OptionDescriptionBGColor(x Color) Option {
+	return func(p *Prompt) error {
+		p.renderer.descriptionBGColor = x
+		return nil
+	}
+}
+
+// OptionSelectedDescriptionTextColor to change a text color of description which is selected inside suggestions drop down box.
+func OptionSelectedDescriptionTextColor(x Color) Option {
+	return func(p *Prompt) error {
+		p.renderer.selectedDescriptionTextColor = x
+		return nil
+	}
+}
+
+// OptionSelectedDescriptionBGColor to change a background color of description which is selected inside suggestions drop down box.
+func OptionSelectedDescriptionBGColor(x Color) Option {
+	return func(p *Prompt) error {
+		p.renderer.selectedDescriptionBGColor = x
+		return nil
+	}
+}
+
+// OptionScrollbarThumbColor to change a thumb color on scrollbar.
+func OptionScrollbarThumbColor(x Color) Option {
+	return func(p *Prompt) error {
+		p.renderer.scrollbarThumbColor = x
+		return nil
+	}
+}
+
+// OptionScrollbarBGColor to change a background color of scrollbar.
+func OptionScrollbarBGColor(x Color) Option {
+	return func(p *Prompt) error {
+		p.renderer.scrollbarBGColor = x
+		return nil
+	}
+}
+
+// OptionMaxSuggestion specify the max number of displayed suggestions.
+func OptionMaxSuggestion(x uint16) Option {
+	return func(p *Prompt) error {
+		p.completion.max = x
+		return nil
+	}
+}
+
+// OptionHistory to set history expressed by string array.
+func OptionHistory(x []string) Option {
+	return func(p *Prompt) error {
+		p.history.histories = x
+		p.history.Clear()
+		return nil
+	}
+}
+
+// OptionSwitchKeyBindMode set a key bind mode.
+func OptionSwitchKeyBindMode(m KeyBindMode) Option {
+	return func(p *Prompt) error {
+		p.keyBindMode = m
+		return nil
+	}
+}
+
+// SwitchKeyBindMode to set a key bind mode.
+// Deprecated: Please use OptionSwitchKeyBindMode.
+var SwitchKeyBindMode = OptionSwitchKeyBindMode
+
+// OptionAddKeyBind to set a custom key bind.
+func OptionAddKeyBind(b ...KeyBind) Option {
+	return func(p *Prompt) error {
+		p.keyBindings = append(p.keyBindings, b...)
+		return nil
+	}
+}
+
+// OptionAddASCIICodeBind to set a custom key bind.
+func OptionAddASCIICodeBind(b ...ASCIICodeBind) Option {
+	return func(p *Prompt) error {
+		p.ASCIICodeBindings = append(p.ASCIICodeBindings, b...)
+		return nil
+	}
+}
+
+// New returns a Prompt with powerful auto-completion.
+func New(executor Executor, completer Completer, opts ...Option) *Prompt {
+	pt := &Prompt{
+		in: NewStandardInputParser(),
+		renderer: &Render{
+			prefix:                       "> ",
+			out:                          NewStandardOutputWriter(),
+			livePrefixCallback:           func() (string, bool) { return "", false },
+			prefixTextColor:              Blue,
+			prefixBGColor:                DefaultColor,
+			inputTextColor:               DefaultColor,
+			inputBGColor:                 DefaultColor,
+			previewSuggestionTextColor:   Green,
+			previewSuggestionBGColor:     DefaultColor,
+			suggestionTextColor:          White,
+			suggestionBGColor:            Cyan,
+			selectedSuggestionTextColor:  Black,
+			selectedSuggestionBGColor:    Turquoise,
+			descriptionTextColor:         Black,
+			descriptionBGColor:           Turquoise,
+			selectedDescriptionTextColor: White,
+			selectedDescriptionBGColor:   Cyan,
+			scrollbarThumbColor:          DarkGray,
+			scrollbarBGColor:             Cyan,
+		},
+		buf:         NewBuffer(),
+		executor:    executor,
+		history:     NewHistory(),
+		completion:  NewCompletionManager(completer, 6),
+		keyBindMode: EmacsKeyBind, // All the above assume that bash is running in the default Emacs setting
+	}
+
+	for _, opt := range opts {
+		if err := opt(pt); err != nil {
+			panic(err)
+		}
+	}
+	return pt
+}
diff --git a/vendor/github.com/c-bata/go-prompt/output.go b/vendor/github.com/c-bata/go-prompt/output.go
new file mode 100644
index 0000000..5afb81c
--- /dev/null
+++ b/vendor/github.com/c-bata/go-prompt/output.go
@@ -0,0 +1,148 @@
+package prompt
+
+// DisplayAttribute represents display  attributes like Blinking, Bold, Italic and so on.
+type DisplayAttribute int
+
+const (
+	// DisplayReset reset all display attributes.
+	DisplayReset DisplayAttribute = iota
+	// DisplayBold set bold or increases intensity.
+	DisplayBold
+	// DisplayLowIntensity decreases intensity. Not widely supported.
+	DisplayLowIntensity
+	// DisplayItalic set italic. Not widely supported.
+	DisplayItalic
+	// DisplayUnderline set underline
+	DisplayUnderline
+	// DisplayBlink set blink (less than 150 per minute).
+	DisplayBlink
+	// DisplayRapidBlink set blink (more than 150 per minute). Not widely supported.
+	DisplayRapidBlink
+	// DisplayReverse swap foreground and background colors.
+	DisplayReverse
+	// DisplayInvisible set invisible.  Not widely supported.
+	DisplayInvisible
+	// DisplayCrossedOut set characters legible, but marked for deletion. Not widely supported.
+	DisplayCrossedOut
+	// DisplayDefaultFont set primary(default) font
+	DisplayDefaultFont
+)
+
+// Color represents color on terminal.
+type Color int
+
+const (
+	// DefaultColor represents a default color.
+	DefaultColor Color = iota
+
+	// Low intensity
+
+	// Black represents a black.
+	Black
+	// DarkRed represents a dark red.
+	DarkRed
+	// DarkGreen represents a dark green.
+	DarkGreen
+	// Brown represents a brown.
+	Brown
+	// DarkBlue represents a dark blue.
+	DarkBlue
+	// Purple represents a purple.
+	Purple
+	// Cyan represents a cyan.
+	Cyan
+	// LightGray represents a light gray.
+	LightGray
+
+	// High intensity
+
+	// DarkGray represents a dark gray.
+	DarkGray
+	// Red represents a red.
+	Red
+	// Green represents a green.
+	Green
+	// Yellow represents a yellow.
+	Yellow
+	// Blue represents a blue.
+	Blue
+	// Fuchsia represents a fuchsia.
+	Fuchsia
+	// Turquoise represents a turquoise.
+	Turquoise
+	// White represents a white.
+	White
+)
+
+// ConsoleWriter is an interface to abstract output layer.
+type ConsoleWriter interface {
+	/* Write */
+
+	// WriteRaw to write raw byte array.
+	WriteRaw(data []byte)
+	// Write to write safety byte array by removing control sequences.
+	Write(data []byte)
+	// WriteStr to write raw string.
+	WriteRawStr(data string)
+	// WriteStr to write safety string by removing control sequences.
+	WriteStr(data string)
+	// Flush to flush buffer.
+	Flush() error
+
+	/* Erasing */
+
+	// EraseScreen erases the screen with the background colour and moves the cursor to home.
+	EraseScreen()
+	// EraseUp erases the screen from the current line up to the top of the screen.
+	EraseUp()
+	// EraseDown erases the screen from the current line down to the bottom of the screen.
+	EraseDown()
+	// EraseStartOfLine erases from the current cursor position to the start of the current line.
+	EraseStartOfLine()
+	// EraseEndOfLine erases from the current cursor position to the end of the current line.
+	EraseEndOfLine()
+	// EraseLine erases the entire current line.
+	EraseLine()
+
+	/* Cursor */
+
+	// ShowCursor stops blinking cursor and show.
+	ShowCursor()
+	// HideCursor hides cursor.
+	HideCursor()
+	// CursorGoTo sets the cursor position where subsequent text will begin.
+	CursorGoTo(row, col int)
+	// CursorUp moves the cursor up by 'n' rows; the default count is 1.
+	CursorUp(n int)
+	// CursorDown moves the cursor down by 'n' rows; the default count is 1.
+	CursorDown(n int)
+	// CursorForward moves the cursor forward by 'n' columns; the default count is 1.
+	CursorForward(n int)
+	// CursorBackward moves the cursor backward by 'n' columns; the default count is 1.
+	CursorBackward(n int)
+	// AskForCPR asks for a cursor position report (CPR).
+	AskForCPR()
+	// SaveCursor saves current cursor position.
+	SaveCursor()
+	// UnSaveCursor restores cursor position after a Save Cursor.
+	UnSaveCursor()
+
+	/* Scrolling */
+
+	// ScrollDown scrolls display down one line.
+	ScrollDown()
+	// ScrollUp scroll display up one line.
+	ScrollUp()
+
+	/* Title */
+
+	// SetTitle sets a title of terminal window.
+	SetTitle(title string)
+	// ClearTitle clears a title of terminal window.
+	ClearTitle()
+
+	/* Font */
+
+	// SetColor sets text and background colors. and specify whether text is bold.
+	SetColor(fg, bg Color, bold bool)
+}
diff --git a/vendor/github.com/c-bata/go-prompt/output_posix.go b/vendor/github.com/c-bata/go-prompt/output_posix.go
new file mode 100644
index 0000000..4c2ccf6
--- /dev/null
+++ b/vendor/github.com/c-bata/go-prompt/output_posix.go
@@ -0,0 +1,35 @@
+// +build !windows
+
+package prompt
+
+import (
+	"syscall"
+)
+
+// PosixWriter is a ConsoleWriter implementation for POSIX environment.
+// To control terminal emulator, this outputs VT100 escape sequences.
+type PosixWriter struct {
+	VT100Writer
+	fd int
+}
+
+// Flush to flush buffer
+func (w *PosixWriter) Flush() error {
+	_, err := syscall.Write(w.fd, w.buffer)
+	if err != nil {
+		return err
+	}
+	w.buffer = []byte{}
+	return nil
+}
+
+var _ ConsoleWriter = &PosixWriter{}
+
+// NewStandardOutputWriter returns ConsoleWriter object to write to stdout.
+// This generates VT100 escape sequences because almost terminal emulators
+// in POSIX OS built on top of a VT100 specification.
+func NewStandardOutputWriter() *PosixWriter {
+	return &PosixWriter{
+		fd: syscall.Stdout,
+	}
+}
diff --git a/vendor/github.com/c-bata/go-prompt/output_vt100.go b/vendor/github.com/c-bata/go-prompt/output_vt100.go
new file mode 100644
index 0000000..3b3031d
--- /dev/null
+++ b/vendor/github.com/c-bata/go-prompt/output_vt100.go
@@ -0,0 +1,333 @@
+package prompt
+
+import (
+	"bytes"
+	"strconv"
+)
+
+// VT100Writer generates VT100 escape sequences.
+type VT100Writer struct {
+	buffer []byte
+}
+
+// WriteRaw to write raw byte array
+func (w *VT100Writer) WriteRaw(data []byte) {
+	w.buffer = append(w.buffer, data...)
+	return
+}
+
+// Write to write safety byte array by removing control sequences.
+func (w *VT100Writer) Write(data []byte) {
+	w.WriteRaw(bytes.Replace(data, []byte{0x1b}, []byte{'?'}, -1))
+	return
+}
+
+// WriteRawStr to write raw string
+func (w *VT100Writer) WriteRawStr(data string) {
+	w.WriteRaw([]byte(data))
+	return
+}
+
+// WriteStr to write safety string by removing control sequences.
+func (w *VT100Writer) WriteStr(data string) {
+	w.Write([]byte(data))
+	return
+}
+
+/* Erase */
+
+// EraseScreen erases the screen with the background colour and moves the cursor to home.
+func (w *VT100Writer) EraseScreen() {
+	w.WriteRaw([]byte{0x1b, '[', '2', 'J'})
+	return
+}
+
+// EraseUp erases the screen from the current line up to the top of the screen.
+func (w *VT100Writer) EraseUp() {
+	w.WriteRaw([]byte{0x1b, '[', '1', 'J'})
+	return
+}
+
+// EraseDown erases the screen from the current line down to the bottom of the screen.
+func (w *VT100Writer) EraseDown() {
+	w.WriteRaw([]byte{0x1b, '[', 'J'})
+	return
+}
+
+// EraseStartOfLine erases from the current cursor position to the start of the current line.
+func (w *VT100Writer) EraseStartOfLine() {
+	w.WriteRaw([]byte{0x1b, '[', '1', 'K'})
+	return
+}
+
+// EraseEndOfLine erases from the current cursor position to the end of the current line.
+func (w *VT100Writer) EraseEndOfLine() {
+	w.WriteRaw([]byte{0x1b, '[', 'K'})
+	return
+}
+
+// EraseLine erases the entire current line.
+func (w *VT100Writer) EraseLine() {
+	w.WriteRaw([]byte{0x1b, '[', '2', 'K'})
+	return
+}
+
+/* Cursor */
+
+// ShowCursor stops blinking cursor and show.
+func (w *VT100Writer) ShowCursor() {
+	w.WriteRaw([]byte{0x1b, '[', '?', '1', '2', 'l', 0x1b, '[', '?', '2', '5', 'h'})
+}
+
+// HideCursor hides cursor.
+func (w *VT100Writer) HideCursor() {
+	w.WriteRaw([]byte{0x1b, '[', '?', '2', '5', 'l'})
+	return
+}
+
+// CursorGoTo sets the cursor position where subsequent text will begin.
+func (w *VT100Writer) CursorGoTo(row, col int) {
+	if row == 0 && col == 0 {
+		// If no row/column parameters are provided (ie. <ESC>[H), the cursor will move to the home position.
+		w.WriteRaw([]byte{0x1b, '[', 'H'})
+		return
+	}
+	r := strconv.Itoa(row)
+	c := strconv.Itoa(col)
+	w.WriteRaw([]byte{0x1b, '['})
+	w.WriteRaw([]byte(r))
+	w.WriteRaw([]byte{';'})
+	w.WriteRaw([]byte(c))
+	w.WriteRaw([]byte{'H'})
+	return
+}
+
+// CursorUp moves the cursor up by 'n' rows; the default count is 1.
+func (w *VT100Writer) CursorUp(n int) {
+	if n == 0 {
+		return
+	} else if n < 0 {
+		w.CursorDown(-n)
+		return
+	}
+	s := strconv.Itoa(n)
+	w.WriteRaw([]byte{0x1b, '['})
+	w.WriteRaw([]byte(s))
+	w.WriteRaw([]byte{'A'})
+	return
+}
+
+// CursorDown moves the cursor down by 'n' rows; the default count is 1.
+func (w *VT100Writer) CursorDown(n int) {
+	if n == 0 {
+		return
+	} else if n < 0 {
+		w.CursorUp(-n)
+		return
+	}
+	s := strconv.Itoa(n)
+	w.WriteRaw([]byte{0x1b, '['})
+	w.WriteRaw([]byte(s))
+	w.WriteRaw([]byte{'B'})
+	return
+}
+
+// CursorForward moves the cursor forward by 'n' columns; the default count is 1.
+func (w *VT100Writer) CursorForward(n int) {
+	if n == 0 {
+		return
+	} else if n < 0 {
+		w.CursorBackward(-n)
+		return
+	}
+	s := strconv.Itoa(n)
+	w.WriteRaw([]byte{0x1b, '['})
+	w.WriteRaw([]byte(s))
+	w.WriteRaw([]byte{'C'})
+	return
+}
+
+// CursorBackward moves the cursor backward by 'n' columns; the default count is 1.
+func (w *VT100Writer) CursorBackward(n int) {
+	if n == 0 {
+		return
+	} else if n < 0 {
+		w.CursorForward(-n)
+		return
+	}
+	s := strconv.Itoa(n)
+	w.WriteRaw([]byte{0x1b, '['})
+	w.WriteRaw([]byte(s))
+	w.WriteRaw([]byte{'D'})
+	return
+}
+
+// AskForCPR asks for a cursor position report (CPR).
+func (w *VT100Writer) AskForCPR() {
+	// CPR: Cursor Position Request.
+	w.WriteRaw([]byte{0x1b, '[', '6', 'n'})
+	return
+}
+
+// SaveCursor saves current cursor position.
+func (w *VT100Writer) SaveCursor() {
+	w.WriteRaw([]byte{0x1b, '[', 's'})
+	return
+}
+
+// UnSaveCursor restores cursor position after a Save Cursor.
+func (w *VT100Writer) UnSaveCursor() {
+	w.WriteRaw([]byte{0x1b, '[', 'u'})
+	return
+}
+
+/* Scrolling */
+
+// ScrollDown scrolls display down one line.
+func (w *VT100Writer) ScrollDown() {
+	w.WriteRaw([]byte{0x1b, 'D'})
+	return
+}
+
+// ScrollUp scroll display up one line.
+func (w *VT100Writer) ScrollUp() {
+	w.WriteRaw([]byte{0x1b, 'M'})
+	return
+}
+
+/* Title */
+
+// SetTitle sets a title of terminal window.
+func (w *VT100Writer) SetTitle(title string) {
+	titleBytes := []byte(title)
+	patterns := []struct {
+		from []byte
+		to   []byte
+	}{
+		{
+			from: []byte{0x13},
+			to:   []byte{},
+		},
+		{
+			from: []byte{0x07},
+			to:   []byte{},
+		},
+	}
+	for i := range patterns {
+		titleBytes = bytes.Replace(titleBytes, patterns[i].from, patterns[i].to, -1)
+	}
+
+	w.WriteRaw([]byte{0x1b, ']', '2', ';'})
+	w.WriteRaw(titleBytes)
+	w.WriteRaw([]byte{0x07})
+	return
+}
+
+// ClearTitle clears a title of terminal window.
+func (w *VT100Writer) ClearTitle() {
+	w.WriteRaw([]byte{0x1b, ']', '2', ';', 0x07})
+	return
+}
+
+/* Font */
+
+// SetColor sets text and background colors. and specify whether text is bold.
+func (w *VT100Writer) SetColor(fg, bg Color, bold bool) {
+	if bold {
+		w.SetDisplayAttributes(fg, bg, DisplayBold)
+	} else {
+		w.SetDisplayAttributes(fg, bg, DisplayDefaultFont)
+	}
+	return
+}
+
+// SetDisplayAttributes to set VT100 display attributes.
+func (w *VT100Writer) SetDisplayAttributes(fg, bg Color, attrs ...DisplayAttribute) {
+	w.WriteRaw([]byte{0x1b, '['}) // control sequence introducer
+	defer w.WriteRaw([]byte{'m'}) // final character
+
+	var separator byte = ';'
+	for i := range attrs {
+		p, ok := displayAttributeParameters[attrs[i]]
+		if !ok {
+			continue
+		}
+		w.WriteRaw(p)
+		w.WriteRaw([]byte{separator})
+	}
+
+	f, ok := foregroundANSIColors[fg]
+	if !ok {
+		f = foregroundANSIColors[DefaultColor]
+	}
+	w.WriteRaw(f)
+	w.WriteRaw([]byte{separator})
+	b, ok := backgroundANSIColors[bg]
+	if !ok {
+		b = backgroundANSIColors[DefaultColor]
+	}
+	w.WriteRaw(b)
+	return
+}
+
+var displayAttributeParameters = map[DisplayAttribute][]byte{
+	DisplayReset:        {'0'},
+	DisplayBold:         {'1'},
+	DisplayLowIntensity: {'2'},
+	DisplayItalic:       {'3'},
+	DisplayUnderline:    {'4'},
+	DisplayBlink:        {'5'},
+	DisplayRapidBlink:   {'6'},
+	DisplayReverse:      {'7'},
+	DisplayInvisible:    {'8'},
+	DisplayCrossedOut:   {'9'},
+	DisplayDefaultFont:  {'1', '0'},
+}
+
+var foregroundANSIColors = map[Color][]byte{
+	DefaultColor: {'3', '9'},
+
+	// Low intensity.
+	Black:     {'3', '0'},
+	DarkRed:   {'3', '1'},
+	DarkGreen: {'3', '2'},
+	Brown:     {'3', '3'},
+	DarkBlue:  {'3', '4'},
+	Purple:    {'3', '5'},
+	Cyan:      {'3', '6'},
+	LightGray: {'3', '7'},
+
+	// High intensity.
+	DarkGray:  {'9', '0'},
+	Red:       {'9', '1'},
+	Green:     {'9', '2'},
+	Yellow:    {'9', '3'},
+	Blue:      {'9', '4'},
+	Fuchsia:   {'9', '5'},
+	Turquoise: {'9', '6'},
+	White:     {'9', '7'},
+}
+
+var backgroundANSIColors = map[Color][]byte{
+	DefaultColor: {'4', '9'},
+
+	// Low intensity.
+	Black:     {'4', '0'},
+	DarkRed:   {'4', '1'},
+	DarkGreen: {'4', '2'},
+	Brown:     {'4', '3'},
+	DarkBlue:  {'4', '4'},
+	Purple:    {'4', '5'},
+	Cyan:      {'4', '6'},
+	LightGray: {'4', '7'},
+
+	// High intensity
+	DarkGray:  {'1', '0', '0'},
+	Red:       {'1', '0', '1'},
+	Green:     {'1', '0', '2'},
+	Yellow:    {'1', '0', '3'},
+	Blue:      {'1', '0', '4'},
+	Fuchsia:   {'1', '0', '5'},
+	Turquoise: {'1', '0', '6'},
+	White:     {'1', '0', '7'},
+}
diff --git a/vendor/github.com/c-bata/go-prompt/output_windows.go b/vendor/github.com/c-bata/go-prompt/output_windows.go
new file mode 100644
index 0000000..7418af3
--- /dev/null
+++ b/vendor/github.com/c-bata/go-prompt/output_windows.go
@@ -0,0 +1,36 @@
+// +build windows
+
+package prompt
+
+import (
+	"io"
+
+	"github.com/mattn/go-colorable"
+)
+
+// WindowsWriter is a ConsoleWriter implementation for Win32 console.
+// Output is converted from VT100 escape sequences by mattn/go-colorable.
+type WindowsWriter struct {
+	VT100Writer
+	out io.Writer
+}
+
+// Flush to flush buffer
+func (w *WindowsWriter) Flush() error {
+	_, err := w.out.Write(w.buffer)
+	if err != nil {
+		return err
+	}
+	w.buffer = []byte{}
+	return nil
+}
+
+var _ ConsoleWriter = &WindowsWriter{}
+
+// NewStandardOutputWriter returns ConsoleWriter object to write to stdout.
+// This generates win32 control sequences.
+func NewStandardOutputWriter() *WindowsWriter {
+	return &WindowsWriter{
+		out: colorable.NewColorableStdout(),
+	}
+}
diff --git a/vendor/github.com/c-bata/go-prompt/prompt.go b/vendor/github.com/c-bata/go-prompt/prompt.go
new file mode 100644
index 0000000..6f72944
--- /dev/null
+++ b/vendor/github.com/c-bata/go-prompt/prompt.go
@@ -0,0 +1,286 @@
+package prompt
+
+import (
+	"bytes"
+	"io/ioutil"
+	"log"
+	"os"
+	"time"
+)
+
+const (
+	envDebugLogPath = "GO_PROMPT_LOG_PATH"
+)
+
+// Executor is called when user input something text.
+type Executor func(string)
+
+// Completer should return the suggest item from Document.
+type Completer func(Document) []Suggest
+
+// Prompt is core struct of go-prompt.
+type Prompt struct {
+	in                ConsoleParser
+	buf               *Buffer
+	renderer          *Render
+	executor          Executor
+	history           *History
+	completion        *CompletionManager
+	keyBindings       []KeyBind
+	ASCIICodeBindings []ASCIICodeBind
+	keyBindMode       KeyBindMode
+}
+
+// Exec is the struct contains user input context.
+type Exec struct {
+	input string
+}
+
+// Run starts prompt.
+func (p *Prompt) Run() {
+	if l := os.Getenv(envDebugLogPath); l == "" {
+		log.SetOutput(ioutil.Discard)
+	} else if f, err := os.OpenFile(l, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0666); err != nil {
+		log.SetOutput(ioutil.Discard)
+	} else {
+		defer f.Close()
+		log.SetOutput(f)
+		log.Println("[INFO] Logging is enabled.")
+	}
+
+	p.setUp()
+	defer p.tearDown()
+
+	p.renderer.Render(p.buf, p.completion)
+
+	bufCh := make(chan []byte, 128)
+	stopReadBufCh := make(chan struct{})
+	go p.readBuffer(bufCh, stopReadBufCh)
+
+	exitCh := make(chan int)
+	winSizeCh := make(chan *WinSize)
+	stopHandleSignalCh := make(chan struct{})
+	go p.handleSignals(exitCh, winSizeCh, stopHandleSignalCh)
+
+	for {
+		select {
+		case b := <-bufCh:
+			if shouldExit, e := p.feed(b); shouldExit {
+				p.renderer.BreakLine(p.buf)
+				stopReadBufCh <- struct{}{}
+				stopHandleSignalCh <- struct{}{}
+				return
+			} else if e != nil {
+				// Stop goroutine to run readBuffer function
+				stopReadBufCh <- struct{}{}
+				stopHandleSignalCh <- struct{}{}
+
+				// Unset raw mode
+				// Reset to Blocking mode because returned EAGAIN when still set non-blocking mode.
+				p.in.TearDown()
+				p.executor(e.input)
+
+				p.completion.Update(*p.buf.Document())
+				p.renderer.Render(p.buf, p.completion)
+
+				// Set raw mode
+				p.in.Setup()
+				go p.readBuffer(bufCh, stopReadBufCh)
+				go p.handleSignals(exitCh, winSizeCh, stopHandleSignalCh)
+			} else {
+				p.completion.Update(*p.buf.Document())
+				p.renderer.Render(p.buf, p.completion)
+			}
+		case w := <-winSizeCh:
+			p.renderer.UpdateWinSize(w)
+			p.renderer.Render(p.buf, p.completion)
+		case code := <-exitCh:
+			p.renderer.BreakLine(p.buf)
+			p.tearDown()
+			os.Exit(code)
+		default:
+			time.Sleep(10 * time.Millisecond)
+		}
+	}
+}
+
+func (p *Prompt) feed(b []byte) (shouldExit bool, exec *Exec) {
+	key := p.in.GetKey(b)
+
+	// completion
+	completing := p.completion.Completing()
+	p.handleCompletionKeyBinding(key, completing)
+
+	switch key {
+	case Enter, ControlJ, ControlM:
+		p.renderer.BreakLine(p.buf)
+
+		exec = &Exec{input: p.buf.Text()}
+		log.Printf("[History] %s", p.buf.Text())
+		p.buf = NewBuffer()
+		if exec.input != "" {
+			p.history.Add(exec.input)
+		}
+	case ControlC:
+		p.renderer.BreakLine(p.buf)
+		p.buf = NewBuffer()
+		p.history.Clear()
+	case Up, ControlP:
+		if !completing { // Don't use p.completion.Completing() because it takes double operation when switch to selected=-1.
+			if newBuf, changed := p.history.Older(p.buf); changed {
+				p.buf = newBuf
+			}
+		}
+	case Down, ControlN:
+		if !completing { // Don't use p.completion.Completing() because it takes double operation when switch to selected=-1.
+			if newBuf, changed := p.history.Newer(p.buf); changed {
+				p.buf = newBuf
+			}
+			return
+		}
+	case ControlD:
+		if p.buf.Text() == "" {
+			shouldExit = true
+			return
+		}
+	case NotDefined:
+		if p.handleASCIICodeBinding(b) {
+			return
+		}
+		p.buf.InsertText(string(b), false, true)
+	}
+
+	p.handleKeyBinding(key)
+	return
+}
+
+func (p *Prompt) handleCompletionKeyBinding(key Key, completing bool) {
+	switch key {
+	case Down:
+		if completing {
+			p.completion.Next()
+		}
+	case Tab, ControlI:
+		p.completion.Next()
+	case Up:
+		if completing {
+			p.completion.Previous()
+		}
+	case BackTab:
+		p.completion.Previous()
+	default:
+		if s, ok := p.completion.GetSelectedSuggestion(); ok {
+			w := p.buf.Document().GetWordBeforeCursorUntilSeparator(p.completion.wordSeparator)
+			if w != "" {
+				p.buf.DeleteBeforeCursor(len([]rune(w)))
+			}
+			p.buf.InsertText(s.Text, false, true)
+		}
+		p.completion.Reset()
+	}
+}
+
+func (p *Prompt) handleKeyBinding(key Key) {
+	for i := range commonKeyBindings {
+		kb := commonKeyBindings[i]
+		if kb.Key == key {
+			kb.Fn(p.buf)
+		}
+	}
+
+	if p.keyBindMode == EmacsKeyBind {
+		for i := range emacsKeyBindings {
+			kb := emacsKeyBindings[i]
+			if kb.Key == key {
+				kb.Fn(p.buf)
+			}
+		}
+	}
+
+	// Custom key bindings
+	for i := range p.keyBindings {
+		kb := p.keyBindings[i]
+		if kb.Key == key {
+			kb.Fn(p.buf)
+		}
+	}
+}
+
+func (p *Prompt) handleASCIICodeBinding(b []byte) bool {
+	checked := false
+	for _, kb := range p.ASCIICodeBindings {
+		if bytes.Compare(kb.ASCIICode, b) == 0 {
+			kb.Fn(p.buf)
+			checked = true
+		}
+	}
+	return checked
+}
+
+// Input just returns user input text.
+func (p *Prompt) Input() string {
+	if l := os.Getenv(envDebugLogPath); l == "" {
+		log.SetOutput(ioutil.Discard)
+	} else if f, err := os.OpenFile(l, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0666); err != nil {
+		log.SetOutput(ioutil.Discard)
+	} else {
+		defer f.Close()
+		log.SetOutput(f)
+		log.Println("[INFO] Logging is enabled.")
+	}
+
+	p.setUp()
+	defer p.tearDown()
+
+	p.renderer.Render(p.buf, p.completion)
+	bufCh := make(chan []byte, 128)
+	stopReadBufCh := make(chan struct{})
+	go p.readBuffer(bufCh, stopReadBufCh)
+
+	for {
+		select {
+		case b := <-bufCh:
+			if shouldExit, e := p.feed(b); shouldExit {
+				p.renderer.BreakLine(p.buf)
+				stopReadBufCh <- struct{}{}
+				return ""
+			} else if e != nil {
+				// Stop goroutine to run readBuffer function
+				stopReadBufCh <- struct{}{}
+				return e.input
+			} else {
+				p.completion.Update(*p.buf.Document())
+				p.renderer.Render(p.buf, p.completion)
+			}
+		default:
+			time.Sleep(10 * time.Millisecond)
+		}
+	}
+}
+
+func (p *Prompt) readBuffer(bufCh chan []byte, stopCh chan struct{}) {
+	log.Printf("[INFO] readBuffer start")
+	for {
+		select {
+		case <-stopCh:
+			log.Print("[INFO] stop readBuffer")
+			return
+		default:
+			if b, err := p.in.Read(); err == nil && !(len(b) == 1 && b[0] == 0) {
+				bufCh <- b
+			}
+		}
+		time.Sleep(10 * time.Millisecond)
+	}
+}
+
+func (p *Prompt) setUp() {
+	p.in.Setup()
+	p.renderer.Setup()
+	p.renderer.UpdateWinSize(p.in.GetWinSize())
+}
+
+func (p *Prompt) tearDown() {
+	p.in.TearDown()
+	p.renderer.TearDown()
+}
diff --git a/vendor/github.com/c-bata/go-prompt/render.go b/vendor/github.com/c-bata/go-prompt/render.go
new file mode 100644
index 0000000..2d774aa
--- /dev/null
+++ b/vendor/github.com/c-bata/go-prompt/render.go
@@ -0,0 +1,286 @@
+package prompt
+
+import (
+	"runtime"
+
+	"github.com/mattn/go-runewidth"
+)
+
+// Render to render prompt information from state of Buffer.
+type Render struct {
+	out                ConsoleWriter
+	prefix             string
+	livePrefixCallback func() (prefix string, useLivePrefix bool)
+	title              string
+	row                uint16
+	col                uint16
+
+	previousCursor int
+
+	// colors,
+	prefixTextColor              Color
+	prefixBGColor                Color
+	inputTextColor               Color
+	inputBGColor                 Color
+	previewSuggestionTextColor   Color
+	previewSuggestionBGColor     Color
+	suggestionTextColor          Color
+	suggestionBGColor            Color
+	selectedSuggestionTextColor  Color
+	selectedSuggestionBGColor    Color
+	descriptionTextColor         Color
+	descriptionBGColor           Color
+	selectedDescriptionTextColor Color
+	selectedDescriptionBGColor   Color
+	scrollbarThumbColor          Color
+	scrollbarBGColor             Color
+}
+
+// Setup to initialize console output.
+func (r *Render) Setup() {
+	if r.title != "" {
+		r.out.SetTitle(r.title)
+		r.out.Flush()
+	}
+}
+
+// getCurrentPrefix to get current prefix.
+// If live-prefix is enabled, return live-prefix.
+func (r *Render) getCurrentPrefix() string {
+	if prefix, ok := r.livePrefixCallback(); ok {
+		return prefix
+	}
+	return r.prefix
+}
+
+func (r *Render) renderPrefix() {
+	r.out.SetColor(r.prefixTextColor, r.prefixBGColor, false)
+	r.out.WriteStr(r.getCurrentPrefix())
+	r.out.SetColor(DefaultColor, DefaultColor, false)
+}
+
+// TearDown to clear title and erasing.
+func (r *Render) TearDown() {
+	r.out.ClearTitle()
+	r.out.EraseDown()
+	r.out.Flush()
+}
+
+func (r *Render) prepareArea(lines int) {
+	for i := 0; i < lines; i++ {
+		r.out.ScrollDown()
+	}
+	for i := 0; i < lines; i++ {
+		r.out.ScrollUp()
+	}
+	return
+}
+
+// UpdateWinSize called when window size is changed.
+func (r *Render) UpdateWinSize(ws *WinSize) {
+	r.row = ws.Row
+	r.col = ws.Col
+	return
+}
+
+func (r *Render) renderWindowTooSmall() {
+	r.out.CursorGoTo(0, 0)
+	r.out.EraseScreen()
+	r.out.SetColor(DarkRed, White, false)
+	r.out.WriteStr("Your console window is too small...")
+	return
+}
+
+func (r *Render) renderCompletion(buf *Buffer, completions *CompletionManager) {
+	suggestions := completions.GetSuggestions()
+	if len(completions.GetSuggestions()) == 0 {
+		return
+	}
+	prefix := r.getCurrentPrefix()
+	formatted, width := formatSuggestions(
+		suggestions,
+		int(r.col)-runewidth.StringWidth(prefix)-1, // -1 means a width of scrollbar
+	)
+	// +1 means a width of scrollbar.
+	width++
+
+	windowHeight := len(formatted)
+	if windowHeight > int(completions.max) {
+		windowHeight = int(completions.max)
+	}
+	formatted = formatted[completions.verticalScroll : completions.verticalScroll+windowHeight]
+	r.prepareArea(windowHeight)
+
+	cursor := runewidth.StringWidth(prefix) + runewidth.StringWidth(buf.Document().TextBeforeCursor())
+	x, _ := r.toPos(cursor)
+	if x+width >= int(r.col) {
+		cursor = r.backward(cursor, x+width-int(r.col))
+	}
+
+	contentHeight := len(completions.tmp)
+
+	fractionVisible := float64(windowHeight) / float64(contentHeight)
+	fractionAbove := float64(completions.verticalScroll) / float64(contentHeight)
+
+	scrollbarHeight := int(clamp(float64(windowHeight), 1, float64(windowHeight)*fractionVisible))
+	scrollbarTop := int(float64(windowHeight) * fractionAbove)
+
+	isScrollThumb := func(row int) bool {
+		return scrollbarTop <= row && row <= scrollbarTop+scrollbarHeight
+	}
+
+	selected := completions.selected - completions.verticalScroll
+	r.out.SetColor(White, Cyan, false)
+	for i := 0; i < windowHeight; i++ {
+		r.out.CursorDown(1)
+		if i == selected {
+			r.out.SetColor(r.selectedSuggestionTextColor, r.selectedSuggestionBGColor, true)
+		} else {
+			r.out.SetColor(r.suggestionTextColor, r.suggestionBGColor, false)
+		}
+		r.out.WriteStr(formatted[i].Text)
+
+		if i == selected {
+			r.out.SetColor(r.selectedDescriptionTextColor, r.selectedDescriptionBGColor, false)
+		} else {
+			r.out.SetColor(r.descriptionTextColor, r.descriptionBGColor, false)
+		}
+		r.out.WriteStr(formatted[i].Description)
+
+		if isScrollThumb(i) {
+			r.out.SetColor(DefaultColor, r.scrollbarThumbColor, false)
+		} else {
+			r.out.SetColor(DefaultColor, r.scrollbarBGColor, false)
+		}
+		r.out.WriteStr(" ")
+		r.out.SetColor(DefaultColor, DefaultColor, false)
+
+		r.lineWrap(cursor + width)
+		r.backward(cursor+width, width)
+	}
+
+	if x+width >= int(r.col) {
+		r.out.CursorForward(x + width - int(r.col))
+	}
+
+	r.out.CursorUp(windowHeight)
+	r.out.SetColor(DefaultColor, DefaultColor, false)
+	return
+}
+
+// Render renders to the console.
+func (r *Render) Render(buffer *Buffer, completion *CompletionManager) {
+	// In situations where a pseudo tty is allocated (e.g. within a docker container),
+	// window size via TIOCGWINSZ is not immediately available and will result in 0,0 dimensions.
+	if r.col == 0 {
+		return
+	}
+	defer r.out.Flush()
+	r.move(r.previousCursor, 0)
+
+	line := buffer.Text()
+	prefix := r.getCurrentPrefix()
+	cursor := runewidth.StringWidth(prefix) + runewidth.StringWidth(line)
+
+	// prepare area
+	_, y := r.toPos(cursor)
+
+	h := y + 1 + int(completion.max)
+	if h > int(r.row) || completionMargin > int(r.col) {
+		r.renderWindowTooSmall()
+		return
+	}
+
+	// Rendering
+	r.out.HideCursor()
+	defer r.out.ShowCursor()
+
+	r.renderPrefix()
+	r.out.SetColor(r.inputTextColor, r.inputBGColor, false)
+	r.out.WriteStr(line)
+	r.out.SetColor(DefaultColor, DefaultColor, false)
+	r.lineWrap(cursor)
+
+	r.out.EraseDown()
+
+	cursor = r.backward(cursor, runewidth.StringWidth(line)-buffer.DisplayCursorPosition())
+
+	r.renderCompletion(buffer, completion)
+	if suggest, ok := completion.GetSelectedSuggestion(); ok {
+		cursor = r.backward(cursor, runewidth.StringWidth(buffer.Document().GetWordBeforeCursorUntilSeparator(completion.wordSeparator)))
+
+		r.out.SetColor(r.previewSuggestionTextColor, r.previewSuggestionBGColor, false)
+		r.out.WriteStr(suggest.Text)
+		r.out.SetColor(DefaultColor, DefaultColor, false)
+		cursor += runewidth.StringWidth(suggest.Text)
+
+		rest := buffer.Document().TextAfterCursor()
+		r.out.WriteStr(rest)
+		cursor += runewidth.StringWidth(rest)
+		r.lineWrap(cursor)
+
+		cursor = r.backward(cursor, runewidth.StringWidth(rest))
+	}
+	r.previousCursor = cursor
+}
+
+// BreakLine to break line.
+func (r *Render) BreakLine(buffer *Buffer) {
+	// Erasing and Render
+	cursor := runewidth.StringWidth(buffer.Document().TextBeforeCursor()) + runewidth.StringWidth(r.getCurrentPrefix())
+	r.clear(cursor)
+	r.renderPrefix()
+	r.out.SetColor(r.inputTextColor, r.inputBGColor, false)
+	r.out.WriteStr(buffer.Document().Text + "\n")
+	r.out.SetColor(DefaultColor, DefaultColor, false)
+	r.out.Flush()
+
+	r.previousCursor = 0
+}
+
+// clear erases the screen from a beginning of input
+// even if there is line break which means input length exceeds a window's width.
+func (r *Render) clear(cursor int) {
+	r.move(cursor, 0)
+	r.out.EraseDown()
+}
+
+// backward moves cursor to backward from a current cursor position
+// regardless there is a line break.
+func (r *Render) backward(from, n int) int {
+	return r.move(from, from-n)
+}
+
+// move moves cursor to specified position from the beginning of input
+// even if there is a line break.
+func (r *Render) move(from, to int) int {
+	fromX, fromY := r.toPos(from)
+	toX, toY := r.toPos(to)
+
+	r.out.CursorUp(fromY - toY)
+	r.out.CursorBackward(fromX - toX)
+	return to
+}
+
+// toPos returns the relative position from the beginning of the string.
+func (r *Render) toPos(cursor int) (x, y int) {
+	col := int(r.col)
+	return cursor % col, cursor / col
+}
+
+func (r *Render) lineWrap(cursor int) {
+	if runtime.GOOS != "windows" && cursor > 0 && cursor%int(r.col) == 0 {
+		r.out.WriteRaw([]byte{'\n'})
+	}
+}
+
+func clamp(high, low, x float64) float64 {
+	switch {
+	case high < x:
+		return high
+	case x < low:
+		return low
+	default:
+		return x
+	}
+}
diff --git a/vendor/github.com/c-bata/go-prompt/shortcut.go b/vendor/github.com/c-bata/go-prompt/shortcut.go
new file mode 100644
index 0000000..20fe71d
--- /dev/null
+++ b/vendor/github.com/c-bata/go-prompt/shortcut.go
@@ -0,0 +1,43 @@
+package prompt
+
+func dummyExecutor(in string) { return }
+
+// Input get the input data from the user and return it.
+func Input(prefix string, completer Completer, opts ...Option) string {
+	pt := New(dummyExecutor, completer)
+	pt.renderer.prefixTextColor = DefaultColor
+	pt.renderer.prefix = prefix
+
+	for _, opt := range opts {
+		if err := opt(pt); err != nil {
+			panic(err)
+		}
+	}
+	return pt.Input()
+}
+
+// Choose to the shortcut of input function to select from string array.
+// Deprecated: Maybe anyone want to use this.
+func Choose(prefix string, choices []string, opts ...Option) string {
+	completer := newChoiceCompleter(choices, FilterHasPrefix)
+	pt := New(dummyExecutor, completer)
+	pt.renderer.prefixTextColor = DefaultColor
+	pt.renderer.prefix = prefix
+
+	for _, opt := range opts {
+		if err := opt(pt); err != nil {
+			panic(err)
+		}
+	}
+	return pt.Input()
+}
+
+func newChoiceCompleter(choices []string, filter Filter) Completer {
+	s := make([]Suggest, len(choices))
+	for i := range choices {
+		s[i] = Suggest{Text: choices[i]}
+	}
+	return func(x Document) []Suggest {
+		return filter(s, x.GetWordBeforeCursor(), true)
+	}
+}
diff --git a/vendor/github.com/c-bata/go-prompt/signal_posix.go b/vendor/github.com/c-bata/go-prompt/signal_posix.go
new file mode 100644
index 0000000..cff1327
--- /dev/null
+++ b/vendor/github.com/c-bata/go-prompt/signal_posix.go
@@ -0,0 +1,48 @@
+// +build !windows
+
+package prompt
+
+import (
+	"log"
+	"os"
+	"os/signal"
+	"syscall"
+)
+
+func (p *Prompt) handleSignals(exitCh chan int, winSizeCh chan *WinSize, stop chan struct{}) {
+	in := p.in
+	sigCh := make(chan os.Signal, 1)
+	signal.Notify(
+		sigCh,
+		syscall.SIGINT,
+		syscall.SIGTERM,
+		syscall.SIGQUIT,
+		syscall.SIGWINCH,
+	)
+
+	for {
+		select {
+		case <-stop:
+			log.Println("[INFO] stop handleSignals")
+			return
+		case s := <-sigCh:
+			switch s {
+			case syscall.SIGINT: // kill -SIGINT XXXX or Ctrl+c
+				log.Println("[SIGNAL] Catch SIGINT")
+				exitCh <- 0
+
+			case syscall.SIGTERM: // kill -SIGTERM XXXX
+				log.Println("[SIGNAL] Catch SIGTERM")
+				exitCh <- 1
+
+			case syscall.SIGQUIT: // kill -SIGQUIT XXXX
+				log.Println("[SIGNAL] Catch SIGQUIT")
+				exitCh <- 0
+
+			case syscall.SIGWINCH:
+				log.Println("[SIGNAL] Catch SIGWINCH")
+				winSizeCh <- in.GetWinSize()
+			}
+		}
+	}
+}
diff --git a/vendor/github.com/c-bata/go-prompt/signal_windows.go b/vendor/github.com/c-bata/go-prompt/signal_windows.go
new file mode 100644
index 0000000..5c34a63
--- /dev/null
+++ b/vendor/github.com/c-bata/go-prompt/signal_windows.go
@@ -0,0 +1,43 @@
+// +build windows
+
+package prompt
+
+import (
+	"log"
+	"os"
+	"os/signal"
+	"syscall"
+)
+
+func (p *Prompt) handleSignals(exitCh chan int, winSizeCh chan *WinSize, stop chan struct{}) {
+	sigCh := make(chan os.Signal, 1)
+	signal.Notify(
+		sigCh,
+		syscall.SIGINT,
+		syscall.SIGTERM,
+		syscall.SIGQUIT,
+	)
+
+	for {
+		select {
+		case <-stop:
+			log.Println("[INFO] stop handleSignals")
+			return
+		case s := <-sigCh:
+			switch s {
+
+			case syscall.SIGINT: // kill -SIGINT XXXX or Ctrl+c
+				log.Println("[SIGNAL] Catch SIGINT")
+				exitCh <- 0
+
+			case syscall.SIGTERM: // kill -SIGTERM XXXX
+				log.Println("[SIGNAL] Catch SIGTERM")
+				exitCh <- 1
+
+			case syscall.SIGQUIT: // kill -SIGQUIT XXXX
+				log.Println("[SIGNAL] Catch SIGQUIT")
+				exitCh <- 0
+			}
+		}
+	}
+}
diff --git a/vendor/github.com/chzyer/readline/ansi_windows.go b/vendor/github.com/chzyer/readline/ansi_windows.go
deleted file mode 100644
index 63b908c..0000000
--- a/vendor/github.com/chzyer/readline/ansi_windows.go
+++ /dev/null
@@ -1,249 +0,0 @@
-// +build windows
-
-package readline
-
-import (
-	"bufio"
-	"io"
-	"strconv"
-	"strings"
-	"sync"
-	"unicode/utf8"
-	"unsafe"
-)
-
-const (
-	_                = uint16(0)
-	COLOR_FBLUE      = 0x0001
-	COLOR_FGREEN     = 0x0002
-	COLOR_FRED       = 0x0004
-	COLOR_FINTENSITY = 0x0008
-
-	COLOR_BBLUE      = 0x0010
-	COLOR_BGREEN     = 0x0020
-	COLOR_BRED       = 0x0040
-	COLOR_BINTENSITY = 0x0080
-
-	COMMON_LVB_UNDERSCORE = 0x8000
-	COMMON_LVB_BOLD       = 0x0007
-)
-
-var ColorTableFg = []word{
-	0,                                       // 30: Black
-	COLOR_FRED,                              // 31: Red
-	COLOR_FGREEN,                            // 32: Green
-	COLOR_FRED | COLOR_FGREEN,               // 33: Yellow
-	COLOR_FBLUE,                             // 34: Blue
-	COLOR_FRED | COLOR_FBLUE,                // 35: Magenta
-	COLOR_FGREEN | COLOR_FBLUE,              // 36: Cyan
-	COLOR_FRED | COLOR_FBLUE | COLOR_FGREEN, // 37: White
-}
-
-var ColorTableBg = []word{
-	0,                                       // 40: Black
-	COLOR_BRED,                              // 41: Red
-	COLOR_BGREEN,                            // 42: Green
-	COLOR_BRED | COLOR_BGREEN,               // 43: Yellow
-	COLOR_BBLUE,                             // 44: Blue
-	COLOR_BRED | COLOR_BBLUE,                // 45: Magenta
-	COLOR_BGREEN | COLOR_BBLUE,              // 46: Cyan
-	COLOR_BRED | COLOR_BBLUE | COLOR_BGREEN, // 47: White
-}
-
-type ANSIWriter struct {
-	target io.Writer
-	wg     sync.WaitGroup
-	ctx    *ANSIWriterCtx
-	sync.Mutex
-}
-
-func NewANSIWriter(w io.Writer) *ANSIWriter {
-	a := &ANSIWriter{
-		target: w,
-		ctx:    NewANSIWriterCtx(w),
-	}
-	return a
-}
-
-func (a *ANSIWriter) Close() error {
-	a.wg.Wait()
-	return nil
-}
-
-type ANSIWriterCtx struct {
-	isEsc     bool
-	isEscSeq  bool
-	arg       []string
-	target    *bufio.Writer
-	wantFlush bool
-}
-
-func NewANSIWriterCtx(target io.Writer) *ANSIWriterCtx {
-	return &ANSIWriterCtx{
-		target: bufio.NewWriter(target),
-	}
-}
-
-func (a *ANSIWriterCtx) Flush() {
-	a.target.Flush()
-}
-
-func (a *ANSIWriterCtx) process(r rune) bool {
-	if a.wantFlush {
-		if r == 0 || r == CharEsc {
-			a.wantFlush = false
-			a.target.Flush()
-		}
-	}
-	if a.isEscSeq {
-		a.isEscSeq = a.ioloopEscSeq(a.target, r, &a.arg)
-		return true
-	}
-
-	switch r {
-	case CharEsc:
-		a.isEsc = true
-	case '[':
-		if a.isEsc {
-			a.arg = nil
-			a.isEscSeq = true
-			a.isEsc = false
-			break
-		}
-		fallthrough
-	default:
-		a.target.WriteRune(r)
-		a.wantFlush = true
-	}
-	return true
-}
-
-func (a *ANSIWriterCtx) ioloopEscSeq(w *bufio.Writer, r rune, argptr *[]string) bool {
-	arg := *argptr
-	var err error
-
-	if r >= 'A' && r <= 'D' {
-		count := short(GetInt(arg, 1))
-		info, err := GetConsoleScreenBufferInfo()
-		if err != nil {
-			return false
-		}
-		switch r {
-		case 'A': // up
-			info.dwCursorPosition.y -= count
-		case 'B': // down
-			info.dwCursorPosition.y += count
-		case 'C': // right
-			info.dwCursorPosition.x += count
-		case 'D': // left
-			info.dwCursorPosition.x -= count
-		}
-		SetConsoleCursorPosition(&info.dwCursorPosition)
-		return false
-	}
-
-	switch r {
-	case 'J':
-		killLines()
-	case 'K':
-		eraseLine()
-	case 'm':
-		color := word(0)
-		for _, item := range arg {
-			var c int
-			c, err = strconv.Atoi(item)
-			if err != nil {
-				w.WriteString("[" + strings.Join(arg, ";") + "m")
-				break
-			}
-			if c >= 30 && c < 40 {
-				color ^= COLOR_FINTENSITY
-				color |= ColorTableFg[c-30]
-			} else if c >= 40 && c < 50 {
-				color ^= COLOR_BINTENSITY
-				color |= ColorTableBg[c-40]
-			} else if c == 4 {
-				color |= COMMON_LVB_UNDERSCORE | ColorTableFg[7]
-			} else if c == 1 {
-				color |= COMMON_LVB_BOLD | COLOR_FINTENSITY
-			} else { // unknown code treat as reset
-				color = ColorTableFg[7]
-			}
-		}
-		if err != nil {
-			break
-		}
-		kernel.SetConsoleTextAttribute(stdout, uintptr(color))
-	case '\007': // set title
-	case ';':
-		if len(arg) == 0 || arg[len(arg)-1] != "" {
-			arg = append(arg, "")
-			*argptr = arg
-		}
-		return true
-	default:
-		if len(arg) == 0 {
-			arg = append(arg, "")
-		}
-		arg[len(arg)-1] += string(r)
-		*argptr = arg
-		return true
-	}
-	*argptr = nil
-	return false
-}
-
-func (a *ANSIWriter) Write(b []byte) (int, error) {
-	a.Lock()
-	defer a.Unlock()
-
-	off := 0
-	for len(b) > off {
-		r, size := utf8.DecodeRune(b[off:])
-		if size == 0 {
-			return off, io.ErrShortWrite
-		}
-		off += size
-		a.ctx.process(r)
-	}
-	a.ctx.Flush()
-	return off, nil
-}
-
-func killLines() error {
-	sbi, err := GetConsoleScreenBufferInfo()
-	if err != nil {
-		return err
-	}
-
-	size := (sbi.dwCursorPosition.y - sbi.dwSize.y) * sbi.dwSize.x
-	size += sbi.dwCursorPosition.x
-
-	var written int
-	kernel.FillConsoleOutputAttribute(stdout, uintptr(ColorTableFg[7]),
-		uintptr(size),
-		sbi.dwCursorPosition.ptr(),
-		uintptr(unsafe.Pointer(&written)),
-	)
-	return kernel.FillConsoleOutputCharacterW(stdout, uintptr(' '),
-		uintptr(size),
-		sbi.dwCursorPosition.ptr(),
-		uintptr(unsafe.Pointer(&written)),
-	)
-}
-
-func eraseLine() error {
-	sbi, err := GetConsoleScreenBufferInfo()
-	if err != nil {
-		return err
-	}
-
-	size := sbi.dwSize.x
-	sbi.dwCursorPosition.x = 0
-	var written int
-	return kernel.FillConsoleOutputCharacterW(stdout, uintptr(' '),
-		uintptr(size),
-		sbi.dwCursorPosition.ptr(),
-		uintptr(unsafe.Pointer(&written)),
-	)
-}
diff --git a/vendor/github.com/chzyer/readline/complete.go b/vendor/github.com/chzyer/readline/complete.go
deleted file mode 100644
index c08c994..0000000
--- a/vendor/github.com/chzyer/readline/complete.go
+++ /dev/null
@@ -1,285 +0,0 @@
-package readline
-
-import (
-	"bufio"
-	"bytes"
-	"fmt"
-	"io"
-)
-
-type AutoCompleter interface {
-	// Readline will pass the whole line and current offset to it
-	// Completer need to pass all the candidates, and how long they shared the same characters in line
-	// Example:
-	//   [go, git, git-shell, grep]
-	//   Do("g", 1) => ["o", "it", "it-shell", "rep"], 1
-	//   Do("gi", 2) => ["t", "t-shell"], 2
-	//   Do("git", 3) => ["", "-shell"], 3
-	Do(line []rune, pos int) (newLine [][]rune, length int)
-}
-
-type TabCompleter struct{}
-
-func (t *TabCompleter) Do([]rune, int) ([][]rune, int) {
-	return [][]rune{[]rune("\t")}, 0
-}
-
-type opCompleter struct {
-	w     io.Writer
-	op    *Operation
-	width int
-
-	inCompleteMode  bool
-	inSelectMode    bool
-	candidate       [][]rune
-	candidateSource []rune
-	candidateOff    int
-	candidateChoise int
-	candidateColNum int
-}
-
-func newOpCompleter(w io.Writer, op *Operation, width int) *opCompleter {
-	return &opCompleter{
-		w:     w,
-		op:    op,
-		width: width,
-	}
-}
-
-func (o *opCompleter) doSelect() {
-	if len(o.candidate) == 1 {
-		o.op.buf.WriteRunes(o.candidate[0])
-		o.ExitCompleteMode(false)
-		return
-	}
-	o.nextCandidate(1)
-	o.CompleteRefresh()
-}
-
-func (o *opCompleter) nextCandidate(i int) {
-	o.candidateChoise += i
-	o.candidateChoise = o.candidateChoise % len(o.candidate)
-	if o.candidateChoise < 0 {
-		o.candidateChoise = len(o.candidate) + o.candidateChoise
-	}
-}
-
-func (o *opCompleter) OnComplete() bool {
-	if o.width == 0 {
-		return false
-	}
-	if o.IsInCompleteSelectMode() {
-		o.doSelect()
-		return true
-	}
-
-	buf := o.op.buf
-	rs := buf.Runes()
-
-	if o.IsInCompleteMode() && o.candidateSource != nil && runes.Equal(rs, o.candidateSource) {
-		o.EnterCompleteSelectMode()
-		o.doSelect()
-		return true
-	}
-
-	o.ExitCompleteSelectMode()
-	o.candidateSource = rs
-	newLines, offset := o.op.cfg.AutoComplete.Do(rs, buf.idx)
-	if len(newLines) == 0 {
-		o.ExitCompleteMode(false)
-		return true
-	}
-
-	// only Aggregate candidates in non-complete mode
-	if !o.IsInCompleteMode() {
-		if len(newLines) == 1 {
-			buf.WriteRunes(newLines[0])
-			o.ExitCompleteMode(false)
-			return true
-		}
-
-		same, size := runes.Aggregate(newLines)
-		if size > 0 {
-			buf.WriteRunes(same)
-			o.ExitCompleteMode(false)
-			return true
-		}
-	}
-
-	o.EnterCompleteMode(offset, newLines)
-	return true
-}
-
-func (o *opCompleter) IsInCompleteSelectMode() bool {
-	return o.inSelectMode
-}
-
-func (o *opCompleter) IsInCompleteMode() bool {
-	return o.inCompleteMode
-}
-
-func (o *opCompleter) HandleCompleteSelect(r rune) bool {
-	next := true
-	switch r {
-	case CharEnter, CharCtrlJ:
-		next = false
-		o.op.buf.WriteRunes(o.op.candidate[o.op.candidateChoise])
-		o.ExitCompleteMode(false)
-	case CharLineStart:
-		num := o.candidateChoise % o.candidateColNum
-		o.nextCandidate(-num)
-	case CharLineEnd:
-		num := o.candidateColNum - o.candidateChoise%o.candidateColNum - 1
-		o.candidateChoise += num
-		if o.candidateChoise >= len(o.candidate) {
-			o.candidateChoise = len(o.candidate) - 1
-		}
-	case CharBackspace:
-		o.ExitCompleteSelectMode()
-		next = false
-	case CharTab, CharForward:
-		o.doSelect()
-	case CharBell, CharInterrupt:
-		o.ExitCompleteMode(true)
-		next = false
-	case CharNext:
-		tmpChoise := o.candidateChoise + o.candidateColNum
-		if tmpChoise >= o.getMatrixSize() {
-			tmpChoise -= o.getMatrixSize()
-		} else if tmpChoise >= len(o.candidate) {
-			tmpChoise += o.candidateColNum
-			tmpChoise -= o.getMatrixSize()
-		}
-		o.candidateChoise = tmpChoise
-	case CharBackward:
-		o.nextCandidate(-1)
-	case CharPrev:
-		tmpChoise := o.candidateChoise - o.candidateColNum
-		if tmpChoise < 0 {
-			tmpChoise += o.getMatrixSize()
-			if tmpChoise >= len(o.candidate) {
-				tmpChoise -= o.candidateColNum
-			}
-		}
-		o.candidateChoise = tmpChoise
-	default:
-		next = false
-		o.ExitCompleteSelectMode()
-	}
-	if next {
-		o.CompleteRefresh()
-		return true
-	}
-	return false
-}
-
-func (o *opCompleter) getMatrixSize() int {
-	line := len(o.candidate) / o.candidateColNum
-	if len(o.candidate)%o.candidateColNum != 0 {
-		line++
-	}
-	return line * o.candidateColNum
-}
-
-func (o *opCompleter) OnWidthChange(newWidth int) {
-	o.width = newWidth
-}
-
-func (o *opCompleter) CompleteRefresh() {
-	if !o.inCompleteMode {
-		return
-	}
-	lineCnt := o.op.buf.CursorLineCount()
-	colWidth := 0
-	for _, c := range o.candidate {
-		w := runes.WidthAll(c)
-		if w > colWidth {
-			colWidth = w
-		}
-	}
-	colWidth += o.candidateOff + 1
-	same := o.op.buf.RuneSlice(-o.candidateOff)
-
-	// -1 to avoid reach the end of line
-	width := o.width - 1
-	colNum := width / colWidth
-	if colNum != 0 {
-		colWidth += (width - (colWidth * colNum)) / colNum
-	}
-
-	o.candidateColNum = colNum
-	buf := bufio.NewWriter(o.w)
-	buf.Write(bytes.Repeat([]byte("\n"), lineCnt))
-
-	colIdx := 0
-	lines := 1
-	buf.WriteString("\033[J")
-	for idx, c := range o.candidate {
-		inSelect := idx == o.candidateChoise && o.IsInCompleteSelectMode()
-		if inSelect {
-			buf.WriteString("\033[30;47m")
-		}
-		buf.WriteString(string(same))
-		buf.WriteString(string(c))
-		buf.Write(bytes.Repeat([]byte(" "), colWidth-runes.WidthAll(c)-runes.WidthAll(same)))
-
-		if inSelect {
-			buf.WriteString("\033[0m")
-		}
-
-		colIdx++
-		if colIdx == colNum {
-			buf.WriteString("\n")
-			lines++
-			colIdx = 0
-		}
-	}
-
-	// move back
-	fmt.Fprintf(buf, "\033[%dA\r", lineCnt-1+lines)
-	fmt.Fprintf(buf, "\033[%dC", o.op.buf.idx+o.op.buf.PromptLen())
-	buf.Flush()
-}
-
-func (o *opCompleter) aggCandidate(candidate [][]rune) int {
-	offset := 0
-	for i := 0; i < len(candidate[0]); i++ {
-		for j := 0; j < len(candidate)-1; j++ {
-			if i > len(candidate[j]) {
-				goto aggregate
-			}
-			if candidate[j][i] != candidate[j+1][i] {
-				goto aggregate
-			}
-		}
-		offset = i
-	}
-aggregate:
-	return offset
-}
-
-func (o *opCompleter) EnterCompleteSelectMode() {
-	o.inSelectMode = true
-	o.candidateChoise = -1
-	o.CompleteRefresh()
-}
-
-func (o *opCompleter) EnterCompleteMode(offset int, candidate [][]rune) {
-	o.inCompleteMode = true
-	o.candidate = candidate
-	o.candidateOff = offset
-	o.CompleteRefresh()
-}
-
-func (o *opCompleter) ExitCompleteSelectMode() {
-	o.inSelectMode = false
-	o.candidate = nil
-	o.candidateChoise = -1
-	o.candidateOff = -1
-	o.candidateSource = nil
-}
-
-func (o *opCompleter) ExitCompleteMode(revent bool) {
-	o.inCompleteMode = false
-	o.ExitCompleteSelectMode()
-}
diff --git a/vendor/github.com/chzyer/readline/complete_helper.go b/vendor/github.com/chzyer/readline/complete_helper.go
deleted file mode 100644
index 58d7248..0000000
--- a/vendor/github.com/chzyer/readline/complete_helper.go
+++ /dev/null
@@ -1,165 +0,0 @@
-package readline
-
-import (
-	"bytes"
-	"strings"
-)
-
-// Caller type for dynamic completion
-type DynamicCompleteFunc func(string) []string
-
-type PrefixCompleterInterface interface {
-	Print(prefix string, level int, buf *bytes.Buffer)
-	Do(line []rune, pos int) (newLine [][]rune, length int)
-	GetName() []rune
-	GetChildren() []PrefixCompleterInterface
-	SetChildren(children []PrefixCompleterInterface)
-}
-
-type DynamicPrefixCompleterInterface interface {
-	PrefixCompleterInterface
-	IsDynamic() bool
-	GetDynamicNames(line []rune) [][]rune
-}
-
-type PrefixCompleter struct {
-	Name     []rune
-	Dynamic  bool
-	Callback DynamicCompleteFunc
-	Children []PrefixCompleterInterface
-}
-
-func (p *PrefixCompleter) Tree(prefix string) string {
-	buf := bytes.NewBuffer(nil)
-	p.Print(prefix, 0, buf)
-	return buf.String()
-}
-
-func Print(p PrefixCompleterInterface, prefix string, level int, buf *bytes.Buffer) {
-	if strings.TrimSpace(string(p.GetName())) != "" {
-		buf.WriteString(prefix)
-		if level > 0 {
-			buf.WriteString("├")
-			buf.WriteString(strings.Repeat("─", (level*4)-2))
-			buf.WriteString(" ")
-		}
-		buf.WriteString(string(p.GetName()) + "\n")
-		level++
-	}
-	for _, ch := range p.GetChildren() {
-		ch.Print(prefix, level, buf)
-	}
-}
-
-func (p *PrefixCompleter) Print(prefix string, level int, buf *bytes.Buffer) {
-	Print(p, prefix, level, buf)
-}
-
-func (p *PrefixCompleter) IsDynamic() bool {
-	return p.Dynamic
-}
-
-func (p *PrefixCompleter) GetName() []rune {
-	return p.Name
-}
-
-func (p *PrefixCompleter) GetDynamicNames(line []rune) [][]rune {
-	var names = [][]rune{}
-	for _, name := range p.Callback(string(line)) {
-		names = append(names, []rune(name+" "))
-	}
-	return names
-}
-
-func (p *PrefixCompleter) GetChildren() []PrefixCompleterInterface {
-	return p.Children
-}
-
-func (p *PrefixCompleter) SetChildren(children []PrefixCompleterInterface) {
-	p.Children = children
-}
-
-func NewPrefixCompleter(pc ...PrefixCompleterInterface) *PrefixCompleter {
-	return PcItem("", pc...)
-}
-
-func PcItem(name string, pc ...PrefixCompleterInterface) *PrefixCompleter {
-	name += " "
-	return &PrefixCompleter{
-		Name:     []rune(name),
-		Dynamic:  false,
-		Children: pc,
-	}
-}
-
-func PcItemDynamic(callback DynamicCompleteFunc, pc ...PrefixCompleterInterface) *PrefixCompleter {
-	return &PrefixCompleter{
-		Callback: callback,
-		Dynamic:  true,
-		Children: pc,
-	}
-}
-
-func (p *PrefixCompleter) Do(line []rune, pos int) (newLine [][]rune, offset int) {
-	return doInternal(p, line, pos, line)
-}
-
-func Do(p PrefixCompleterInterface, line []rune, pos int) (newLine [][]rune, offset int) {
-	return doInternal(p, line, pos, line)
-}
-
-func doInternal(p PrefixCompleterInterface, line []rune, pos int, origLine []rune) (newLine [][]rune, offset int) {
-	line = runes.TrimSpaceLeft(line[:pos])
-	goNext := false
-	var lineCompleter PrefixCompleterInterface
-	for _, child := range p.GetChildren() {
-		childNames := make([][]rune, 1)
-
-		childDynamic, ok := child.(DynamicPrefixCompleterInterface)
-		if ok && childDynamic.IsDynamic() {
-			childNames = childDynamic.GetDynamicNames(origLine)
-		} else {
-			childNames[0] = child.GetName()
-		}
-
-		for _, childName := range childNames {
-			if len(line) >= len(childName) {
-				if runes.HasPrefix(line, childName) {
-					if len(line) == len(childName) {
-						newLine = append(newLine, []rune{' '})
-					} else {
-						newLine = append(newLine, childName)
-					}
-					offset = len(childName)
-					lineCompleter = child
-					goNext = true
-				}
-			} else {
-				if runes.HasPrefix(childName, line) {
-					newLine = append(newLine, childName[len(line):])
-					offset = len(line)
-					lineCompleter = child
-				}
-			}
-		}
-	}
-
-	if len(newLine) != 1 {
-		return
-	}
-
-	tmpLine := make([]rune, 0, len(line))
-	for i := offset; i < len(line); i++ {
-		if line[i] == ' ' {
-			continue
-		}
-
-		tmpLine = append(tmpLine, line[i:]...)
-		return doInternal(lineCompleter, tmpLine, len(tmpLine), origLine)
-	}
-
-	if goNext {
-		return doInternal(lineCompleter, nil, 0, origLine)
-	}
-	return
-}
diff --git a/vendor/github.com/chzyer/readline/complete_segment.go b/vendor/github.com/chzyer/readline/complete_segment.go
deleted file mode 100644
index 5ceadd8..0000000
--- a/vendor/github.com/chzyer/readline/complete_segment.go
+++ /dev/null
@@ -1,82 +0,0 @@
-package readline
-
-type SegmentCompleter interface {
-	// a
-	// |- a1
-	// |--- a11
-	// |- a2
-	// b
-	// input:
-	//   DoTree([], 0) [a, b]
-	//   DoTree([a], 1) [a]
-	//   DoTree([a, ], 0) [a1, a2]
-	//   DoTree([a, a], 1) [a1, a2]
-	//   DoTree([a, a1], 2) [a1]
-	//   DoTree([a, a1, ], 0) [a11]
-	//   DoTree([a, a1, a], 1) [a11]
-	DoSegment([][]rune, int) [][]rune
-}
-
-type dumpSegmentCompleter struct {
-	f func([][]rune, int) [][]rune
-}
-
-func (d *dumpSegmentCompleter) DoSegment(segment [][]rune, n int) [][]rune {
-	return d.f(segment, n)
-}
-
-func SegmentFunc(f func([][]rune, int) [][]rune) AutoCompleter {
-	return &SegmentComplete{&dumpSegmentCompleter{f}}
-}
-
-func SegmentAutoComplete(completer SegmentCompleter) *SegmentComplete {
-	return &SegmentComplete{
-		SegmentCompleter: completer,
-	}
-}
-
-type SegmentComplete struct {
-	SegmentCompleter
-}
-
-func RetSegment(segments [][]rune, cands [][]rune, idx int) ([][]rune, int) {
-	ret := make([][]rune, 0, len(cands))
-	lastSegment := segments[len(segments)-1]
-	for _, cand := range cands {
-		if !runes.HasPrefix(cand, lastSegment) {
-			continue
-		}
-		ret = append(ret, cand[len(lastSegment):])
-	}
-	return ret, idx
-}
-
-func SplitSegment(line []rune, pos int) ([][]rune, int) {
-	segs := [][]rune{}
-	lastIdx := -1
-	line = line[:pos]
-	pos = 0
-	for idx, l := range line {
-		if l == ' ' {
-			pos = 0
-			segs = append(segs, line[lastIdx+1:idx])
-			lastIdx = idx
-		} else {
-			pos++
-		}
-	}
-	segs = append(segs, line[lastIdx+1:])
-	return segs, pos
-}
-
-func (c *SegmentComplete) Do(line []rune, pos int) (newLine [][]rune, offset int) {
-
-	segment, idx := SplitSegment(line, pos)
-
-	cands := c.DoSegment(segment, idx)
-	newLine, offset = RetSegment(segment, cands, idx)
-	for idx := range newLine {
-		newLine[idx] = append(newLine[idx], ' ')
-	}
-	return newLine, offset
-}
diff --git a/vendor/github.com/chzyer/readline/history.go b/vendor/github.com/chzyer/readline/history.go
deleted file mode 100644
index 6b17c46..0000000
--- a/vendor/github.com/chzyer/readline/history.go
+++ /dev/null
@@ -1,330 +0,0 @@
-package readline
-
-import (
-	"bufio"
-	"container/list"
-	"fmt"
-	"os"
-	"strings"
-	"sync"
-)
-
-type hisItem struct {
-	Source  []rune
-	Version int64
-	Tmp     []rune
-}
-
-func (h *hisItem) Clean() {
-	h.Source = nil
-	h.Tmp = nil
-}
-
-type opHistory struct {
-	cfg        *Config
-	history    *list.List
-	historyVer int64
-	current    *list.Element
-	fd         *os.File
-	fdLock     sync.Mutex
-	enable     bool
-}
-
-func newOpHistory(cfg *Config) (o *opHistory) {
-	o = &opHistory{
-		cfg:     cfg,
-		history: list.New(),
-		enable:  true,
-	}
-	return o
-}
-
-func (o *opHistory) Reset() {
-	o.history = list.New()
-	o.current = nil
-}
-
-func (o *opHistory) IsHistoryClosed() bool {
-	o.fdLock.Lock()
-	defer o.fdLock.Unlock()
-	return o.fd.Fd() == ^(uintptr(0))
-}
-
-func (o *opHistory) Init() {
-	if o.IsHistoryClosed() {
-		o.initHistory()
-	}
-}
-
-func (o *opHistory) initHistory() {
-	if o.cfg.HistoryFile != "" {
-		o.historyUpdatePath(o.cfg.HistoryFile)
-	}
-}
-
-// only called by newOpHistory
-func (o *opHistory) historyUpdatePath(path string) {
-	o.fdLock.Lock()
-	defer o.fdLock.Unlock()
-	f, err := os.OpenFile(path, os.O_APPEND|os.O_CREATE|os.O_RDWR, 0666)
-	if err != nil {
-		return
-	}
-	o.fd = f
-	r := bufio.NewReader(o.fd)
-	total := 0
-	for ; ; total++ {
-		line, err := r.ReadString('\n')
-		if err != nil {
-			break
-		}
-		// ignore the empty line
-		line = strings.TrimSpace(line)
-		if len(line) == 0 {
-			continue
-		}
-		o.Push([]rune(line))
-		o.Compact()
-	}
-	if total > o.cfg.HistoryLimit {
-		o.rewriteLocked()
-	}
-	o.historyVer++
-	o.Push(nil)
-	return
-}
-
-func (o *opHistory) Compact() {
-	for o.history.Len() > o.cfg.HistoryLimit && o.history.Len() > 0 {
-		o.history.Remove(o.history.Front())
-	}
-}
-
-func (o *opHistory) Rewrite() {
-	o.fdLock.Lock()
-	defer o.fdLock.Unlock()
-	o.rewriteLocked()
-}
-
-func (o *opHistory) rewriteLocked() {
-	if o.cfg.HistoryFile == "" {
-		return
-	}
-
-	tmpFile := o.cfg.HistoryFile + ".tmp"
-	fd, err := os.OpenFile(tmpFile, os.O_CREATE|os.O_WRONLY|os.O_TRUNC|os.O_APPEND, 0666)
-	if err != nil {
-		return
-	}
-
-	buf := bufio.NewWriter(fd)
-	for elem := o.history.Front(); elem != nil; elem = elem.Next() {
-		buf.WriteString(string(elem.Value.(*hisItem).Source) + "\n")
-	}
-	buf.Flush()
-
-	// replace history file
-	if err = os.Rename(tmpFile, o.cfg.HistoryFile); err != nil {
-		fd.Close()
-		return
-	}
-
-	if o.fd != nil {
-		o.fd.Close()
-	}
-	// fd is write only, just satisfy what we need.
-	o.fd = fd
-}
-
-func (o *opHistory) Close() {
-	o.fdLock.Lock()
-	defer o.fdLock.Unlock()
-	if o.fd != nil {
-		o.fd.Close()
-	}
-}
-
-func (o *opHistory) FindBck(isNewSearch bool, rs []rune, start int) (int, *list.Element) {
-	for elem := o.current; elem != nil; elem = elem.Prev() {
-		item := o.showItem(elem.Value)
-		if isNewSearch {
-			start += len(rs)
-		}
-		if elem == o.current {
-			if len(item) >= start {
-				item = item[:start]
-			}
-		}
-		idx := runes.IndexAllBckEx(item, rs, o.cfg.HistorySearchFold)
-		if idx < 0 {
-			continue
-		}
-		return idx, elem
-	}
-	return -1, nil
-}
-
-func (o *opHistory) FindFwd(isNewSearch bool, rs []rune, start int) (int, *list.Element) {
-	for elem := o.current; elem != nil; elem = elem.Next() {
-		item := o.showItem(elem.Value)
-		if isNewSearch {
-			start -= len(rs)
-			if start < 0 {
-				start = 0
-			}
-		}
-		if elem == o.current {
-			if len(item)-1 >= start {
-				item = item[start:]
-			} else {
-				continue
-			}
-		}
-		idx := runes.IndexAllEx(item, rs, o.cfg.HistorySearchFold)
-		if idx < 0 {
-			continue
-		}
-		if elem == o.current {
-			idx += start
-		}
-		return idx, elem
-	}
-	return -1, nil
-}
-
-func (o *opHistory) showItem(obj interface{}) []rune {
-	item := obj.(*hisItem)
-	if item.Version == o.historyVer {
-		return item.Tmp
-	}
-	return item.Source
-}
-
-func (o *opHistory) Prev() []rune {
-	if o.current == nil {
-		return nil
-	}
-	current := o.current.Prev()
-	if current == nil {
-		return nil
-	}
-	o.current = current
-	return runes.Copy(o.showItem(current.Value))
-}
-
-func (o *opHistory) Next() ([]rune, bool) {
-	if o.current == nil {
-		return nil, false
-	}
-	current := o.current.Next()
-	if current == nil {
-		return nil, false
-	}
-
-	o.current = current
-	return runes.Copy(o.showItem(current.Value)), true
-}
-
-// Disable the current history
-func (o *opHistory) Disable() {
-	o.enable = false
-}
-
-// Enable the current history
-func (o *opHistory) Enable() {
-	o.enable = true
-}
-
-func (o *opHistory) debug() {
-	Debug("-------")
-	for item := o.history.Front(); item != nil; item = item.Next() {
-		Debug(fmt.Sprintf("%+v", item.Value))
-	}
-}
-
-// save history
-func (o *opHistory) New(current []rune) (err error) {
-
-	// history deactivated
-	if !o.enable {
-		return nil
-	}
-
-	current = runes.Copy(current)
-
-	// if just use last command without modify
-	// just clean lastest history
-	if back := o.history.Back(); back != nil {
-		prev := back.Prev()
-		if prev != nil {
-			if runes.Equal(current, prev.Value.(*hisItem).Source) {
-				o.current = o.history.Back()
-				o.current.Value.(*hisItem).Clean()
-				o.historyVer++
-				return nil
-			}
-		}
-	}
-
-	if len(current) == 0 {
-		o.current = o.history.Back()
-		if o.current != nil {
-			o.current.Value.(*hisItem).Clean()
-			o.historyVer++
-			return nil
-		}
-	}
-
-	if o.current != o.history.Back() {
-		// move history item to current command
-		currentItem := o.current.Value.(*hisItem)
-		// set current to last item
-		o.current = o.history.Back()
-
-		current = runes.Copy(currentItem.Tmp)
-	}
-
-	// err only can be a IO error, just report
-	err = o.Update(current, true)
-
-	// push a new one to commit current command
-	o.historyVer++
-	o.Push(nil)
-	return
-}
-
-func (o *opHistory) Revert() {
-	o.historyVer++
-	o.current = o.history.Back()
-}
-
-func (o *opHistory) Update(s []rune, commit bool) (err error) {
-	o.fdLock.Lock()
-	defer o.fdLock.Unlock()
-	s = runes.Copy(s)
-	if o.current == nil {
-		o.Push(s)
-		o.Compact()
-		return
-	}
-	r := o.current.Value.(*hisItem)
-	r.Version = o.historyVer
-	if commit {
-		r.Source = s
-		if o.fd != nil {
-			// just report the error
-			_, err = o.fd.Write([]byte(string(r.Source) + "\n"))
-		}
-	} else {
-		r.Tmp = append(r.Tmp[:0], s...)
-	}
-	o.current.Value = r
-	o.Compact()
-	return
-}
-
-func (o *opHistory) Push(s []rune) {
-	s = runes.Copy(s)
-	elem := o.history.PushBack(&hisItem{Source: s})
-	o.current = elem
-}
diff --git a/vendor/github.com/chzyer/readline/operation.go b/vendor/github.com/chzyer/readline/operation.go
deleted file mode 100644
index 4c31624..0000000
--- a/vendor/github.com/chzyer/readline/operation.go
+++ /dev/null
@@ -1,531 +0,0 @@
-package readline
-
-import (
-	"errors"
-	"io"
-	"sync"
-)
-
-var (
-	ErrInterrupt = errors.New("Interrupt")
-)
-
-type InterruptError struct {
-	Line []rune
-}
-
-func (*InterruptError) Error() string {
-	return "Interrupted"
-}
-
-type Operation struct {
-	m       sync.Mutex
-	cfg     *Config
-	t       *Terminal
-	buf     *RuneBuffer
-	outchan chan []rune
-	errchan chan error
-	w       io.Writer
-
-	history *opHistory
-	*opSearch
-	*opCompleter
-	*opPassword
-	*opVim
-}
-
-func (o *Operation) SetBuffer(what string) {
-	o.buf.Set([]rune(what))
-}
-
-type wrapWriter struct {
-	r      *Operation
-	t      *Terminal
-	target io.Writer
-}
-
-func (w *wrapWriter) Write(b []byte) (int, error) {
-	if !w.t.IsReading() {
-		return w.target.Write(b)
-	}
-
-	var (
-		n   int
-		err error
-	)
-	w.r.buf.Refresh(func() {
-		n, err = w.target.Write(b)
-	})
-
-	if w.r.IsSearchMode() {
-		w.r.SearchRefresh(-1)
-	}
-	if w.r.IsInCompleteMode() {
-		w.r.CompleteRefresh()
-	}
-	return n, err
-}
-
-func NewOperation(t *Terminal, cfg *Config) *Operation {
-	width := cfg.FuncGetWidth()
-	op := &Operation{
-		t:       t,
-		buf:     NewRuneBuffer(t, cfg.Prompt, cfg, width),
-		outchan: make(chan []rune),
-		errchan: make(chan error, 1),
-	}
-	op.w = op.buf.w
-	op.SetConfig(cfg)
-	op.opVim = newVimMode(op)
-	op.opCompleter = newOpCompleter(op.buf.w, op, width)
-	op.opPassword = newOpPassword(op)
-	op.cfg.FuncOnWidthChanged(func() {
-		newWidth := cfg.FuncGetWidth()
-		op.opCompleter.OnWidthChange(newWidth)
-		op.opSearch.OnWidthChange(newWidth)
-		op.buf.OnWidthChange(newWidth)
-	})
-	go op.ioloop()
-	return op
-}
-
-func (o *Operation) SetPrompt(s string) {
-	o.buf.SetPrompt(s)
-}
-
-func (o *Operation) SetMaskRune(r rune) {
-	o.buf.SetMask(r)
-}
-
-func (o *Operation) GetConfig() *Config {
-	o.m.Lock()
-	cfg := *o.cfg
-	o.m.Unlock()
-	return &cfg
-}
-
-func (o *Operation) ioloop() {
-	for {
-		keepInSearchMode := false
-		keepInCompleteMode := false
-		r := o.t.ReadRune()
-		if o.GetConfig().FuncFilterInputRune != nil {
-			var process bool
-			r, process = o.GetConfig().FuncFilterInputRune(r)
-			if !process {
-				o.buf.Refresh(nil) // to refresh the line
-				continue           // ignore this rune
-			}
-		}
-
-		if r == 0 { // io.EOF
-			if o.buf.Len() == 0 {
-				o.buf.Clean()
-				select {
-				case o.errchan <- io.EOF:
-				}
-				break
-			} else {
-				// if stdin got io.EOF and there is something left in buffer,
-				// let's flush them by sending CharEnter.
-				// And we will got io.EOF int next loop.
-				r = CharEnter
-			}
-		}
-		isUpdateHistory := true
-
-		if o.IsInCompleteSelectMode() {
-			keepInCompleteMode = o.HandleCompleteSelect(r)
-			if keepInCompleteMode {
-				continue
-			}
-
-			o.buf.Refresh(nil)
-			switch r {
-			case CharEnter, CharCtrlJ:
-				o.history.Update(o.buf.Runes(), false)
-				fallthrough
-			case CharInterrupt:
-				o.t.KickRead()
-				fallthrough
-			case CharBell:
-				continue
-			}
-		}
-
-		if o.IsEnableVimMode() {
-			r = o.HandleVim(r, o.t.ReadRune)
-			if r == 0 {
-				continue
-			}
-		}
-
-		switch r {
-		case CharBell:
-			if o.IsSearchMode() {
-				o.ExitSearchMode(true)
-				o.buf.Refresh(nil)
-			}
-			if o.IsInCompleteMode() {
-				o.ExitCompleteMode(true)
-				o.buf.Refresh(nil)
-			}
-		case CharTab:
-			if o.GetConfig().AutoComplete == nil {
-				o.t.Bell()
-				break
-			}
-			if o.OnComplete() {
-				keepInCompleteMode = true
-			} else {
-				o.t.Bell()
-				break
-			}
-
-		case CharBckSearch:
-			if !o.SearchMode(S_DIR_BCK) {
-				o.t.Bell()
-				break
-			}
-			keepInSearchMode = true
-		case CharCtrlU:
-			o.buf.KillFront()
-		case CharFwdSearch:
-			if !o.SearchMode(S_DIR_FWD) {
-				o.t.Bell()
-				break
-			}
-			keepInSearchMode = true
-		case CharKill:
-			o.buf.Kill()
-			keepInCompleteMode = true
-		case MetaForward:
-			o.buf.MoveToNextWord()
-		case CharTranspose:
-			o.buf.Transpose()
-		case MetaBackward:
-			o.buf.MoveToPrevWord()
-		case MetaDelete:
-			o.buf.DeleteWord()
-		case CharLineStart:
-			o.buf.MoveToLineStart()
-		case CharLineEnd:
-			o.buf.MoveToLineEnd()
-		case CharBackspace, CharCtrlH:
-			if o.IsSearchMode() {
-				o.SearchBackspace()
-				keepInSearchMode = true
-				break
-			}
-
-			if o.buf.Len() == 0 {
-				o.t.Bell()
-				break
-			}
-			o.buf.Backspace()
-			if o.IsInCompleteMode() {
-				o.OnComplete()
-			}
-		case CharCtrlZ:
-			o.buf.Clean()
-			o.t.SleepToResume()
-			o.Refresh()
-		case CharCtrlL:
-			ClearScreen(o.w)
-			o.Refresh()
-		case MetaBackspace, CharCtrlW:
-			o.buf.BackEscapeWord()
-		case CharCtrlY:
-			o.buf.Yank()
-		case CharEnter, CharCtrlJ:
-			if o.IsSearchMode() {
-				o.ExitSearchMode(false)
-			}
-			o.buf.MoveToLineEnd()
-			var data []rune
-			if !o.GetConfig().UniqueEditLine {
-				o.buf.WriteRune('\n')
-				data = o.buf.Reset()
-				data = data[:len(data)-1] // trim \n
-			} else {
-				o.buf.Clean()
-				data = o.buf.Reset()
-			}
-			o.outchan <- data
-			if !o.GetConfig().DisableAutoSaveHistory {
-				// ignore IO error
-				_ = o.history.New(data)
-			} else {
-				isUpdateHistory = false
-			}
-		case CharBackward:
-			o.buf.MoveBackward()
-		case CharForward:
-			o.buf.MoveForward()
-		case CharPrev:
-			buf := o.history.Prev()
-			if buf != nil {
-				o.buf.Set(buf)
-			} else {
-				o.t.Bell()
-			}
-		case CharNext:
-			buf, ok := o.history.Next()
-			if ok {
-				o.buf.Set(buf)
-			} else {
-				o.t.Bell()
-			}
-		case CharDelete:
-			if o.buf.Len() > 0 || !o.IsNormalMode() {
-				o.t.KickRead()
-				if !o.buf.Delete() {
-					o.t.Bell()
-				}
-				break
-			}
-
-			// treat as EOF
-			if !o.GetConfig().UniqueEditLine {
-				o.buf.WriteString(o.GetConfig().EOFPrompt + "\n")
-			}
-			o.buf.Reset()
-			isUpdateHistory = false
-			o.history.Revert()
-			o.errchan <- io.EOF
-			if o.GetConfig().UniqueEditLine {
-				o.buf.Clean()
-			}
-		case CharInterrupt:
-			if o.IsSearchMode() {
-				o.t.KickRead()
-				o.ExitSearchMode(true)
-				break
-			}
-			if o.IsInCompleteMode() {
-				o.t.KickRead()
-				o.ExitCompleteMode(true)
-				o.buf.Refresh(nil)
-				break
-			}
-			o.buf.MoveToLineEnd()
-			o.buf.Refresh(nil)
-			hint := o.GetConfig().InterruptPrompt + "\n"
-			if !o.GetConfig().UniqueEditLine {
-				o.buf.WriteString(hint)
-			}
-			remain := o.buf.Reset()
-			if !o.GetConfig().UniqueEditLine {
-				remain = remain[:len(remain)-len([]rune(hint))]
-			}
-			isUpdateHistory = false
-			o.history.Revert()
-			o.errchan <- &InterruptError{remain}
-		default:
-			if o.IsSearchMode() {
-				o.SearchChar(r)
-				keepInSearchMode = true
-				break
-			}
-			o.buf.WriteRune(r)
-			if o.IsInCompleteMode() {
-				o.OnComplete()
-				keepInCompleteMode = true
-			}
-		}
-
-		listener := o.GetConfig().Listener
-		if listener != nil {
-			newLine, newPos, ok := listener.OnChange(o.buf.Runes(), o.buf.Pos(), r)
-			if ok {
-				o.buf.SetWithIdx(newPos, newLine)
-			}
-		}
-
-		o.m.Lock()
-		if !keepInSearchMode && o.IsSearchMode() {
-			o.ExitSearchMode(false)
-			o.buf.Refresh(nil)
-		} else if o.IsInCompleteMode() {
-			if !keepInCompleteMode {
-				o.ExitCompleteMode(false)
-				o.Refresh()
-			} else {
-				o.buf.Refresh(nil)
-				o.CompleteRefresh()
-			}
-		}
-		if isUpdateHistory && !o.IsSearchMode() {
-			// it will cause null history
-			o.history.Update(o.buf.Runes(), false)
-		}
-		o.m.Unlock()
-	}
-}
-
-func (o *Operation) Stderr() io.Writer {
-	return &wrapWriter{target: o.GetConfig().Stderr, r: o, t: o.t}
-}
-
-func (o *Operation) Stdout() io.Writer {
-	return &wrapWriter{target: o.GetConfig().Stdout, r: o, t: o.t}
-}
-
-func (o *Operation) String() (string, error) {
-	r, err := o.Runes()
-	return string(r), err
-}
-
-func (o *Operation) Runes() ([]rune, error) {
-	o.t.EnterRawMode()
-	defer o.t.ExitRawMode()
-
-	listener := o.GetConfig().Listener
-	if listener != nil {
-		listener.OnChange(nil, 0, 0)
-	}
-
-	o.buf.Refresh(nil) // print prompt
-	o.t.KickRead()
-	select {
-	case r := <-o.outchan:
-		return r, nil
-	case err := <-o.errchan:
-		if e, ok := err.(*InterruptError); ok {
-			return e.Line, ErrInterrupt
-		}
-		return nil, err
-	}
-}
-
-func (o *Operation) PasswordEx(prompt string, l Listener) ([]byte, error) {
-	cfg := o.GenPasswordConfig()
-	cfg.Prompt = prompt
-	cfg.Listener = l
-	return o.PasswordWithConfig(cfg)
-}
-
-func (o *Operation) GenPasswordConfig() *Config {
-	return o.opPassword.PasswordConfig()
-}
-
-func (o *Operation) PasswordWithConfig(cfg *Config) ([]byte, error) {
-	if err := o.opPassword.EnterPasswordMode(cfg); err != nil {
-		return nil, err
-	}
-	defer o.opPassword.ExitPasswordMode()
-	return o.Slice()
-}
-
-func (o *Operation) Password(prompt string) ([]byte, error) {
-	return o.PasswordEx(prompt, nil)
-}
-
-func (o *Operation) SetTitle(t string) {
-	o.w.Write([]byte("\033[2;" + t + "\007"))
-}
-
-func (o *Operation) Slice() ([]byte, error) {
-	r, err := o.Runes()
-	if err != nil {
-		return nil, err
-	}
-	return []byte(string(r)), nil
-}
-
-func (o *Operation) Close() {
-	o.history.Close()
-}
-
-func (o *Operation) SetHistoryPath(path string) {
-	if o.history != nil {
-		o.history.Close()
-	}
-	o.cfg.HistoryFile = path
-	o.history = newOpHistory(o.cfg)
-}
-
-func (o *Operation) IsNormalMode() bool {
-	return !o.IsInCompleteMode() && !o.IsSearchMode()
-}
-
-func (op *Operation) SetConfig(cfg *Config) (*Config, error) {
-	op.m.Lock()
-	defer op.m.Unlock()
-	if op.cfg == cfg {
-		return op.cfg, nil
-	}
-	if err := cfg.Init(); err != nil {
-		return op.cfg, err
-	}
-	old := op.cfg
-	op.cfg = cfg
-	op.SetPrompt(cfg.Prompt)
-	op.SetMaskRune(cfg.MaskRune)
-	op.buf.SetConfig(cfg)
-	width := op.cfg.FuncGetWidth()
-
-	if cfg.opHistory == nil {
-		op.SetHistoryPath(cfg.HistoryFile)
-		cfg.opHistory = op.history
-		cfg.opSearch = newOpSearch(op.buf.w, op.buf, op.history, cfg, width)
-	}
-	op.history = cfg.opHistory
-
-	// SetHistoryPath will close opHistory which already exists
-	// so if we use it next time, we need to reopen it by `InitHistory()`
-	op.history.Init()
-
-	if op.cfg.AutoComplete != nil {
-		op.opCompleter = newOpCompleter(op.buf.w, op, width)
-	}
-
-	op.opSearch = cfg.opSearch
-	return old, nil
-}
-
-func (o *Operation) ResetHistory() {
-	o.history.Reset()
-}
-
-// if err is not nil, it just mean it fail to write to file
-// other things goes fine.
-func (o *Operation) SaveHistory(content string) error {
-	return o.history.New([]rune(content))
-}
-
-func (o *Operation) Refresh() {
-	if o.t.IsReading() {
-		o.buf.Refresh(nil)
-	}
-}
-
-func (o *Operation) Clean() {
-	o.buf.Clean()
-}
-
-func FuncListener(f func(line []rune, pos int, key rune) (newLine []rune, newPos int, ok bool)) Listener {
-	return &DumpListener{f: f}
-}
-
-type DumpListener struct {
-	f func(line []rune, pos int, key rune) (newLine []rune, newPos int, ok bool)
-}
-
-func (d *DumpListener) OnChange(line []rune, pos int, key rune) (newLine []rune, newPos int, ok bool) {
-	return d.f(line, pos, key)
-}
-
-type Listener interface {
-	OnChange(line []rune, pos int, key rune) (newLine []rune, newPos int, ok bool)
-}
-
-type Painter interface {
-	Paint(line []rune, pos int) []rune
-}
-
-type defaultPainter struct{}
-
-func (p *defaultPainter) Paint(line []rune, _ int) []rune {
-	return line
-}
diff --git a/vendor/github.com/chzyer/readline/password.go b/vendor/github.com/chzyer/readline/password.go
deleted file mode 100644
index 414288c..0000000
--- a/vendor/github.com/chzyer/readline/password.go
+++ /dev/null
@@ -1,33 +0,0 @@
-package readline
-
-type opPassword struct {
-	o         *Operation
-	backupCfg *Config
-}
-
-func newOpPassword(o *Operation) *opPassword {
-	return &opPassword{o: o}
-}
-
-func (o *opPassword) ExitPasswordMode() {
-	o.o.SetConfig(o.backupCfg)
-	o.backupCfg = nil
-}
-
-func (o *opPassword) EnterPasswordMode(cfg *Config) (err error) {
-	o.backupCfg, err = o.o.SetConfig(cfg)
-	return
-}
-
-func (o *opPassword) PasswordConfig() *Config {
-	return &Config{
-		EnableMask:      true,
-		InterruptPrompt: "\n",
-		EOFPrompt:       "\n",
-		HistoryLimit:    -1,
-		Painter:         &defaultPainter{},
-
-		Stdout: o.o.cfg.Stdout,
-		Stderr: o.o.cfg.Stderr,
-	}
-}
diff --git a/vendor/github.com/chzyer/readline/rawreader_windows.go b/vendor/github.com/chzyer/readline/rawreader_windows.go
deleted file mode 100644
index 073ef15..0000000
--- a/vendor/github.com/chzyer/readline/rawreader_windows.go
+++ /dev/null
@@ -1,125 +0,0 @@
-// +build windows
-
-package readline
-
-import "unsafe"
-
-const (
-	VK_CANCEL   = 0x03
-	VK_BACK     = 0x08
-	VK_TAB      = 0x09
-	VK_RETURN   = 0x0D
-	VK_SHIFT    = 0x10
-	VK_CONTROL  = 0x11
-	VK_MENU     = 0x12
-	VK_ESCAPE   = 0x1B
-	VK_LEFT     = 0x25
-	VK_UP       = 0x26
-	VK_RIGHT    = 0x27
-	VK_DOWN     = 0x28
-	VK_DELETE   = 0x2E
-	VK_LSHIFT   = 0xA0
-	VK_RSHIFT   = 0xA1
-	VK_LCONTROL = 0xA2
-	VK_RCONTROL = 0xA3
-)
-
-// RawReader translate input record to ANSI escape sequence.
-// To provides same behavior as unix terminal.
-type RawReader struct {
-	ctrlKey bool
-	altKey  bool
-}
-
-func NewRawReader() *RawReader {
-	r := new(RawReader)
-	return r
-}
-
-// only process one action in one read
-func (r *RawReader) Read(buf []byte) (int, error) {
-	ir := new(_INPUT_RECORD)
-	var read int
-	var err error
-next:
-	err = kernel.ReadConsoleInputW(stdin,
-		uintptr(unsafe.Pointer(ir)),
-		1,
-		uintptr(unsafe.Pointer(&read)),
-	)
-	if err != nil {
-		return 0, err
-	}
-	if ir.EventType != EVENT_KEY {
-		goto next
-	}
-	ker := (*_KEY_EVENT_RECORD)(unsafe.Pointer(&ir.Event[0]))
-	if ker.bKeyDown == 0 { // keyup
-		if r.ctrlKey || r.altKey {
-			switch ker.wVirtualKeyCode {
-			case VK_RCONTROL, VK_LCONTROL:
-				r.ctrlKey = false
-			case VK_MENU: //alt
-				r.altKey = false
-			}
-		}
-		goto next
-	}
-
-	if ker.unicodeChar == 0 {
-		var target rune
-		switch ker.wVirtualKeyCode {
-		case VK_RCONTROL, VK_LCONTROL:
-			r.ctrlKey = true
-		case VK_MENU: //alt
-			r.altKey = true
-		case VK_LEFT:
-			target = CharBackward
-		case VK_RIGHT:
-			target = CharForward
-		case VK_UP:
-			target = CharPrev
-		case VK_DOWN:
-			target = CharNext
-		}
-		if target != 0 {
-			return r.write(buf, target)
-		}
-		goto next
-	}
-	char := rune(ker.unicodeChar)
-	if r.ctrlKey {
-		switch char {
-		case 'A':
-			char = CharLineStart
-		case 'E':
-			char = CharLineEnd
-		case 'R':
-			char = CharBckSearch
-		case 'S':
-			char = CharFwdSearch
-		}
-	} else if r.altKey {
-		switch char {
-		case VK_BACK:
-			char = CharBackspace
-		}
-		return r.writeEsc(buf, char)
-	}
-	return r.write(buf, char)
-}
-
-func (r *RawReader) writeEsc(b []byte, char rune) (int, error) {
-	b[0] = '\033'
-	n := copy(b[1:], []byte(string(char)))
-	return n + 1, nil
-}
-
-func (r *RawReader) write(b []byte, char rune) (int, error) {
-	n := copy(b, []byte(string(char)))
-	return n, nil
-}
-
-func (r *RawReader) Close() error {
-	return nil
-}
diff --git a/vendor/github.com/chzyer/readline/readline.go b/vendor/github.com/chzyer/readline/readline.go
deleted file mode 100644
index 0e7aca0..0000000
--- a/vendor/github.com/chzyer/readline/readline.go
+++ /dev/null
@@ -1,326 +0,0 @@
-// Readline is a pure go implementation for GNU-Readline kind library.
-//
-// example:
-// 	rl, err := readline.New("> ")
-// 	if err != nil {
-// 		panic(err)
-// 	}
-// 	defer rl.Close()
-//
-// 	for {
-// 		line, err := rl.Readline()
-// 		if err != nil { // io.EOF
-// 			break
-// 		}
-// 		println(line)
-// 	}
-//
-package readline
-
-import "io"
-
-type Instance struct {
-	Config    *Config
-	Terminal  *Terminal
-	Operation *Operation
-}
-
-type Config struct {
-	// prompt supports ANSI escape sequence, so we can color some characters even in windows
-	Prompt string
-
-	// readline will persist historys to file where HistoryFile specified
-	HistoryFile string
-	// specify the max length of historys, it's 500 by default, set it to -1 to disable history
-	HistoryLimit           int
-	DisableAutoSaveHistory bool
-	// enable case-insensitive history searching
-	HistorySearchFold bool
-
-	// AutoCompleter will called once user press TAB
-	AutoComplete AutoCompleter
-
-	// Any key press will pass to Listener
-	// NOTE: Listener will be triggered by (nil, 0, 0) immediately
-	Listener Listener
-
-	Painter Painter
-
-	// If VimMode is true, readline will in vim.insert mode by default
-	VimMode bool
-
-	InterruptPrompt string
-	EOFPrompt       string
-
-	FuncGetWidth func() int
-
-	Stdin       io.ReadCloser
-	StdinWriter io.Writer
-	Stdout      io.Writer
-	Stderr      io.Writer
-
-	EnableMask bool
-	MaskRune   rune
-
-	// erase the editing line after user submited it
-	// it use in IM usually.
-	UniqueEditLine bool
-
-	// filter input runes (may be used to disable CtrlZ or for translating some keys to different actions)
-	// -> output = new (translated) rune and true/false if continue with processing this one
-	FuncFilterInputRune func(rune) (rune, bool)
-
-	// force use interactive even stdout is not a tty
-	FuncIsTerminal      func() bool
-	FuncMakeRaw         func() error
-	FuncExitRaw         func() error
-	FuncOnWidthChanged  func(func())
-	ForceUseInteractive bool
-
-	// private fields
-	inited    bool
-	opHistory *opHistory
-	opSearch  *opSearch
-}
-
-func (c *Config) useInteractive() bool {
-	if c.ForceUseInteractive {
-		return true
-	}
-	return c.FuncIsTerminal()
-}
-
-func (c *Config) Init() error {
-	if c.inited {
-		return nil
-	}
-	c.inited = true
-	if c.Stdin == nil {
-		c.Stdin = NewCancelableStdin(Stdin)
-	}
-
-	c.Stdin, c.StdinWriter = NewFillableStdin(c.Stdin)
-
-	if c.Stdout == nil {
-		c.Stdout = Stdout
-	}
-	if c.Stderr == nil {
-		c.Stderr = Stderr
-	}
-	if c.HistoryLimit == 0 {
-		c.HistoryLimit = 500
-	}
-
-	if c.InterruptPrompt == "" {
-		c.InterruptPrompt = "^C"
-	} else if c.InterruptPrompt == "\n" {
-		c.InterruptPrompt = ""
-	}
-	if c.EOFPrompt == "" {
-		c.EOFPrompt = "^D"
-	} else if c.EOFPrompt == "\n" {
-		c.EOFPrompt = ""
-	}
-
-	if c.AutoComplete == nil {
-		c.AutoComplete = &TabCompleter{}
-	}
-	if c.FuncGetWidth == nil {
-		c.FuncGetWidth = GetScreenWidth
-	}
-	if c.FuncIsTerminal == nil {
-		c.FuncIsTerminal = DefaultIsTerminal
-	}
-	rm := new(RawMode)
-	if c.FuncMakeRaw == nil {
-		c.FuncMakeRaw = rm.Enter
-	}
-	if c.FuncExitRaw == nil {
-		c.FuncExitRaw = rm.Exit
-	}
-	if c.FuncOnWidthChanged == nil {
-		c.FuncOnWidthChanged = DefaultOnWidthChanged
-	}
-
-	return nil
-}
-
-func (c Config) Clone() *Config {
-	c.opHistory = nil
-	c.opSearch = nil
-	return &c
-}
-
-func (c *Config) SetListener(f func(line []rune, pos int, key rune) (newLine []rune, newPos int, ok bool)) {
-	c.Listener = FuncListener(f)
-}
-
-func (c *Config) SetPainter(p Painter) {
-	c.Painter = p
-}
-
-func NewEx(cfg *Config) (*Instance, error) {
-	t, err := NewTerminal(cfg)
-	if err != nil {
-		return nil, err
-	}
-	rl := t.Readline()
-	if cfg.Painter == nil {
-		cfg.Painter = &defaultPainter{}
-	}
-	return &Instance{
-		Config:    cfg,
-		Terminal:  t,
-		Operation: rl,
-	}, nil
-}
-
-func New(prompt string) (*Instance, error) {
-	return NewEx(&Config{Prompt: prompt})
-}
-
-func (i *Instance) ResetHistory() {
-	i.Operation.ResetHistory()
-}
-
-func (i *Instance) SetPrompt(s string) {
-	i.Operation.SetPrompt(s)
-}
-
-func (i *Instance) SetMaskRune(r rune) {
-	i.Operation.SetMaskRune(r)
-}
-
-// change history persistence in runtime
-func (i *Instance) SetHistoryPath(p string) {
-	i.Operation.SetHistoryPath(p)
-}
-
-// readline will refresh automatic when write through Stdout()
-func (i *Instance) Stdout() io.Writer {
-	return i.Operation.Stdout()
-}
-
-// readline will refresh automatic when write through Stdout()
-func (i *Instance) Stderr() io.Writer {
-	return i.Operation.Stderr()
-}
-
-// switch VimMode in runtime
-func (i *Instance) SetVimMode(on bool) {
-	i.Operation.SetVimMode(on)
-}
-
-func (i *Instance) IsVimMode() bool {
-	return i.Operation.IsEnableVimMode()
-}
-
-func (i *Instance) GenPasswordConfig() *Config {
-	return i.Operation.GenPasswordConfig()
-}
-
-// we can generate a config by `i.GenPasswordConfig()`
-func (i *Instance) ReadPasswordWithConfig(cfg *Config) ([]byte, error) {
-	return i.Operation.PasswordWithConfig(cfg)
-}
-
-func (i *Instance) ReadPasswordEx(prompt string, l Listener) ([]byte, error) {
-	return i.Operation.PasswordEx(prompt, l)
-}
-
-func (i *Instance) ReadPassword(prompt string) ([]byte, error) {
-	return i.Operation.Password(prompt)
-}
-
-type Result struct {
-	Line  string
-	Error error
-}
-
-func (l *Result) CanContinue() bool {
-	return len(l.Line) != 0 && l.Error == ErrInterrupt
-}
-
-func (l *Result) CanBreak() bool {
-	return !l.CanContinue() && l.Error != nil
-}
-
-func (i *Instance) Line() *Result {
-	ret, err := i.Readline()
-	return &Result{ret, err}
-}
-
-// err is one of (nil, io.EOF, readline.ErrInterrupt)
-func (i *Instance) Readline() (string, error) {
-	return i.Operation.String()
-}
-
-func (i *Instance) ReadlineWithDefault(what string) (string, error) {
-	i.Operation.SetBuffer(what)
-	return i.Operation.String()
-}
-
-func (i *Instance) SaveHistory(content string) error {
-	return i.Operation.SaveHistory(content)
-}
-
-// same as readline
-func (i *Instance) ReadSlice() ([]byte, error) {
-	return i.Operation.Slice()
-}
-
-// we must make sure that call Close() before process exit.
-func (i *Instance) Close() error {
-	if err := i.Terminal.Close(); err != nil {
-		return err
-	}
-	i.Config.Stdin.Close()
-	i.Operation.Close()
-	return nil
-}
-func (i *Instance) Clean() {
-	i.Operation.Clean()
-}
-
-func (i *Instance) Write(b []byte) (int, error) {
-	return i.Stdout().Write(b)
-}
-
-// WriteStdin prefill the next Stdin fetch
-// Next time you call ReadLine() this value will be writen before the user input
-// ie :
-//  i := readline.New()
-//  i.WriteStdin([]byte("test"))
-//  _, _= i.Readline()
-//
-// gives
-//
-// > test[cursor]
-func (i *Instance) WriteStdin(val []byte) (int, error) {
-	return i.Terminal.WriteStdin(val)
-}
-
-func (i *Instance) SetConfig(cfg *Config) *Config {
-	if i.Config == cfg {
-		return cfg
-	}
-	old := i.Config
-	i.Config = cfg
-	i.Operation.SetConfig(cfg)
-	i.Terminal.SetConfig(cfg)
-	return old
-}
-
-func (i *Instance) Refresh() {
-	i.Operation.Refresh()
-}
-
-// HistoryDisable the save of the commands into the history
-func (i *Instance) HistoryDisable() {
-	i.Operation.history.Disable()
-}
-
-// HistoryEnable the save of the commands into the history (default on)
-func (i *Instance) HistoryEnable() {
-	i.Operation.history.Enable()
-}
diff --git a/vendor/github.com/chzyer/readline/remote.go b/vendor/github.com/chzyer/readline/remote.go
deleted file mode 100644
index 74dbf56..0000000
--- a/vendor/github.com/chzyer/readline/remote.go
+++ /dev/null
@@ -1,475 +0,0 @@
-package readline
-
-import (
-	"bufio"
-	"bytes"
-	"encoding/binary"
-	"fmt"
-	"io"
-	"net"
-	"os"
-	"sync"
-	"sync/atomic"
-)
-
-type MsgType int16
-
-const (
-	T_DATA = MsgType(iota)
-	T_WIDTH
-	T_WIDTH_REPORT
-	T_ISTTY_REPORT
-	T_RAW
-	T_ERAW // exit raw
-	T_EOF
-)
-
-type RemoteSvr struct {
-	eof           int32
-	closed        int32
-	width         int32
-	reciveChan    chan struct{}
-	writeChan     chan *writeCtx
-	conn          net.Conn
-	isTerminal    bool
-	funcWidthChan func()
-	stopChan      chan struct{}
-
-	dataBufM sync.Mutex
-	dataBuf  bytes.Buffer
-}
-
-type writeReply struct {
-	n   int
-	err error
-}
-
-type writeCtx struct {
-	msg   *Message
-	reply chan *writeReply
-}
-
-func newWriteCtx(msg *Message) *writeCtx {
-	return &writeCtx{
-		msg:   msg,
-		reply: make(chan *writeReply),
-	}
-}
-
-func NewRemoteSvr(conn net.Conn) (*RemoteSvr, error) {
-	rs := &RemoteSvr{
-		width:      -1,
-		conn:       conn,
-		writeChan:  make(chan *writeCtx),
-		reciveChan: make(chan struct{}),
-		stopChan:   make(chan struct{}),
-	}
-	buf := bufio.NewReader(rs.conn)
-
-	if err := rs.init(buf); err != nil {
-		return nil, err
-	}
-
-	go rs.readLoop(buf)
-	go rs.writeLoop()
-	return rs, nil
-}
-
-func (r *RemoteSvr) init(buf *bufio.Reader) error {
-	m, err := ReadMessage(buf)
-	if err != nil {
-		return err
-	}
-	// receive isTerminal
-	if m.Type != T_ISTTY_REPORT {
-		return fmt.Errorf("unexpected init message")
-	}
-	r.GotIsTerminal(m.Data)
-
-	// receive width
-	m, err = ReadMessage(buf)
-	if err != nil {
-		return err
-	}
-	if m.Type != T_WIDTH_REPORT {
-		return fmt.Errorf("unexpected init message")
-	}
-	r.GotReportWidth(m.Data)
-
-	return nil
-}
-
-func (r *RemoteSvr) HandleConfig(cfg *Config) {
-	cfg.Stderr = r
-	cfg.Stdout = r
-	cfg.Stdin = r
-	cfg.FuncExitRaw = r.ExitRawMode
-	cfg.FuncIsTerminal = r.IsTerminal
-	cfg.FuncMakeRaw = r.EnterRawMode
-	cfg.FuncExitRaw = r.ExitRawMode
-	cfg.FuncGetWidth = r.GetWidth
-	cfg.FuncOnWidthChanged = func(f func()) {
-		r.funcWidthChan = f
-	}
-}
-
-func (r *RemoteSvr) IsTerminal() bool {
-	return r.isTerminal
-}
-
-func (r *RemoteSvr) checkEOF() error {
-	if atomic.LoadInt32(&r.eof) == 1 {
-		return io.EOF
-	}
-	return nil
-}
-
-func (r *RemoteSvr) Read(b []byte) (int, error) {
-	r.dataBufM.Lock()
-	n, err := r.dataBuf.Read(b)
-	r.dataBufM.Unlock()
-	if n == 0 {
-		if err := r.checkEOF(); err != nil {
-			return 0, err
-		}
-	}
-
-	if n == 0 && err == io.EOF {
-		<-r.reciveChan
-		r.dataBufM.Lock()
-		n, err = r.dataBuf.Read(b)
-		r.dataBufM.Unlock()
-	}
-	if n == 0 {
-		if err := r.checkEOF(); err != nil {
-			return 0, err
-		}
-	}
-
-	return n, err
-}
-
-func (r *RemoteSvr) writeMsg(m *Message) error {
-	ctx := newWriteCtx(m)
-	r.writeChan <- ctx
-	reply := <-ctx.reply
-	return reply.err
-}
-
-func (r *RemoteSvr) Write(b []byte) (int, error) {
-	ctx := newWriteCtx(NewMessage(T_DATA, b))
-	r.writeChan <- ctx
-	reply := <-ctx.reply
-	return reply.n, reply.err
-}
-
-func (r *RemoteSvr) EnterRawMode() error {
-	return r.writeMsg(NewMessage(T_RAW, nil))
-}
-
-func (r *RemoteSvr) ExitRawMode() error {
-	return r.writeMsg(NewMessage(T_ERAW, nil))
-}
-
-func (r *RemoteSvr) writeLoop() {
-	defer r.Close()
-
-loop:
-	for {
-		select {
-		case ctx, ok := <-r.writeChan:
-			if !ok {
-				break
-			}
-			n, err := ctx.msg.WriteTo(r.conn)
-			ctx.reply <- &writeReply{n, err}
-		case <-r.stopChan:
-			break loop
-		}
-	}
-}
-
-func (r *RemoteSvr) Close() error {
-	if atomic.CompareAndSwapInt32(&r.closed, 0, 1) {
-		close(r.stopChan)
-		r.conn.Close()
-	}
-	return nil
-}
-
-func (r *RemoteSvr) readLoop(buf *bufio.Reader) {
-	defer r.Close()
-	for {
-		m, err := ReadMessage(buf)
-		if err != nil {
-			break
-		}
-		switch m.Type {
-		case T_EOF:
-			atomic.StoreInt32(&r.eof, 1)
-			select {
-			case r.reciveChan <- struct{}{}:
-			default:
-			}
-		case T_DATA:
-			r.dataBufM.Lock()
-			r.dataBuf.Write(m.Data)
-			r.dataBufM.Unlock()
-			select {
-			case r.reciveChan <- struct{}{}:
-			default:
-			}
-		case T_WIDTH_REPORT:
-			r.GotReportWidth(m.Data)
-		case T_ISTTY_REPORT:
-			r.GotIsTerminal(m.Data)
-		}
-	}
-}
-
-func (r *RemoteSvr) GotIsTerminal(data []byte) {
-	if binary.BigEndian.Uint16(data) == 0 {
-		r.isTerminal = false
-	} else {
-		r.isTerminal = true
-	}
-}
-
-func (r *RemoteSvr) GotReportWidth(data []byte) {
-	atomic.StoreInt32(&r.width, int32(binary.BigEndian.Uint16(data)))
-	if r.funcWidthChan != nil {
-		r.funcWidthChan()
-	}
-}
-
-func (r *RemoteSvr) GetWidth() int {
-	return int(atomic.LoadInt32(&r.width))
-}
-
-// -----------------------------------------------------------------------------
-
-type Message struct {
-	Type MsgType
-	Data []byte
-}
-
-func ReadMessage(r io.Reader) (*Message, error) {
-	m := new(Message)
-	var length int32
-	if err := binary.Read(r, binary.BigEndian, &length); err != nil {
-		return nil, err
-	}
-	if err := binary.Read(r, binary.BigEndian, &m.Type); err != nil {
-		return nil, err
-	}
-	m.Data = make([]byte, int(length)-2)
-	if _, err := io.ReadFull(r, m.Data); err != nil {
-		return nil, err
-	}
-	return m, nil
-}
-
-func NewMessage(t MsgType, data []byte) *Message {
-	return &Message{t, data}
-}
-
-func (m *Message) WriteTo(w io.Writer) (int, error) {
-	buf := bytes.NewBuffer(make([]byte, 0, len(m.Data)+2+4))
-	binary.Write(buf, binary.BigEndian, int32(len(m.Data)+2))
-	binary.Write(buf, binary.BigEndian, m.Type)
-	buf.Write(m.Data)
-	n, err := buf.WriteTo(w)
-	return int(n), err
-}
-
-// -----------------------------------------------------------------------------
-
-type RemoteCli struct {
-	conn        net.Conn
-	raw         RawMode
-	receiveChan chan struct{}
-	inited      int32
-	isTerminal  *bool
-
-	data  bytes.Buffer
-	dataM sync.Mutex
-}
-
-func NewRemoteCli(conn net.Conn) (*RemoteCli, error) {
-	r := &RemoteCli{
-		conn:        conn,
-		receiveChan: make(chan struct{}),
-	}
-	return r, nil
-}
-
-func (r *RemoteCli) MarkIsTerminal(is bool) {
-	r.isTerminal = &is
-}
-
-func (r *RemoteCli) init() error {
-	if !atomic.CompareAndSwapInt32(&r.inited, 0, 1) {
-		return nil
-	}
-
-	if err := r.reportIsTerminal(); err != nil {
-		return err
-	}
-
-	if err := r.reportWidth(); err != nil {
-		return err
-	}
-
-	// register sig for width changed
-	DefaultOnWidthChanged(func() {
-		r.reportWidth()
-	})
-	return nil
-}
-
-func (r *RemoteCli) writeMsg(m *Message) error {
-	r.dataM.Lock()
-	_, err := m.WriteTo(r.conn)
-	r.dataM.Unlock()
-	return err
-}
-
-func (r *RemoteCli) Write(b []byte) (int, error) {
-	m := NewMessage(T_DATA, b)
-	r.dataM.Lock()
-	_, err := m.WriteTo(r.conn)
-	r.dataM.Unlock()
-	return len(b), err
-}
-
-func (r *RemoteCli) reportWidth() error {
-	screenWidth := GetScreenWidth()
-	data := make([]byte, 2)
-	binary.BigEndian.PutUint16(data, uint16(screenWidth))
-	msg := NewMessage(T_WIDTH_REPORT, data)
-
-	if err := r.writeMsg(msg); err != nil {
-		return err
-	}
-	return nil
-}
-
-func (r *RemoteCli) reportIsTerminal() error {
-	var isTerminal bool
-	if r.isTerminal != nil {
-		isTerminal = *r.isTerminal
-	} else {
-		isTerminal = DefaultIsTerminal()
-	}
-	data := make([]byte, 2)
-	if isTerminal {
-		binary.BigEndian.PutUint16(data, 1)
-	} else {
-		binary.BigEndian.PutUint16(data, 0)
-	}
-	msg := NewMessage(T_ISTTY_REPORT, data)
-	if err := r.writeMsg(msg); err != nil {
-		return err
-	}
-	return nil
-}
-
-func (r *RemoteCli) readLoop() {
-	buf := bufio.NewReader(r.conn)
-	for {
-		msg, err := ReadMessage(buf)
-		if err != nil {
-			break
-		}
-		switch msg.Type {
-		case T_ERAW:
-			r.raw.Exit()
-		case T_RAW:
-			r.raw.Enter()
-		case T_DATA:
-			os.Stdout.Write(msg.Data)
-		}
-	}
-}
-
-func (r *RemoteCli) ServeBy(source io.Reader) error {
-	if err := r.init(); err != nil {
-		return err
-	}
-
-	go func() {
-		defer r.Close()
-		for {
-			n, _ := io.Copy(r, source)
-			if n == 0 {
-				break
-			}
-		}
-	}()
-	defer r.raw.Exit()
-	r.readLoop()
-	return nil
-}
-
-func (r *RemoteCli) Close() {
-	r.writeMsg(NewMessage(T_EOF, nil))
-}
-
-func (r *RemoteCli) Serve() error {
-	return r.ServeBy(os.Stdin)
-}
-
-func ListenRemote(n, addr string, cfg *Config, h func(*Instance), onListen ...func(net.Listener) error) error {
-	ln, err := net.Listen(n, addr)
-	if err != nil {
-		return err
-	}
-	if len(onListen) > 0 {
-		if err := onListen[0](ln); err != nil {
-			return err
-		}
-	}
-	for {
-		conn, err := ln.Accept()
-		if err != nil {
-			break
-		}
-		go func() {
-			defer conn.Close()
-			rl, err := HandleConn(*cfg, conn)
-			if err != nil {
-				return
-			}
-			h(rl)
-		}()
-	}
-	return nil
-}
-
-func HandleConn(cfg Config, conn net.Conn) (*Instance, error) {
-	r, err := NewRemoteSvr(conn)
-	if err != nil {
-		return nil, err
-	}
-	r.HandleConfig(&cfg)
-
-	rl, err := NewEx(&cfg)
-	if err != nil {
-		return nil, err
-	}
-	return rl, nil
-}
-
-func DialRemote(n, addr string) error {
-	conn, err := net.Dial(n, addr)
-	if err != nil {
-		return err
-	}
-	defer conn.Close()
-
-	cli, err := NewRemoteCli(conn)
-	if err != nil {
-		return err
-	}
-	return cli.Serve()
-}
diff --git a/vendor/github.com/chzyer/readline/runebuf.go b/vendor/github.com/chzyer/readline/runebuf.go
deleted file mode 100644
index 81d2da5..0000000
--- a/vendor/github.com/chzyer/readline/runebuf.go
+++ /dev/null
@@ -1,629 +0,0 @@
-package readline
-
-import (
-	"bufio"
-	"bytes"
-	"io"
-	"strconv"
-	"strings"
-	"sync"
-)
-
-type runeBufferBck struct {
-	buf []rune
-	idx int
-}
-
-type RuneBuffer struct {
-	buf    []rune
-	idx    int
-	prompt []rune
-	w      io.Writer
-
-	hadClean    bool
-	interactive bool
-	cfg         *Config
-
-	width int
-
-	bck *runeBufferBck
-
-	offset string
-
-	lastKill []rune
-
-	sync.Mutex
-}
-
-func (r* RuneBuffer) pushKill(text []rune) {
-	r.lastKill = append([]rune{}, text...)
-}
-
-func (r *RuneBuffer) OnWidthChange(newWidth int) {
-	r.Lock()
-	r.width = newWidth
-	r.Unlock()
-}
-
-func (r *RuneBuffer) Backup() {
-	r.Lock()
-	r.bck = &runeBufferBck{r.buf, r.idx}
-	r.Unlock()
-}
-
-func (r *RuneBuffer) Restore() {
-	r.Refresh(func() {
-		if r.bck == nil {
-			return
-		}
-		r.buf = r.bck.buf
-		r.idx = r.bck.idx
-	})
-}
-
-func NewRuneBuffer(w io.Writer, prompt string, cfg *Config, width int) *RuneBuffer {
-	rb := &RuneBuffer{
-		w:           w,
-		interactive: cfg.useInteractive(),
-		cfg:         cfg,
-		width:       width,
-	}
-	rb.SetPrompt(prompt)
-	return rb
-}
-
-func (r *RuneBuffer) SetConfig(cfg *Config) {
-	r.Lock()
-	r.cfg = cfg
-	r.interactive = cfg.useInteractive()
-	r.Unlock()
-}
-
-func (r *RuneBuffer) SetMask(m rune) {
-	r.Lock()
-	r.cfg.MaskRune = m
-	r.Unlock()
-}
-
-func (r *RuneBuffer) CurrentWidth(x int) int {
-	r.Lock()
-	defer r.Unlock()
-	return runes.WidthAll(r.buf[:x])
-}
-
-func (r *RuneBuffer) PromptLen() int {
-	r.Lock()
-	width := r.promptLen()
-	r.Unlock()
-	return width
-}
-
-func (r *RuneBuffer) promptLen() int {
-	return runes.WidthAll(runes.ColorFilter(r.prompt))
-}
-
-func (r *RuneBuffer) RuneSlice(i int) []rune {
-	r.Lock()
-	defer r.Unlock()
-
-	if i > 0 {
-		rs := make([]rune, i)
-		copy(rs, r.buf[r.idx:r.idx+i])
-		return rs
-	}
-	rs := make([]rune, -i)
-	copy(rs, r.buf[r.idx+i:r.idx])
-	return rs
-}
-
-func (r *RuneBuffer) Runes() []rune {
-	r.Lock()
-	newr := make([]rune, len(r.buf))
-	copy(newr, r.buf)
-	r.Unlock()
-	return newr
-}
-
-func (r *RuneBuffer) Pos() int {
-	r.Lock()
-	defer r.Unlock()
-	return r.idx
-}
-
-func (r *RuneBuffer) Len() int {
-	r.Lock()
-	defer r.Unlock()
-	return len(r.buf)
-}
-
-func (r *RuneBuffer) MoveToLineStart() {
-	r.Refresh(func() {
-		if r.idx == 0 {
-			return
-		}
-		r.idx = 0
-	})
-}
-
-func (r *RuneBuffer) MoveBackward() {
-	r.Refresh(func() {
-		if r.idx == 0 {
-			return
-		}
-		r.idx--
-	})
-}
-
-func (r *RuneBuffer) WriteString(s string) {
-	r.WriteRunes([]rune(s))
-}
-
-func (r *RuneBuffer) WriteRune(s rune) {
-	r.WriteRunes([]rune{s})
-}
-
-func (r *RuneBuffer) WriteRunes(s []rune) {
-	r.Refresh(func() {
-		tail := append(s, r.buf[r.idx:]...)
-		r.buf = append(r.buf[:r.idx], tail...)
-		r.idx += len(s)
-	})
-}
-
-func (r *RuneBuffer) MoveForward() {
-	r.Refresh(func() {
-		if r.idx == len(r.buf) {
-			return
-		}
-		r.idx++
-	})
-}
-
-func (r *RuneBuffer) IsCursorInEnd() bool {
-	r.Lock()
-	defer r.Unlock()
-	return r.idx == len(r.buf)
-}
-
-func (r *RuneBuffer) Replace(ch rune) {
-	r.Refresh(func() {
-		r.buf[r.idx] = ch
-	})
-}
-
-func (r *RuneBuffer) Erase() {
-	r.Refresh(func() {
-		r.idx = 0
-		r.pushKill(r.buf[:])
-		r.buf = r.buf[:0]
-	})
-}
-
-func (r *RuneBuffer) Delete() (success bool) {
-	r.Refresh(func() {
-		if r.idx == len(r.buf) {
-			return
-		}
-		r.pushKill(r.buf[r.idx : r.idx+1])
-		r.buf = append(r.buf[:r.idx], r.buf[r.idx+1:]...)
-		success = true
-	})
-	return
-}
-
-func (r *RuneBuffer) DeleteWord() {
-	if r.idx == len(r.buf) {
-		return
-	}
-	init := r.idx
-	for init < len(r.buf) && IsWordBreak(r.buf[init]) {
-		init++
-	}
-	for i := init + 1; i < len(r.buf); i++ {
-		if !IsWordBreak(r.buf[i]) && IsWordBreak(r.buf[i-1]) {
-			r.pushKill(r.buf[r.idx:i-1])
-			r.Refresh(func() {
-				r.buf = append(r.buf[:r.idx], r.buf[i-1:]...)
-			})
-			return
-		}
-	}
-	r.Kill()
-}
-
-func (r *RuneBuffer) MoveToPrevWord() (success bool) {
-	r.Refresh(func() {
-		if r.idx == 0 {
-			return
-		}
-
-		for i := r.idx - 1; i > 0; i-- {
-			if !IsWordBreak(r.buf[i]) && IsWordBreak(r.buf[i-1]) {
-				r.idx = i
-				success = true
-				return
-			}
-		}
-		r.idx = 0
-		success = true
-	})
-	return
-}
-
-func (r *RuneBuffer) KillFront() {
-	r.Refresh(func() {
-		if r.idx == 0 {
-			return
-		}
-
-		length := len(r.buf) - r.idx
-		r.pushKill(r.buf[:r.idx])
-		copy(r.buf[:length], r.buf[r.idx:])
-		r.idx = 0
-		r.buf = r.buf[:length]
-	})
-}
-
-func (r *RuneBuffer) Kill() {
-	r.Refresh(func() {
-		r.pushKill(r.buf[r.idx:])
-		r.buf = r.buf[:r.idx]
-	})
-}
-
-func (r *RuneBuffer) Transpose() {
-	r.Refresh(func() {
-		if len(r.buf) == 1 {
-			r.idx++
-		}
-
-		if len(r.buf) < 2 {
-			return
-		}
-
-		if r.idx == 0 {
-			r.idx = 1
-		} else if r.idx >= len(r.buf) {
-			r.idx = len(r.buf) - 1
-		}
-		r.buf[r.idx], r.buf[r.idx-1] = r.buf[r.idx-1], r.buf[r.idx]
-		r.idx++
-	})
-}
-
-func (r *RuneBuffer) MoveToNextWord() {
-	r.Refresh(func() {
-		for i := r.idx + 1; i < len(r.buf); i++ {
-			if !IsWordBreak(r.buf[i]) && IsWordBreak(r.buf[i-1]) {
-				r.idx = i
-				return
-			}
-		}
-
-		r.idx = len(r.buf)
-	})
-}
-
-func (r *RuneBuffer) MoveToEndWord() {
-	r.Refresh(func() {
-		// already at the end, so do nothing
-		if r.idx == len(r.buf) {
-			return
-		}
-		// if we are at the end of a word already, go to next
-		if !IsWordBreak(r.buf[r.idx]) && IsWordBreak(r.buf[r.idx+1]) {
-			r.idx++
-		}
-
-		// keep going until at the end of a word
-		for i := r.idx + 1; i < len(r.buf); i++ {
-			if IsWordBreak(r.buf[i]) && !IsWordBreak(r.buf[i-1]) {
-				r.idx = i - 1
-				return
-			}
-		}
-		r.idx = len(r.buf)
-	})
-}
-
-func (r *RuneBuffer) BackEscapeWord() {
-	r.Refresh(func() {
-		if r.idx == 0 {
-			return
-		}
-		for i := r.idx - 1; i > 0; i-- {
-			if !IsWordBreak(r.buf[i]) && IsWordBreak(r.buf[i-1]) {
-				r.pushKill(r.buf[i:r.idx])
-				r.buf = append(r.buf[:i], r.buf[r.idx:]...)
-				r.idx = i
-				return
-			}
-		}
-
-		r.buf = r.buf[:0]
-		r.idx = 0
-	})
-}
-
-func (r *RuneBuffer) Yank() {
-	if len(r.lastKill) == 0 {
-		return
-	}
-	r.Refresh(func() {
-		buf := make([]rune, 0, len(r.buf) + len(r.lastKill))
-		buf = append(buf, r.buf[:r.idx]...)
-		buf = append(buf, r.lastKill...)
-		buf = append(buf, r.buf[r.idx:]...)
-		r.buf = buf
-		r.idx += len(r.lastKill)
-	})
-}
-
-func (r *RuneBuffer) Backspace() {
-	r.Refresh(func() {
-		if r.idx == 0 {
-			return
-		}
-
-		r.idx--
-		r.buf = append(r.buf[:r.idx], r.buf[r.idx+1:]...)
-	})
-}
-
-func (r *RuneBuffer) MoveToLineEnd() {
-	r.Refresh(func() {
-		if r.idx == len(r.buf) {
-			return
-		}
-
-		r.idx = len(r.buf)
-	})
-}
-
-func (r *RuneBuffer) LineCount(width int) int {
-	if width == -1 {
-		width = r.width
-	}
-	return LineCount(width,
-		runes.WidthAll(r.buf)+r.PromptLen())
-}
-
-func (r *RuneBuffer) MoveTo(ch rune, prevChar, reverse bool) (success bool) {
-	r.Refresh(func() {
-		if reverse {
-			for i := r.idx - 1; i >= 0; i-- {
-				if r.buf[i] == ch {
-					r.idx = i
-					if prevChar {
-						r.idx++
-					}
-					success = true
-					return
-				}
-			}
-			return
-		}
-		for i := r.idx + 1; i < len(r.buf); i++ {
-			if r.buf[i] == ch {
-				r.idx = i
-				if prevChar {
-					r.idx--
-				}
-				success = true
-				return
-			}
-		}
-	})
-	return
-}
-
-func (r *RuneBuffer) isInLineEdge() bool {
-	if isWindows {
-		return false
-	}
-	sp := r.getSplitByLine(r.buf)
-	return len(sp[len(sp)-1]) == 0
-}
-
-func (r *RuneBuffer) getSplitByLine(rs []rune) []string {
-	return SplitByLine(r.promptLen(), r.width, rs)
-}
-
-func (r *RuneBuffer) IdxLine(width int) int {
-	r.Lock()
-	defer r.Unlock()
-	return r.idxLine(width)
-}
-
-func (r *RuneBuffer) idxLine(width int) int {
-	if width == 0 {
-		return 0
-	}
-	sp := r.getSplitByLine(r.buf[:r.idx])
-	return len(sp) - 1
-}
-
-func (r *RuneBuffer) CursorLineCount() int {
-	return r.LineCount(r.width) - r.IdxLine(r.width)
-}
-
-func (r *RuneBuffer) Refresh(f func()) {
-	r.Lock()
-	defer r.Unlock()
-
-	if !r.interactive {
-		if f != nil {
-			f()
-		}
-		return
-	}
-
-	r.clean()
-	if f != nil {
-		f()
-	}
-	r.print()
-}
-
-func (r *RuneBuffer) SetOffset(offset string) {
-	r.Lock()
-	r.offset = offset
-	r.Unlock()
-}
-
-func (r *RuneBuffer) print() {
-	r.w.Write(r.output())
-	r.hadClean = false
-}
-
-func (r *RuneBuffer) output() []byte {
-	buf := bytes.NewBuffer(nil)
-	buf.WriteString(string(r.prompt))
-	if r.cfg.EnableMask && len(r.buf) > 0 {
-		buf.Write([]byte(strings.Repeat(string(r.cfg.MaskRune), len(r.buf)-1)))
-		if r.buf[len(r.buf)-1] == '\n' {
-			buf.Write([]byte{'\n'})
-		} else {
-			buf.Write([]byte(string(r.cfg.MaskRune)))
-		}
-		if len(r.buf) > r.idx {
-			buf.Write(r.getBackspaceSequence())
-		}
-
-	} else {
-		for _, e := range r.cfg.Painter.Paint(r.buf, r.idx) {
-			if e == '\t' {
-				buf.WriteString(strings.Repeat(" ", TabWidth))
-			} else {
-				buf.WriteRune(e)
-			}
-		}
-		if r.isInLineEdge() {
-			buf.Write([]byte(" \b"))
-		}
-	}
-	// cursor position
-	if len(r.buf) > r.idx {
-		buf.Write(r.getBackspaceSequence())
-	}
-	return buf.Bytes()
-}
-
-func (r *RuneBuffer) getBackspaceSequence() []byte {
-	var sep = map[int]bool{}
-
-	var i int
-	for {
-		if i >= runes.WidthAll(r.buf) {
-			break
-		}
-
-		if i == 0 {
-			i -= r.promptLen()
-		}
-		i += r.width
-
-		sep[i] = true
-	}
-	var buf []byte
-	for i := len(r.buf); i > r.idx; i-- {
-		// move input to the left of one
-		buf = append(buf, '\b')
-		if sep[i] {
-			// up one line, go to the start of the line and move cursor right to the end (r.width)
-			buf = append(buf, "\033[A\r"+"\033["+strconv.Itoa(r.width)+"C"...)
-		}
-	}
-
-	return buf
-
-}
-
-func (r *RuneBuffer) Reset() []rune {
-	ret := runes.Copy(r.buf)
-	r.buf = r.buf[:0]
-	r.idx = 0
-	return ret
-}
-
-func (r *RuneBuffer) calWidth(m int) int {
-	if m > 0 {
-		return runes.WidthAll(r.buf[r.idx : r.idx+m])
-	}
-	return runes.WidthAll(r.buf[r.idx+m : r.idx])
-}
-
-func (r *RuneBuffer) SetStyle(start, end int, style string) {
-	if end < start {
-		panic("end < start")
-	}
-
-	// goto start
-	move := start - r.idx
-	if move > 0 {
-		r.w.Write([]byte(string(r.buf[r.idx : r.idx+move])))
-	} else {
-		r.w.Write(bytes.Repeat([]byte("\b"), r.calWidth(move)))
-	}
-	r.w.Write([]byte("\033[" + style + "m"))
-	r.w.Write([]byte(string(r.buf[start:end])))
-	r.w.Write([]byte("\033[0m"))
-	// TODO: move back
-}
-
-func (r *RuneBuffer) SetWithIdx(idx int, buf []rune) {
-	r.Refresh(func() {
-		r.buf = buf
-		r.idx = idx
-	})
-}
-
-func (r *RuneBuffer) Set(buf []rune) {
-	r.SetWithIdx(len(buf), buf)
-}
-
-func (r *RuneBuffer) SetPrompt(prompt string) {
-	r.Lock()
-	r.prompt = []rune(prompt)
-	r.Unlock()
-}
-
-func (r *RuneBuffer) cleanOutput(w io.Writer, idxLine int) {
-	buf := bufio.NewWriter(w)
-
-	if r.width == 0 {
-		buf.WriteString(strings.Repeat("\r\b", len(r.buf)+r.promptLen()))
-		buf.Write([]byte("\033[J"))
-	} else {
-		buf.Write([]byte("\033[J")) // just like ^k :)
-		if idxLine == 0 {
-			buf.WriteString("\033[2K")
-			buf.WriteString("\r")
-		} else {
-			for i := 0; i < idxLine; i++ {
-				io.WriteString(buf, "\033[2K\r\033[A")
-			}
-			io.WriteString(buf, "\033[2K\r")
-		}
-	}
-	buf.Flush()
-	return
-}
-
-func (r *RuneBuffer) Clean() {
-	r.Lock()
-	r.clean()
-	r.Unlock()
-}
-
-func (r *RuneBuffer) clean() {
-	r.cleanWithIdxLine(r.idxLine(r.width))
-}
-
-func (r *RuneBuffer) cleanWithIdxLine(idxLine int) {
-	if r.hadClean || !r.interactive {
-		return
-	}
-	r.hadClean = true
-	r.cleanOutput(r.w, idxLine)
-}
diff --git a/vendor/github.com/chzyer/readline/runes.go b/vendor/github.com/chzyer/readline/runes.go
deleted file mode 100644
index bcf483e..0000000
--- a/vendor/github.com/chzyer/readline/runes.go
+++ /dev/null
@@ -1,224 +0,0 @@
-package readline
-
-import (
-	"bytes"
-	"unicode"
-	"unicode/utf8"
-)
-
-var runes = Runes{}
-var TabWidth = 4
-
-type Runes struct{}
-
-func (Runes) EqualRune(a, b rune, fold bool) bool {
-	if a == b {
-		return true
-	}
-	if !fold {
-		return false
-	}
-	if a > b {
-		a, b = b, a
-	}
-	if b < utf8.RuneSelf && 'A' <= a && a <= 'Z' {
-		if b == a+'a'-'A' {
-			return true
-		}
-	}
-	return false
-}
-
-func (r Runes) EqualRuneFold(a, b rune) bool {
-	return r.EqualRune(a, b, true)
-}
-
-func (r Runes) EqualFold(a, b []rune) bool {
-	if len(a) != len(b) {
-		return false
-	}
-	for i := 0; i < len(a); i++ {
-		if r.EqualRuneFold(a[i], b[i]) {
-			continue
-		}
-		return false
-	}
-
-	return true
-}
-
-func (Runes) Equal(a, b []rune) bool {
-	if len(a) != len(b) {
-		return false
-	}
-	for i := 0; i < len(a); i++ {
-		if a[i] != b[i] {
-			return false
-		}
-	}
-	return true
-}
-
-func (rs Runes) IndexAllBckEx(r, sub []rune, fold bool) int {
-	for i := len(r) - len(sub); i >= 0; i-- {
-		found := true
-		for j := 0; j < len(sub); j++ {
-			if !rs.EqualRune(r[i+j], sub[j], fold) {
-				found = false
-				break
-			}
-		}
-		if found {
-			return i
-		}
-	}
-	return -1
-}
-
-// Search in runes from end to front
-func (rs Runes) IndexAllBck(r, sub []rune) int {
-	return rs.IndexAllBckEx(r, sub, false)
-}
-
-// Search in runes from front to end
-func (rs Runes) IndexAll(r, sub []rune) int {
-	return rs.IndexAllEx(r, sub, false)
-}
-
-func (rs Runes) IndexAllEx(r, sub []rune, fold bool) int {
-	for i := 0; i < len(r); i++ {
-		found := true
-		if len(r[i:]) < len(sub) {
-			return -1
-		}
-		for j := 0; j < len(sub); j++ {
-			if !rs.EqualRune(r[i+j], sub[j], fold) {
-				found = false
-				break
-			}
-		}
-		if found {
-			return i
-		}
-	}
-	return -1
-}
-
-func (Runes) Index(r rune, rs []rune) int {
-	for i := 0; i < len(rs); i++ {
-		if rs[i] == r {
-			return i
-		}
-	}
-	return -1
-}
-
-func (Runes) ColorFilter(r []rune) []rune {
-	newr := make([]rune, 0, len(r))
-	for pos := 0; pos < len(r); pos++ {
-		if r[pos] == '\033' && r[pos+1] == '[' {
-			idx := runes.Index('m', r[pos+2:])
-			if idx == -1 {
-				continue
-			}
-			pos += idx + 2
-			continue
-		}
-		newr = append(newr, r[pos])
-	}
-	return newr
-}
-
-var zeroWidth = []*unicode.RangeTable{
-	unicode.Mn,
-	unicode.Me,
-	unicode.Cc,
-	unicode.Cf,
-}
-
-var doubleWidth = []*unicode.RangeTable{
-	unicode.Han,
-	unicode.Hangul,
-	unicode.Hiragana,
-	unicode.Katakana,
-	unicode.So,
-}
-
-func (Runes) Width(r rune) int {
-	if r == '\t' {
-		return TabWidth
-	}
-	if unicode.IsOneOf(zeroWidth, r) {
-		return 0
-	}
-	if unicode.IsOneOf(doubleWidth, r) {
-		return 2
-	}
-	return 1
-}
-
-func (Runes) WidthAll(r []rune) (length int) {
-	for i := 0; i < len(r); i++ {
-		length += runes.Width(r[i])
-	}
-	return
-}
-
-func (Runes) Backspace(r []rune) []byte {
-	return bytes.Repeat([]byte{'\b'}, runes.WidthAll(r))
-}
-
-func (Runes) Copy(r []rune) []rune {
-	n := make([]rune, len(r))
-	copy(n, r)
-	return n
-}
-
-func (Runes) HasPrefixFold(r, prefix []rune) bool {
-	if len(r) < len(prefix) {
-		return false
-	}
-	return runes.EqualFold(r[:len(prefix)], prefix)
-}
-
-func (Runes) HasPrefix(r, prefix []rune) bool {
-	if len(r) < len(prefix) {
-		return false
-	}
-	return runes.Equal(r[:len(prefix)], prefix)
-}
-
-func (Runes) Aggregate(candicate [][]rune) (same []rune, size int) {
-	for i := 0; i < len(candicate[0]); i++ {
-		for j := 0; j < len(candicate)-1; j++ {
-			if i >= len(candicate[j]) || i >= len(candicate[j+1]) {
-				goto aggregate
-			}
-			if candicate[j][i] != candicate[j+1][i] {
-				goto aggregate
-			}
-		}
-		size = i + 1
-	}
-aggregate:
-	if size > 0 {
-		same = runes.Copy(candicate[0][:size])
-		for i := 0; i < len(candicate); i++ {
-			n := runes.Copy(candicate[i])
-			copy(n, n[size:])
-			candicate[i] = n[:len(n)-size]
-		}
-	}
-	return
-}
-
-func (Runes) TrimSpaceLeft(in []rune) []rune {
-	firstIndex := len(in)
-	for i, r := range in {
-		if unicode.IsSpace(r) == false {
-			firstIndex = i
-			break
-		}
-	}
-	return in[firstIndex:]
-}
diff --git a/vendor/github.com/chzyer/readline/runes/runes.go b/vendor/github.com/chzyer/readline/runes/runes.go
deleted file mode 100644
index b069440..0000000
--- a/vendor/github.com/chzyer/readline/runes/runes.go
+++ /dev/null
@@ -1,155 +0,0 @@
-// deprecated.
-// see https://github.com/chzyer/readline/issues/43
-// use github.com/chzyer/readline/runes.go
-package runes
-
-import (
-	"bytes"
-	"unicode"
-)
-
-func Equal(a, b []rune) bool {
-	if len(a) != len(b) {
-		return false
-	}
-	for i := 0; i < len(a); i++ {
-		if a[i] != b[i] {
-			return false
-		}
-	}
-	return true
-}
-
-// Search in runes from end to front
-func IndexAllBck(r, sub []rune) int {
-	for i := len(r) - len(sub); i >= 0; i-- {
-		found := true
-		for j := 0; j < len(sub); j++ {
-			if r[i+j] != sub[j] {
-				found = false
-				break
-			}
-		}
-		if found {
-			return i
-		}
-	}
-	return -1
-}
-
-// Search in runes from front to end
-func IndexAll(r, sub []rune) int {
-	for i := 0; i < len(r); i++ {
-		found := true
-		if len(r[i:]) < len(sub) {
-			return -1
-		}
-		for j := 0; j < len(sub); j++ {
-			if r[i+j] != sub[j] {
-				found = false
-				break
-			}
-		}
-		if found {
-			return i
-		}
-	}
-	return -1
-}
-
-func Index(r rune, rs []rune) int {
-	for i := 0; i < len(rs); i++ {
-		if rs[i] == r {
-			return i
-		}
-	}
-	return -1
-}
-
-func ColorFilter(r []rune) []rune {
-	newr := make([]rune, 0, len(r))
-	for pos := 0; pos < len(r); pos++ {
-		if r[pos] == '\033' && r[pos+1] == '[' {
-			idx := Index('m', r[pos+2:])
-			if idx == -1 {
-				continue
-			}
-			pos += idx + 2
-			continue
-		}
-		newr = append(newr, r[pos])
-	}
-	return newr
-}
-
-var zeroWidth = []*unicode.RangeTable{
-	unicode.Mn,
-	unicode.Me,
-	unicode.Cc,
-	unicode.Cf,
-}
-
-var doubleWidth = []*unicode.RangeTable{
-	unicode.Han,
-	unicode.Hangul,
-	unicode.Hiragana,
-	unicode.Katakana,
-}
-
-func Width(r rune) int {
-	if unicode.IsOneOf(zeroWidth, r) {
-		return 0
-	}
-	if unicode.IsOneOf(doubleWidth, r) {
-		return 2
-	}
-	return 1
-}
-
-func WidthAll(r []rune) (length int) {
-	for i := 0; i < len(r); i++ {
-		length += Width(r[i])
-	}
-	return
-}
-
-func Backspace(r []rune) []byte {
-	return bytes.Repeat([]byte{'\b'}, WidthAll(r))
-}
-
-func Copy(r []rune) []rune {
-	n := make([]rune, len(r))
-	copy(n, r)
-	return n
-}
-
-func HasPrefix(r, prefix []rune) bool {
-	if len(r) < len(prefix) {
-		return false
-	}
-	return Equal(r[:len(prefix)], prefix)
-}
-
-func Aggregate(candicate [][]rune) (same []rune, size int) {
-	for i := 0; i < len(candicate[0]); i++ {
-		for j := 0; j < len(candicate)-1; j++ {
-			if i >= len(candicate[j]) || i >= len(candicate[j+1]) {
-				goto aggregate
-			}
-			if candicate[j][i] != candicate[j+1][i] {
-				goto aggregate
-			}
-		}
-		size = i + 1
-	}
-aggregate:
-	if size > 0 {
-		same = Copy(candicate[0][:size])
-		for i := 0; i < len(candicate); i++ {
-			n := Copy(candicate[i])
-			copy(n, n[size:])
-			candicate[i] = n[:len(n)-size]
-		}
-	}
-	return
-}
diff --git a/vendor/github.com/chzyer/readline/search.go b/vendor/github.com/chzyer/readline/search.go
deleted file mode 100644
index 52e8ff0..0000000
--- a/vendor/github.com/chzyer/readline/search.go
+++ /dev/null
@@ -1,164 +0,0 @@
-package readline
-
-import (
-	"bytes"
-	"container/list"
-	"fmt"
-	"io"
-)
-
-const (
-	S_STATE_FOUND = iota
-	S_STATE_FAILING
-)
-
-const (
-	S_DIR_BCK = iota
-	S_DIR_FWD
-)
-
-type opSearch struct {
-	inMode    bool
-	state     int
-	dir       int
-	source    *list.Element
-	w         io.Writer
-	buf       *RuneBuffer
-	data      []rune
-	history   *opHistory
-	cfg       *Config
-	markStart int
-	markEnd   int
-	width     int
-}
-
-func newOpSearch(w io.Writer, buf *RuneBuffer, history *opHistory, cfg *Config, width int) *opSearch {
-	return &opSearch{
-		w:       w,
-		buf:     buf,
-		cfg:     cfg,
-		history: history,
-		width:   width,
-	}
-}
-
-func (o *opSearch) OnWidthChange(newWidth int) {
-	o.width = newWidth
-}
-
-func (o *opSearch) IsSearchMode() bool {
-	return o.inMode
-}
-
-func (o *opSearch) SearchBackspace() {
-	if len(o.data) > 0 {
-		o.data = o.data[:len(o.data)-1]
-		o.search(true)
-	}
-}
-
-func (o *opSearch) findHistoryBy(isNewSearch bool) (int, *list.Element) {
-	if o.dir == S_DIR_BCK {
-		return o.history.FindBck(isNewSearch, o.data, o.buf.idx)
-	}
-	return o.history.FindFwd(isNewSearch, o.data, o.buf.idx)
-}
-
-func (o *opSearch) search(isChange bool) bool {
-	if len(o.data) == 0 {
-		o.state = S_STATE_FOUND
-		o.SearchRefresh(-1)
-		return true
-	}
-	idx, elem := o.findHistoryBy(isChange)
-	if elem == nil {
-		o.SearchRefresh(-2)
-		return false
-	}
-	o.history.current = elem
-
-	item := o.history.showItem(o.history.current.Value)
-	start, end := 0, 0
-	if o.dir == S_DIR_BCK {
-		start, end = idx, idx+len(o.data)
-	} else {
-		start, end = idx, idx+len(o.data)
-		idx += len(o.data)
-	}
-	o.buf.SetWithIdx(idx, item)
-	o.markStart, o.markEnd = start, end
-	o.SearchRefresh(idx)
-	return true
-}
-
-func (o *opSearch) SearchChar(r rune) {
-	o.data = append(o.data, r)
-	o.search(true)
-}
-
-func (o *opSearch) SearchMode(dir int) bool {
-	if o.width == 0 {
-		return false
-	}
-	alreadyInMode := o.inMode
-	o.inMode = true
-	o.dir = dir
-	o.source = o.history.current
-	if alreadyInMode {
-		o.search(false)
-	} else {
-		o.SearchRefresh(-1)
-	}
-	return true
-}
-
-func (o *opSearch) ExitSearchMode(revert bool) {
-	if revert {
-		o.history.current = o.source
-		o.buf.Set(o.history.showItem(o.history.current.Value))
-	}
-	o.markStart, o.markEnd = 0, 0
-	o.state = S_STATE_FOUND
-	o.inMode = false
-	o.source = nil
-	o.data = nil
-}
-
-func (o *opSearch) SearchRefresh(x int) {
-	if x == -2 {
-		o.state = S_STATE_FAILING
-	} else if x >= 0 {
-		o.state = S_STATE_FOUND
-	}
-	if x < 0 {
-		x = o.buf.idx
-	}
-	x = o.buf.CurrentWidth(x)
-	x += o.buf.PromptLen()
-	x = x % o.width
-
-	if o.markStart > 0 {
-		o.buf.SetStyle(o.markStart, o.markEnd, "4")
-	}
-
-	lineCnt := o.buf.CursorLineCount()
-	buf := bytes.NewBuffer(nil)
-	buf.Write(bytes.Repeat([]byte("\n"), lineCnt))
-	buf.WriteString("\033[J")
-	if o.state == S_STATE_FAILING {
-		buf.WriteString("failing ")
-	}
-	if o.dir == S_DIR_BCK {
-		buf.WriteString("bck")
-	} else if o.dir == S_DIR_FWD {
-		buf.WriteString("fwd")
-	}
-	buf.WriteString("-i-search: ")
-	buf.WriteString(string(o.data))         // keyword
-	buf.WriteString("\033[4m \033[0m")      // _
-	fmt.Fprintf(buf, "\r\033[%dA", lineCnt) // move prev
-	if x > 0 {
-		fmt.Fprintf(buf, "\033[%dC", x) // move forward
-	}
-	o.w.Write(buf.Bytes())
-}
diff --git a/vendor/github.com/chzyer/readline/std.go b/vendor/github.com/chzyer/readline/std.go
deleted file mode 100644
index 61d44b7..0000000
--- a/vendor/github.com/chzyer/readline/std.go
+++ /dev/null
@@ -1,197 +0,0 @@
-package readline
-
-import (
-	"io"
-	"os"
-	"sync"
-	"sync/atomic"
-)
-
-var (
-	Stdin  io.ReadCloser  = os.Stdin
-	Stdout io.WriteCloser = os.Stdout
-	Stderr io.WriteCloser = os.Stderr
-)
-
-var (
-	std     *Instance
-	stdOnce sync.Once
-)
-
-// global instance will not submit history automatic
-func getInstance() *Instance {
-	stdOnce.Do(func() {
-		std, _ = NewEx(&Config{
-			DisableAutoSaveHistory: true,
-		})
-	})
-	return std
-}
-
-// let readline load history from filepath
-// and try to persist history into disk
-// set fp to "" to prevent readline persisting history to disk
-// so the `AddHistory` will return nil error forever.
-func SetHistoryPath(fp string) {
-	ins := getInstance()
-	cfg := ins.Config.Clone()
-	cfg.HistoryFile = fp
-	ins.SetConfig(cfg)
-}
-
-// set auto completer to global instance
-func SetAutoComplete(completer AutoCompleter) {
-	ins := getInstance()
-	cfg := ins.Config.Clone()
-	cfg.AutoComplete = completer
-	ins.SetConfig(cfg)
-}
-
-// add history to global instance manually
-// raise error only if `SetHistoryPath` is set with a non-empty path
-func AddHistory(content string) error {
-	ins := getInstance()
-	return ins.SaveHistory(content)
-}
-
-func Password(prompt string) ([]byte, error) {
-	ins := getInstance()
-	return ins.ReadPassword(prompt)
-}
-
-// readline with global configs
-func Line(prompt string) (string, error) {
-	ins := getInstance()
-	ins.SetPrompt(prompt)
-	return ins.Readline()
-}
-
-type CancelableStdin struct {
-	r      io.Reader
-	mutex  sync.Mutex
-	stop   chan struct{}
-	closed int32
-	notify chan struct{}
-	data   []byte
-	read   int
-	err    error
-}
-
-func NewCancelableStdin(r io.Reader) *CancelableStdin {
-	c := &CancelableStdin{
-		r:      r,
-		notify: make(chan struct{}),
-		stop:   make(chan struct{}),
-	}
-	go c.ioloop()
-	return c
-}
-
-func (c *CancelableStdin) ioloop() {
-loop:
-	for {
-		select {
-		case <-c.notify:
-			c.read, c.err = c.r.Read(c.data)
-			select {
-			case c.notify <- struct{}{}:
-			case <-c.stop:
-				break loop
-			}
-		case <-c.stop:
-			break loop
-		}
-	}
-}
-
-func (c *CancelableStdin) Read(b []byte) (n int, err error) {
-	c.mutex.Lock()
-	defer c.mutex.Unlock()
-	if atomic.LoadInt32(&c.closed) == 1 {
-		return 0, io.EOF
-	}
-
-	c.data = b
-	select {
-	case c.notify <- struct{}{}:
-	case <-c.stop:
-		return 0, io.EOF
-	}
-	select {
-	case <-c.notify:
-		return c.read, c.err
-	case <-c.stop:
-		return 0, io.EOF
-	}
-}
-
-func (c *CancelableStdin) Close() error {
-	if atomic.CompareAndSwapInt32(&c.closed, 0, 1) {
-		close(c.stop)
-	}
-	return nil
-}
-
-// FillableStdin is a stdin reader which can prepend some data before
-// reading into the real stdin
-type FillableStdin struct {
-	sync.Mutex
-	stdin       io.Reader
-	stdinBuffer io.ReadCloser
-	buf         []byte
-	bufErr      error
-}
-
-// NewFillableStdin gives you FillableStdin
-func NewFillableStdin(stdin io.Reader) (io.ReadCloser, io.Writer) {
-	r, w := io.Pipe()
-	s := &FillableStdin{
-		stdinBuffer: r,
-		stdin:       stdin,
-	}
-	s.ioloop()
-	return s, w
-}
-
-func (s *FillableStdin) ioloop() {
-	go func() {
-		for {
-			bufR := make([]byte, 100)
-			var n int
-			n, s.bufErr = s.stdinBuffer.Read(bufR)
-			if s.bufErr != nil {
-				if s.bufErr == io.ErrClosedPipe {
-					break
-				}
-			}
-			s.Lock()
-			s.buf = append(s.buf, bufR[:n]...)
-			s.Unlock()
-		}
-	}()
-}
-
-// Read will read from the local buffer and if no data, read from stdin
-func (s *FillableStdin) Read(p []byte) (n int, err error) {
-	s.Lock()
-	i := len(s.buf)
-	if len(p) < i {
-		i = len(p)
-	}
-	if i > 0 {
-		n := copy(p, s.buf)
-		s.buf = s.buf[:0]
-		cerr := s.bufErr
-		s.bufErr = nil
-		s.Unlock()
-		return n, cerr
-	}
-	s.Unlock()
-	n, err = s.stdin.Read(p)
-	return n, err
-}
-
-func (s *FillableStdin) Close() error {
-	s.stdinBuffer.Close()
-	return nil
-}
diff --git a/vendor/github.com/chzyer/readline/std_windows.go b/vendor/github.com/chzyer/readline/std_windows.go
deleted file mode 100644
index b10f91b..0000000
--- a/vendor/github.com/chzyer/readline/std_windows.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// +build windows
-
-package readline
-
-func init() {
-	Stdin = NewRawReader()
-	Stdout = NewANSIWriter(Stdout)
-	Stderr = NewANSIWriter(Stderr)
-}
diff --git a/vendor/github.com/chzyer/readline/term.go b/vendor/github.com/chzyer/readline/term.go
deleted file mode 100644
index 133993c..0000000
--- a/vendor/github.com/chzyer/readline/term.go
+++ /dev/null
@@ -1,123 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux,!appengine netbsd openbsd solaris
-
-// Package terminal provides support functions for dealing with terminals, as
-// commonly found on UNIX systems.
-//
-// Putting a terminal into raw mode is the most common requirement:
-//
-// 	oldState, err := terminal.MakeRaw(0)
-// 	if err != nil {
-// 	        panic(err)
-// 	}
-// 	defer terminal.Restore(0, oldState)
-package readline
-
-import (
-	"io"
-	"syscall"
-)
-
-// State contains the state of a terminal.
-type State struct {
-	termios Termios
-}
-
-// IsTerminal returns true if the given file descriptor is a terminal.
-func IsTerminal(fd int) bool {
-	_, err := getTermios(fd)
-	return err == nil
-}
-
-// MakeRaw put the terminal connected to the given file descriptor into raw
-// mode and returns the previous state of the terminal so that it can be
-// restored.
-func MakeRaw(fd int) (*State, error) {
-	var oldState State
-
-	if termios, err := getTermios(fd); err != nil {
-		return nil, err
-	} else {
-		oldState.termios = *termios
-	}
-
-	newState := oldState.termios
-	// This attempts to replicate the behaviour documented for cfmakeraw in
-	// the termios(3) manpage.
-	newState.Iflag &^= syscall.IGNBRK | syscall.BRKINT | syscall.PARMRK | syscall.ISTRIP | syscall.INLCR | syscall.IGNCR | syscall.ICRNL | syscall.IXON
-	// newState.Oflag &^= syscall.OPOST
-	newState.Lflag &^= syscall.ECHO | syscall.ECHONL | syscall.ICANON | syscall.ISIG | syscall.IEXTEN
-	newState.Cflag &^= syscall.CSIZE | syscall.PARENB
-	newState.Cflag |= syscall.CS8
-
-	newState.Cc[syscall.VMIN] = 1
-	newState.Cc[syscall.VTIME] = 0
-
-	return &oldState, setTermios(fd, &newState)
-}
-
-// GetState returns the current state of a terminal which may be useful to
-// restore the terminal after a signal.
-func GetState(fd int) (*State, error) {
-	termios, err := getTermios(fd)
-	if err != nil {
-		return nil, err
-	}
-
-	return &State{termios: *termios}, nil
-}
-
-// Restore restores the terminal connected to the given file descriptor to a
-// previous state.
-func restoreTerm(fd int, state *State) error {
-	return setTermios(fd, &state.termios)
-}
-
-// ReadPassword reads a line of input from a terminal without local echo.  This
-// is commonly used for inputting passwords and other sensitive data. The slice
-// returned does not include the \n.
-func ReadPassword(fd int) ([]byte, error) {
-	oldState, err := getTermios(fd)
-	if err != nil {
-		return nil, err
-	}
-
-	newState := oldState
-	newState.Lflag &^= syscall.ECHO
-	newState.Lflag |= syscall.ICANON | syscall.ISIG
-	newState.Iflag |= syscall.ICRNL
-	if err := setTermios(fd, newState); err != nil {
-		return nil, err
-	}
-
-	defer func() {
-		setTermios(fd, oldState)
-	}()
-
-	var buf [16]byte
-	var ret []byte
-	for {
-		n, err := syscall.Read(fd, buf[:])
-		if err != nil {
-			return nil, err
-		}
-		if n == 0 {
-			if len(ret) == 0 {
-				return nil, io.EOF
-			}
-			break
-		}
-		if buf[n-1] == '\n' {
-			n--
-		}
-		ret = append(ret, buf[:n]...)
-		if n < len(buf) {
-			break
-		}
-	}
-
-	return ret, nil
-}
diff --git a/vendor/github.com/chzyer/readline/term_bsd.go b/vendor/github.com/chzyer/readline/term_bsd.go
deleted file mode 100644
index 68b56ea..0000000
--- a/vendor/github.com/chzyer/readline/term_bsd.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd netbsd openbsd
-
-package readline
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-func getTermios(fd int) (*Termios, error) {
-	termios := new(Termios)
-	_, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), syscall.TIOCGETA, uintptr(unsafe.Pointer(termios)), 0, 0, 0)
-	if err != 0 {
-		return nil, err
-	}
-	return termios, nil
-}
-
-func setTermios(fd int, termios *Termios) error {
-	_, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), syscall.TIOCSETA, uintptr(unsafe.Pointer(termios)), 0, 0, 0)
-	if err != 0 {
-		return err
-	}
-	return nil
-}
diff --git a/vendor/github.com/chzyer/readline/term_linux.go b/vendor/github.com/chzyer/readline/term_linux.go
deleted file mode 100644
index e3392b4..0000000
--- a/vendor/github.com/chzyer/readline/term_linux.go
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package readline
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-// These constants are declared here, rather than importing
-// them from the syscall package as some syscall packages, even
-// on linux, for example gccgo, do not declare them.
-const ioctlReadTermios = 0x5401  // syscall.TCGETS
-const ioctlWriteTermios = 0x5402 // syscall.TCSETS
-
-func getTermios(fd int) (*Termios, error) {
-	termios := new(Termios)
-	_, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlReadTermios, uintptr(unsafe.Pointer(termios)), 0, 0, 0)
-	if err != 0 {
-		return nil, err
-	}
-	return termios, nil
-}
-
-func setTermios(fd int, termios *Termios) error {
-	_, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlWriteTermios, uintptr(unsafe.Pointer(termios)), 0, 0, 0)
-	if err != 0 {
-		return err
-	}
-	return nil
-}
diff --git a/vendor/github.com/chzyer/readline/term_solaris.go b/vendor/github.com/chzyer/readline/term_solaris.go
deleted file mode 100644
index 4c27273..0000000
--- a/vendor/github.com/chzyer/readline/term_solaris.go
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build solaris
-
-package readline
-
-import "golang.org/x/sys/unix"
-
-// GetSize returns the dimensions of the given terminal.
-func GetSize(fd int) (int, int, error) {
-	ws, err := unix.IoctlGetWinsize(fd, unix.TIOCGWINSZ)
-	if err != nil {
-		return 0, 0, err
-	}
-	return int(ws.Col), int(ws.Row), nil
-}
-
-type Termios unix.Termios
-
-func getTermios(fd int) (*Termios, error) {
-	termios, err := unix.IoctlGetTermios(fd, unix.TCGETS)
-	if err != nil {
-		return nil, err
-	}
-	return (*Termios)(termios), nil
-}
-
-func setTermios(fd int, termios *Termios) error {
-	return unix.IoctlSetTermios(fd, unix.TCSETSF, (*unix.Termios)(termios))
-}
diff --git a/vendor/github.com/chzyer/readline/term_unix.go b/vendor/github.com/chzyer/readline/term_unix.go
deleted file mode 100644
index d3ea242..0000000
--- a/vendor/github.com/chzyer/readline/term_unix.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux,!appengine netbsd openbsd
-
-package readline
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-type Termios syscall.Termios
-
-// GetSize returns the dimensions of the given terminal.
-func GetSize(fd int) (int, int, error) {
-	var dimensions [4]uint16
-	_, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), uintptr(syscall.TIOCGWINSZ), uintptr(unsafe.Pointer(&dimensions)), 0, 0, 0)
-	if err != 0 {
-		return 0, 0, err
-	}
-	return int(dimensions[1]), int(dimensions[0]), nil
-}
diff --git a/vendor/github.com/chzyer/readline/term_windows.go b/vendor/github.com/chzyer/readline/term_windows.go
deleted file mode 100644
index 1290e00..0000000
--- a/vendor/github.com/chzyer/readline/term_windows.go
+++ /dev/null
@@ -1,171 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build windows
-
-// Package terminal provides support functions for dealing with terminals, as
-// commonly found on UNIX systems.
-//
-// Putting a terminal into raw mode is the most common requirement:
-//
-// 	oldState, err := terminal.MakeRaw(0)
-// 	if err != nil {
-// 	        panic(err)
-// 	}
-// 	defer terminal.Restore(0, oldState)
-package readline
-
-import (
-	"io"
-	"syscall"
-	"unsafe"
-)
-
-const (
-	enableLineInput       = 2
-	enableEchoInput       = 4
-	enableProcessedInput  = 1
-	enableWindowInput     = 8
-	enableMouseInput      = 16
-	enableInsertMode      = 32
-	enableQuickEditMode   = 64
-	enableExtendedFlags   = 128
-	enableAutoPosition    = 256
-	enableProcessedOutput = 1
-	enableWrapAtEolOutput = 2
-)
-
-var kernel32 = syscall.NewLazyDLL("kernel32.dll")
-
-var (
-	procGetConsoleMode             = kernel32.NewProc("GetConsoleMode")
-	procSetConsoleMode             = kernel32.NewProc("SetConsoleMode")
-	procGetConsoleScreenBufferInfo = kernel32.NewProc("GetConsoleScreenBufferInfo")
-)
-
-type (
-	coord struct {
-		x short
-		y short
-	}
-	smallRect struct {
-		left   short
-		top    short
-		right  short
-		bottom short
-	}
-	consoleScreenBufferInfo struct {
-		size              coord
-		cursorPosition    coord
-		attributes        word
-		window            smallRect
-		maximumWindowSize coord
-	}
-)
-
-type State struct {
-	mode uint32
-}
-
-// IsTerminal returns true if the given file descriptor is a terminal.
-func IsTerminal(fd int) bool {
-	var st uint32
-	r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&st)), 0)
-	return r != 0 && e == 0
-}
-
-// MakeRaw put the terminal connected to the given file descriptor into raw
-// mode and returns the previous state of the terminal so that it can be
-// restored.
-func MakeRaw(fd int) (*State, error) {
-	var st uint32
-	_, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&st)), 0)
-	if e != 0 {
-		return nil, error(e)
-	}
-	raw := st &^ (enableEchoInput | enableProcessedInput | enableLineInput | enableProcessedOutput)
-	_, _, e = syscall.Syscall(procSetConsoleMode.Addr(), 2, uintptr(fd), uintptr(raw), 0)
-	if e != 0 {
-		return nil, error(e)
-	}
-	return &State{st}, nil
-}
-
-// GetState returns the current state of a terminal which may be useful to
-// restore the terminal after a signal.
-func GetState(fd int) (*State, error) {
-	var st uint32
-	_, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&st)), 0)
-	if e != 0 {
-		return nil, error(e)
-	}
-	return &State{st}, nil
-}
-
-// Restore restores the terminal connected to the given file descriptor to a
-// previous state.
-func restoreTerm(fd int, state *State) error {
-	_, _, err := syscall.Syscall(procSetConsoleMode.Addr(), 2, uintptr(fd), uintptr(state.mode), 0)
-	return err
-}
-
-// GetSize returns the dimensions of the given terminal.
-func GetSize(fd int) (width, height int, err error) {
-	var info consoleScreenBufferInfo
-	_, _, e := syscall.Syscall(procGetConsoleScreenBufferInfo.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&info)), 0)
-	if e != 0 {
-		return 0, 0, error(e)
-	}
-	return int(info.size.x), int(info.size.y), nil
-}
-
-// ReadPassword reads a line of input from a terminal without local echo.  This
-// is commonly used for inputting passwords and other sensitive data. The slice
-// returned does not include the \n.
-func ReadPassword(fd int) ([]byte, error) {
-	var st uint32
-	_, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&st)), 0)
-	if e != 0 {
-		return nil, error(e)
-	}
-	old := st
-
-	st &^= (enableEchoInput)
-	st |= (enableProcessedInput | enableLineInput | enableProcessedOutput)
-	_, _, e = syscall.Syscall(procSetConsoleMode.Addr(), 2, uintptr(fd), uintptr(st), 0)
-	if e != 0 {
-		return nil, error(e)
-	}
-
-	defer func() {
-		syscall.Syscall(procSetConsoleMode.Addr(), 2, uintptr(fd), uintptr(old), 0)
-	}()
-
-	var buf [16]byte
-	var ret []byte
-	for {
-		n, err := syscall.Read(syscall.Handle(fd), buf[:])
-		if err != nil {
-			return nil, err
-		}
-		if n == 0 {
-			if len(ret) == 0 {
-				return nil, io.EOF
-			}
-			break
-		}
-		if buf[n-1] == '\n' {
-			n--
-		}
-		if n > 0 && buf[n-1] == '\r' {
-			n--
-		}
-		ret = append(ret, buf[:n]...)
-		if n < len(buf) {
-			break
-		}
-	}
-
-	return ret, nil
-}
diff --git a/vendor/github.com/chzyer/readline/terminal.go b/vendor/github.com/chzyer/readline/terminal.go
deleted file mode 100644
index 1078631..0000000
--- a/vendor/github.com/chzyer/readline/terminal.go
+++ /dev/null
@@ -1,238 +0,0 @@
-package readline
-
-import (
-	"bufio"
-	"fmt"
-	"io"
-	"strings"
-	"sync"
-	"sync/atomic"
-)
-
-type Terminal struct {
-	m         sync.Mutex
-	cfg       *Config
-	outchan   chan rune
-	closed    int32
-	stopChan  chan struct{}
-	kickChan  chan struct{}
-	wg        sync.WaitGroup
-	isReading int32
-	sleeping  int32
-
-	sizeChan chan string
-}
-
-func NewTerminal(cfg *Config) (*Terminal, error) {
-	if err := cfg.Init(); err != nil {
-		return nil, err
-	}
-	t := &Terminal{
-		cfg:      cfg,
-		kickChan: make(chan struct{}, 1),
-		outchan:  make(chan rune),
-		stopChan: make(chan struct{}, 1),
-		sizeChan: make(chan string, 1),
-	}
-
-	go t.ioloop()
-	return t, nil
-}
-
-// SleepToResume will sleep myself, and return only if I'm resumed.
-func (t *Terminal) SleepToResume() {
-	if !atomic.CompareAndSwapInt32(&t.sleeping, 0, 1) {
-		return
-	}
-	defer atomic.StoreInt32(&t.sleeping, 0)
-
-	t.ExitRawMode()
-	ch := WaitForResume()
-	SuspendMe()
-	<-ch
-	t.EnterRawMode()
-}
-
-func (t *Terminal) EnterRawMode() (err error) {
-	return t.cfg.FuncMakeRaw()
-}
-
-func (t *Terminal) ExitRawMode() (err error) {
-	return t.cfg.FuncExitRaw()
-}
-
-func (t *Terminal) Write(b []byte) (int, error) {
-	return t.cfg.Stdout.Write(b)
-}
-
-// WriteStdin prefill the next Stdin fetch
-// Next time you call ReadLine() this value will be writen before the user input
-func (t *Terminal) WriteStdin(b []byte) (int, error) {
-	return t.cfg.StdinWriter.Write(b)
-}
-
-type termSize struct {
-	left int
-	top  int
-}
-
-func (t *Terminal) GetOffset(f func(offset string)) {
-	go func() {
-		f(<-t.sizeChan)
-	}()
-	t.Write([]byte("\033[6n"))
-}
-
-func (t *Terminal) Print(s string) {
-	fmt.Fprintf(t.cfg.Stdout, "%s", s)
-}
-
-func (t *Terminal) PrintRune(r rune) {
-	fmt.Fprintf(t.cfg.Stdout, "%c", r)
-}
-
-func (t *Terminal) Readline() *Operation {
-	return NewOperation(t, t.cfg)
-}
-
-// return rune(0) if meet EOF
-func (t *Terminal) ReadRune() rune {
-	ch, ok := <-t.outchan
-	if !ok {
-		return rune(0)
-	}
-	return ch
-}
-
-func (t *Terminal) IsReading() bool {
-	return atomic.LoadInt32(&t.isReading) == 1
-}
-
-func (t *Terminal) KickRead() {
-	select {
-	case t.kickChan <- struct{}{}:
-	default:
-	}
-}
-
-func (t *Terminal) ioloop() {
-	t.wg.Add(1)
-	defer func() {
-		t.wg.Done()
-		close(t.outchan)
-	}()
-
-	var (
-		isEscape       bool
-		isEscapeEx     bool
-		expectNextChar bool
-	)
-
-	buf := bufio.NewReader(t.getStdin())
-	for {
-		if !expectNextChar {
-			atomic.StoreInt32(&t.isReading, 0)
-			select {
-			case <-t.kickChan:
-				atomic.StoreInt32(&t.isReading, 1)
-			case <-t.stopChan:
-				return
-			}
-		}
-		expectNextChar = false
-		r, _, err := buf.ReadRune()
-		if err != nil {
-			if strings.Contains(err.Error(), "interrupted system call") {
-				expectNextChar = true
-				continue
-			}
-			break
-		}
-
-		if isEscape {
-			isEscape = false
-			if r == CharEscapeEx {
-				expectNextChar = true
-				isEscapeEx = true
-				continue
-			}
-			r = escapeKey(r, buf)
-		} else if isEscapeEx {
-			isEscapeEx = false
-			if key := readEscKey(r, buf); key != nil {
-				r = escapeExKey(key)
-				// offset
-				if key.typ == 'R' {
-					if _, _, ok := key.Get2(); ok {
-						select {
-						case t.sizeChan <- key.attr:
-						default:
-						}
-					}
-					expectNextChar = true
-					continue
-				}
-			}
-			if r == 0 {
-				expectNextChar = true
-				continue
-			}
-		}
-
-		expectNextChar = true
-		switch r {
-		case CharEsc:
-			if t.cfg.VimMode {
-				t.outchan <- r
-				break
-			}
-			isEscape = true
-		case CharInterrupt, CharEnter, CharCtrlJ, CharDelete:
-			expectNextChar = false
-			fallthrough
-		default:
-			t.outchan <- r
-		}
-	}
-
-}
-
-func (t *Terminal) Bell() {
-	fmt.Fprintf(t, "%c", CharBell)
-}
-
-func (t *Terminal) Close() error {
-	if atomic.SwapInt32(&t.closed, 1) != 0 {
-		return nil
-	}
-	if closer, ok := t.cfg.Stdin.(io.Closer); ok {
-		closer.Close()
-	}
-	close(t.stopChan)
-	t.wg.Wait()
-	return t.ExitRawMode()
-}
-
-func (t *Terminal) GetConfig() *Config {
-	t.m.Lock()
-	cfg := *t.cfg
-	t.m.Unlock()
-	return &cfg
-}
-
-func (t *Terminal) getStdin() io.Reader {
-	t.m.Lock()
-	r := t.cfg.Stdin
-	t.m.Unlock()
-	return r
-}
-
-func (t *Terminal) SetConfig(c *Config) error {
-	if err := c.Init(); err != nil {
-		return err
-	}
-	t.m.Lock()
-	t.cfg = c
-	t.m.Unlock()
-	return nil
-}
diff --git a/vendor/github.com/chzyer/readline/utils.go b/vendor/github.com/chzyer/readline/utils.go
deleted file mode 100644
index af4e005..0000000
--- a/vendor/github.com/chzyer/readline/utils.go
+++ /dev/null
@@ -1,277 +0,0 @@
-package readline
-
-import (
-	"bufio"
-	"bytes"
-	"container/list"
-	"fmt"
-	"os"
-	"strconv"
-	"strings"
-	"sync"
-	"time"
-	"unicode"
-)
-
-var (
-	isWindows = false
-)
-
-const (
-	CharLineStart = 1
-	CharBackward  = 2
-	CharInterrupt = 3
-	CharDelete    = 4
-	CharLineEnd   = 5
-	CharForward   = 6
-	CharBell      = 7
-	CharCtrlH     = 8
-	CharTab       = 9
-	CharCtrlJ     = 10
-	CharKill      = 11
-	CharCtrlL     = 12
-	CharEnter     = 13
-	CharNext      = 14
-	CharPrev      = 16
-	CharBckSearch = 18
-	CharFwdSearch = 19
-	CharTranspose = 20
-	CharCtrlU     = 21
-	CharCtrlW     = 23
-	CharCtrlY     = 25
-	CharCtrlZ     = 26
-	CharEsc       = 27
-	CharEscapeEx  = 91
-	CharBackspace = 127
-)
-
-const (
-	MetaBackward rune = -iota - 1
-	MetaForward
-	MetaDelete
-	MetaBackspace
-	MetaTranspose
-)
-
-// WaitForResume need to call before current process got suspend.
-// It will run a ticker until a long duration is occurs,
-// which means this process is resumed.
-func WaitForResume() chan struct{} {
-	ch := make(chan struct{})
-	var wg sync.WaitGroup
-	wg.Add(1)
-	go func() {
-		ticker := time.NewTicker(10 * time.Millisecond)
-		t := time.Now()
-		wg.Done()
-		for {
-			now := <-ticker.C
-			if now.Sub(t) > 100*time.Millisecond {
-				break
-			}
-			t = now
-		}
-		ticker.Stop()
-		ch <- struct{}{}
-	}()
-	wg.Wait()
-	return ch
-}
-
-func Restore(fd int, state *State) error {
-	err := restoreTerm(fd, state)
-	if err != nil {
-		// errno 0 means everything is ok :)
-		if err.Error() == "errno 0" {
-			return nil
-		} else {
-			return err
-		}
-	}
-	return nil
-}
-
-func IsPrintable(key rune) bool {
-	isInSurrogateArea := key >= 0xd800 && key <= 0xdbff
-	return key >= 32 && !isInSurrogateArea
-}
-
-// translate Esc[X
-func escapeExKey(key *escapeKeyPair) rune {
-	var r rune
-	switch key.typ {
-	case 'D':
-		r = CharBackward
-	case 'C':
-		r = CharForward
-	case 'A':
-		r = CharPrev
-	case 'B':
-		r = CharNext
-	case 'H':
-		r = CharLineStart
-	case 'F':
-		r = CharLineEnd
-	case '~':
-		if key.attr == "3" {
-			r = CharDelete
-		}
-	default:
-	}
-	return r
-}
-
-type escapeKeyPair struct {
-	attr string
-	typ  rune
-}
-
-func (e *escapeKeyPair) Get2() (int, int, bool) {
-	sp := strings.Split(e.attr, ";")
-	if len(sp) < 2 {
-		return -1, -1, false
-	}
-	s1, err := strconv.Atoi(sp[0])
-	if err != nil {
-		return -1, -1, false
-	}
-	s2, err := strconv.Atoi(sp[1])
-	if err != nil {
-		return -1, -1, false
-	}
-	return s1, s2, true
-}
-
-func readEscKey(r rune, reader *bufio.Reader) *escapeKeyPair {
-	p := escapeKeyPair{}
-	buf := bytes.NewBuffer(nil)
-	for {
-		if r == ';' {
-		} else if unicode.IsNumber(r) {
-		} else {
-			p.typ = r
-			break
-		}
-		buf.WriteRune(r)
-		r, _, _ = reader.ReadRune()
-	}
-	p.attr = buf.String()
-	return &p
-}
-
-// translate EscX to Meta+X
-func escapeKey(r rune, reader *bufio.Reader) rune {
-	switch r {
-	case 'b':
-		r = MetaBackward
-	case 'f':
-		r = MetaForward
-	case 'd':
-		r = MetaDelete
-	case CharTranspose:
-		r = MetaTranspose
-	case CharBackspace:
-		r = MetaBackspace
-	case 'O':
-		d, _, _ := reader.ReadRune()
-		switch d {
-		case 'H':
-			r = CharLineStart
-		case 'F':
-			r = CharLineEnd
-		default:
-			reader.UnreadRune()
-		}
-	case CharEsc:
-
-	}
-	return r
-}
-
-func SplitByLine(start, screenWidth int, rs []rune) []string {
-	var ret []string
-	buf := bytes.NewBuffer(nil)
-	currentWidth := start
-	for _, r := range rs {
-		w := runes.Width(r)
-		currentWidth += w
-		buf.WriteRune(r)
-		if currentWidth >= screenWidth {
-			ret = append(ret, buf.String())
-			buf.Reset()
-			currentWidth = 0
-		}
-	}
-	ret = append(ret, buf.String())
-	return ret
-}
-
-// calculate how many lines for N character
-func LineCount(screenWidth, w int) int {
-	r := w / screenWidth
-	if w%screenWidth != 0 {
-		r++
-	}
-	return r
-}
-
-func IsWordBreak(i rune) bool {
-	switch {
-	case i >= 'a' && i <= 'z':
-	case i >= 'A' && i <= 'Z':
-	case i >= '0' && i <= '9':
-	default:
-		return true
-	}
-	return false
-}
-
-func GetInt(s []string, def int) int {
-	if len(s) == 0 {
-		return def
-	}
-	c, err := strconv.Atoi(s[0])
-	if err != nil {
-		return def
-	}
-	return c
-}
-
-type RawMode struct {
-	state *State
-}
-
-func (r *RawMode) Enter() (err error) {
-	r.state, err = MakeRaw(GetStdin())
-	return err
-}
-
-func (r *RawMode) Exit() error {
-	if r.state == nil {
-		return nil
-	}
-	return Restore(GetStdin(), r.state)
-}
-
-// -----------------------------------------------------------------------------
-
-func sleep(n int) {
-	Debug(n)
-	time.Sleep(2000 * time.Millisecond)
-}
-
-// print a linked list to Debug()
-func debugList(l *list.List) {
-	idx := 0
-	for e := l.Front(); e != nil; e = e.Next() {
-		Debug(idx, fmt.Sprintf("%+v", e.Value))
-		idx++
-	}
-}
-
-// append log info to another file
-func Debug(o ...interface{}) {
-	f, _ := os.OpenFile("debug.tmp", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
-	fmt.Fprintln(f, o...)
-	f.Close()
-}
diff --git a/vendor/github.com/chzyer/readline/utils_unix.go b/vendor/github.com/chzyer/readline/utils_unix.go
deleted file mode 100644
index f88dac9..0000000
--- a/vendor/github.com/chzyer/readline/utils_unix.go
+++ /dev/null
@@ -1,83 +0,0 @@
-// +build darwin dragonfly freebsd linux,!appengine netbsd openbsd solaris
-
-package readline
-
-import (
-	"io"
-	"os"
-	"os/signal"
-	"sync"
-	"syscall"
-)
-
-type winsize struct {
-	Row    uint16
-	Col    uint16
-	Xpixel uint16
-	Ypixel uint16
-}
-
-// SuspendMe use to send suspend signal to myself, when we in the raw mode.
-// For OSX it need to send to parent's pid
-// For Linux it need to send to myself
-func SuspendMe() {
-	p, _ := os.FindProcess(os.Getppid())
-	p.Signal(syscall.SIGTSTP)
-	p, _ = os.FindProcess(os.Getpid())
-	p.Signal(syscall.SIGTSTP)
-}
-
-// get width of the terminal
-func getWidth(stdoutFd int) int {
-	cols, _, err := GetSize(stdoutFd)
-	if err != nil {
-		return -1
-	}
-	return cols
-}
-
-func GetScreenWidth() int {
-	w := getWidth(syscall.Stdout)
-	if w < 0 {
-		w = getWidth(syscall.Stderr)
-	}
-	return w
-}
-
-// ClearScreen clears the console screen
-func ClearScreen(w io.Writer) (int, error) {
-	return w.Write([]byte("\033[H"))
-}
-
-func DefaultIsTerminal() bool {
-	return IsTerminal(syscall.Stdin) && (IsTerminal(syscall.Stdout) || IsTerminal(syscall.Stderr))
-}
-
-func GetStdin() int {
-	return syscall.Stdin
-}
-
-// -----------------------------------------------------------------------------
-
-var (
-	widthChange         sync.Once
-	widthChangeCallback func()
-)
-
-func DefaultOnWidthChanged(f func()) {
-	widthChangeCallback = f
-	widthChange.Do(func() {
-		ch := make(chan os.Signal, 1)
-		signal.Notify(ch, syscall.SIGWINCH)
-
-		go func() {
-			for {
-				_, ok := <-ch
-				if !ok {
-					break
-				}
-				widthChangeCallback()
-			}
-		}()
-	})
-}
diff --git a/vendor/github.com/chzyer/readline/utils_windows.go b/vendor/github.com/chzyer/readline/utils_windows.go
deleted file mode 100644
index 5bfa55d..0000000
--- a/vendor/github.com/chzyer/readline/utils_windows.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// +build windows
-
-package readline
-
-import (
-	"io"
-	"syscall"
-)
-
-func SuspendMe() {
-}
-
-func GetStdin() int {
-	return int(syscall.Stdin)
-}
-
-func init() {
-	isWindows = true
-}
-
-// get width of the terminal
-func GetScreenWidth() int {
-	info, _ := GetConsoleScreenBufferInfo()
-	if info == nil {
-		return -1
... 191583 lines suppressed ...


[cloudstack-cloudmonkey] 03/04: Makefile: use -mod=vendor to build using vendor

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack-cloudmonkey.git

commit f0c7b95e08a75245a0641a70725423ff5283609c
Author: Rohit Yadav <ro...@apache.org>
AuthorDate: Sun Oct 21 00:20:35 2018 +0530

    Makefile: use -mod=vendor to build using vendor
---
 Makefile | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index ff2af4e..7bb027e 100644
--- a/Makefile
+++ b/Makefile
@@ -35,7 +35,7 @@ M = $(shell printf "\033[34;1m▶\033[0m ")
 
 .PHONY: all
 all: fmt ; $(info $(M) Building executable…) @ ## Build program binary
-	$Q $(GO) build \
+	$Q $(GO) build -mod=vendor \
 		-tags release \
 		-ldflags '-s -w -X $(PACKAGE)/cmd.Version=$(VERSION) -X $(PACKAGE)/cmd.BuildDate=$(DATE)' \
 		-o bin/$(PACKAGE) cmk.go
@@ -45,15 +45,15 @@ run: all
 	./bin/cmk
 
 debug:
-	$(GO) build -gcflags='-N -l' -o cmk &&  dlv --listen=:2345 --headless=true --api-version=2 exec ./cmk
+	$(GO) build -mod=vendor -gcflags='-N -l' -o cmk &&  dlv --listen=:2345 --headless=true --api-version=2 exec ./cmk
 
 dist: all
 	rm -fr dist
 	mkdir -p dist
-	GOOS=linux   GOARCH=amd64 $(GO) build -ldflags='-s -w' -o dist/cmk.linux.amd64 cmk.go
-	GOOS=linux   GOARCH=arm64 $(GO) build -ldflags='-s -w' -o dist/cmk.linux.arm64 cmk.go
-	GOOS=windows GOARCH=amd64 $(GO) build -ldflags='-s -w' -o dist/cmk.exe cmk.go
-	GOOS=darwin  GOARCH=amd64 $(GO) build -ldflags='-s -w' -o dist/cmk.darwin.amd64 cmk.go
+	GOOS=linux   GOARCH=amd64 $(GO) build -mod=vendor -ldflags='-s -w' -o dist/cmk.linux.amd64 cmk.go
+	GOOS=linux   GOARCH=arm64 $(GO) build -mod=vendor -ldflags='-s -w' -o dist/cmk.linux.arm64 cmk.go
+	GOOS=windows GOARCH=amd64 $(GO) build -mod=vendor -ldflags='-s -w' -o dist/cmk.exe cmk.go
+	GOOS=darwin  GOARCH=amd64 $(GO) build -mod=vendor -ldflags='-s -w' -o dist/cmk.darwin.amd64 cmk.go
 
 # Tools
 
@@ -123,7 +123,7 @@ lint: vendor | $(BASE) $(GOLINT) ; $(info $(M) Running golint…) @ ## Run golin
 
 .PHONY: fmt
 fmt: ; $(info $(M) Running gofmt…) @ ## Run gofmt on all source files
-	@ret=0 && for d in $$($(GO) list -f '{{.Dir}}' ./... | grep -v /vendor/); do \
+	@ret=0 && for d in $$($(GO) list -mod=vendor -f '{{.Dir}}' ./... | grep -v /vendor/); do \
 		$(GOFMT) -l -w $$d/*.go || ret=$$? ; \
 	 done ; exit $$ret
 


[cloudstack-cloudmonkey] 02/04: cmk: disable search bar by default on tab-tab completion

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack-cloudmonkey.git

commit dbf748fc78e5a8ec5e56b63d542075dcb92f4f81
Author: Rohit Yadav <ro...@apache.org>
AuthorDate: Sat Oct 20 09:55:05 2018 +0530

    cmk: disable search bar by default on tab-tab completion
    
    Signed-off-by: Rohit Yadav <ro...@apache.org>
---
 Makefile        | 2 +-
 cli/selector.go | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index f351f98..ff2af4e 100644
--- a/Makefile
+++ b/Makefile
@@ -131,7 +131,7 @@ fmt: ; $(info $(M) Running gofmt…) @ ## Run gofmt on all source files
 
 .PHONY: clean
 clean: ; $(info $(M) Cleaning…)	@
-	@rm -rf bin dist
+	@rm -rf bin dist cloudstack-cloudmonkey
 	@rm -rf test/tests.* test/coverage.*
 
 .PHONY: help
diff --git a/cli/selector.go b/cli/selector.go
index 19933f9..d40caf7 100644
--- a/cli/selector.go
+++ b/cli/selector.go
@@ -84,7 +84,7 @@ func showSelector(options []selectOption) selectOption {
 		Templates:         templates,
 		Size:              5,
 		Searcher:          searcher,
-		StartInSearchMode: true,
+		StartInSearchMode: false,
 		Keys: &promptui.SelectKeys{
 			Prev:     promptui.Key{Code: readline.CharPrev, Display: "↑"},
 			Next:     promptui.Key{Code: readline.CharNext, Display: "↓"},


[cloudstack-cloudmonkey] 01/04: vendor: update dependencies

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack-cloudmonkey.git

commit a96aad88988b6203f57bef71ee0c9af95cbb7e84
Author: Rohit Yadav <ro...@apache.org>
AuthorDate: Sat Oct 20 09:49:27 2018 +0530

    vendor: update dependencies
    
    Signed-off-by: Rohit Yadav <ro...@apache.org>
---
 .../briandowns/spinner/character_sets.go           |    2 +
 vendor/github.com/briandowns/spinner/spinner.go    |   66 +-
 vendor/github.com/chzyer/readline/complete.go      |    2 +-
 vendor/github.com/lunixbochs/vtclean/vtclean.go    |   13 +-
 .../lunixbochs/vtclean/vtclean/vtclean.go          |   17 -
 vendor/github.com/manifoldco/promptui/codes.go     |   26 +-
 vendor/github.com/manifoldco/promptui/keycodes.go  |   26 +-
 .../manifoldco/promptui/keycodes_windows.go        |   24 +-
 vendor/github.com/manifoldco/promptui/list/list.go |   13 +-
 vendor/github.com/manifoldco/promptui/prompt.go    |   71 +-
 vendor/github.com/manifoldco/promptui/promptui.go  |   21 +-
 .../manifoldco/promptui/screenbuf/screenbuf.go     |    4 +-
 vendor/github.com/manifoldco/promptui/select.go    |  171 +++-
 vendor/github.com/manifoldco/promptui/styles.go    |   21 +-
 .../manifoldco/promptui/styles_windows.go          |   21 +-
 .../mattn/go-colorable/cmd/colorable/colorable.go  |   12 -
 .../mattn/go-colorable/colorable_windows.go        |  208 ++--
 .../mattn/go-runewidth/runewidth_posix_test.go     |   78 --
 .../mattn/go-runewidth/runewidth_test.go           |  297 ------
 .../github.com/mattn/go-shellwords/shellwords.go   |   47 +-
 vendor/github.com/mattn/go-shellwords/util_go15.go |   24 -
 .../github.com/mattn/go-shellwords/util_posix.go   |    5 +-
 .../github.com/mattn/go-shellwords/util_windows.go |    5 -
 vendor/github.com/mitchellh/go-homedir/homedir.go  |   56 +-
 vendor/github.com/olekukonko/tablewriter/README.md |    2 +-
 .../olekukonko/tablewriter/csv2table/README.md     |   43 -
 .../olekukonko/tablewriter/csv2table/csv2table.go  |   85 --
 .../olekukonko/tablewriter/table_test.go           | 1055 --------------------
 vendor/github.com/olekukonko/tablewriter/util.go   |   19 +-
 .../github.com/olekukonko/tablewriter/wrap_test.go |   58 --
 vendor/gopkg.in/ini.v1/file.go                     |   47 +-
 vendor/gopkg.in/ini.v1/ini.go                      |   26 +-
 vendor/gopkg.in/ini.v1/parser.go                   |  143 ++-
 vendor/gopkg.in/ini.v1/section.go                  |    1 +
 34 files changed, 648 insertions(+), 2061 deletions(-)

diff --git a/vendor/github.com/briandowns/spinner/character_sets.go b/vendor/github.com/briandowns/spinner/character_sets.go
index 1efe6e6..600ba37 100644
--- a/vendor/github.com/briandowns/spinner/character_sets.go
+++ b/vendor/github.com/briandowns/spinner/character_sets.go
@@ -49,6 +49,8 @@ var CharSets = map[int][]string{
 	41: {"⬒", "⬔", "⬓", "⬕"},
 	42: {"⬖", "⬘", "⬗", "⬙"},
 	43: {"[>>>          >]", "[]>>>>        []", "[]  >>>>      []", "[]    >>>>    []", "[]      >>>>  []", "[]        >>>>[]", "[>>          >>]"},
+	44: {"♠", "♣", "♥", "♦"},
+	45: {"➞", "➟", "➠", "➡", "➠", "➟"},
 }
 
 func init() {
diff --git a/vendor/github.com/briandowns/spinner/spinner.go b/vendor/github.com/briandowns/spinner/spinner.go
index 2cd0414..3f1ffdb 100644
--- a/vendor/github.com/briandowns/spinner/spinner.go
+++ b/vendor/github.com/briandowns/spinner/spinner.go
@@ -14,9 +14,12 @@
 package spinner
 
 import (
+	"encoding/hex"
 	"errors"
 	"fmt"
 	"io"
+	"os"
+	"runtime"
 	"strconv"
 	"sync"
 	"time"
@@ -183,8 +186,8 @@ type Spinner struct {
 }
 
 // New provides a pointer to an instance of Spinner with the supplied options
-func New(cs []string, d time.Duration) *Spinner {
-	return &Spinner{
+func New(cs []string, d time.Duration, options ...Option) *Spinner {
+	s:= &Spinner{
 		Delay:    d,
 		chars:    cs,
 		color:    color.New(color.FgWhite).SprintFunc(),
@@ -193,6 +196,38 @@ func New(cs []string, d time.Duration) *Spinner {
 		active:   false,
 		stopChan: make(chan struct{}, 1),
 	}
+
+	for _, option := range options {
+		option(s)
+	}
+
+	return s
+}
+
+type Option func(*Spinner)
+
+type Options struct {
+	Color string
+	Suffix string
+	FinalMSG string
+}
+
+func WithColor(color string) Option {
+	return func(s *Spinner) {
+		s.Color(color)
+	}
+}
+
+func WithSuffix(suffix string) Option {
+	return func(s *Spinner) {
+		s.Suffix = suffix
+	}
+}
+
+func WithFinalMSG(finalMsg string) Option {
+	return func(s *Spinner) {
+		s.FinalMSG = finalMsg
+	}
 }
 
 // Active will return whether or not the spinner is currently active
@@ -216,7 +251,16 @@ func (s *Spinner) Start() {
 				default:
 					s.lock.Lock()
 					s.erase()
-					outColor := fmt.Sprintf("%s%s%s ", s.Prefix, s.color(s.chars[i]), s.Suffix)
+					var outColor string
+					if runtime.GOOS == "windows" {
+						if s.Writer == os.Stderr {
+							outColor = fmt.Sprintf("\r%s%s%s ", s.Prefix, s.chars[i], s.Suffix)
+						} else {
+							outColor = fmt.Sprintf("\r%s%s%s ", s.Prefix, s.color(s.chars[i]), s.Suffix)
+						}
+					} else {
+						outColor = fmt.Sprintf("%s%s%s ", s.Prefix, s.color(s.chars[i]), s.Suffix)
+					}
 					outPlain := fmt.Sprintf("%s%s%s ", s.Prefix, s.chars[i], s.Suffix)
 					fmt.Fprint(s.Writer, outColor)
 					s.lastOutput = outPlain
@@ -297,7 +341,21 @@ func (s *Spinner) UpdateCharSet(cs []string) {
 // Caller must already hold s.lock.
 func (s *Spinner) erase() {
 	n := utf8.RuneCountInString(s.lastOutput)
-	for _, c := range []string{"\b", " ", "\b"} {
+	if runtime.GOOS == "windows" {
+		clearString := "\r"
+		for i := 0; i < n; i++ {
+			clearString += " "
+		}
+		fmt.Fprintf(s.Writer, clearString)
+		return
+	}
+	del, _ := hex.DecodeString("7f")
+	for _, c := range []string{
+		"\b",
+		string(del),
+		"\b",
+		"\033[K", // for macOS Terminal
+	} {
 		for i := 0; i < n; i++ {
 			fmt.Fprintf(s.Writer, c)
 		}
diff --git a/vendor/github.com/chzyer/readline/complete.go b/vendor/github.com/chzyer/readline/complete.go
index d1351f7..c08c994 100644
--- a/vendor/github.com/chzyer/readline/complete.go
+++ b/vendor/github.com/chzyer/readline/complete.go
@@ -221,7 +221,7 @@ func (o *opCompleter) CompleteRefresh() {
 		}
 		buf.WriteString(string(same))
 		buf.WriteString(string(c))
-		buf.Write(bytes.Repeat([]byte(" "), colWidth-len(c)-len(same)))
+		buf.Write(bytes.Repeat([]byte(" "), colWidth-runes.WidthAll(c)-runes.WidthAll(same)))
 
 		if inSelect {
 			buf.WriteString("\033[0m")
diff --git a/vendor/github.com/lunixbochs/vtclean/vtclean.go b/vendor/github.com/lunixbochs/vtclean/vtclean.go
index fec492c..64fe01f 100644
--- a/vendor/github.com/lunixbochs/vtclean/vtclean.go
+++ b/vendor/github.com/lunixbochs/vtclean/vtclean.go
@@ -6,8 +6,13 @@ import (
 	"strconv"
 )
 
-// see regex.txt for a slightly separated version of this regex
-var vt100re = regexp.MustCompile(`^\033([\[\]]([\d\?]+)?(;[\d\?]+)*)?(.)`)
+// regex based on ECMA-48:
+// 1. optional:
+//    one of [ or ]
+//    any amount of 0x30-0x3f
+//    any amount of 0x20-0x2f
+// 3. exactly one 0x40-0x7e
+var vt100re = regexp.MustCompile(`^\033([\[\]]([0-9:;<=>\?]*)([!"#$%&'()*+,\-./]*))?([@A-Z\[\]^_\x60a-z{|}~])`)
 var vt100exc = regexp.MustCompile(`^\033(\[[^a-zA-Z0-9@\?]+|[\(\)]).`)
 
 // this is to handle the RGB escape generated by `tput initc 1 500 500 500`
@@ -21,6 +26,8 @@ func Clean(line string, color bool) string {
 	for i := 0; i < len(lineb); {
 		c := lineb[i]
 		switch c {
+		case '\r':
+			edit.MoveAbs(0)
 		case '\b':
 			edit.Move(-1)
 		case '\033':
@@ -74,7 +81,7 @@ func Clean(line string, color bool) string {
 			}
 			continue
 		default:
-			if c == '\n' || c >= ' ' {
+			if c == '\n' || c == '\t' || c >= ' ' {
 				edit.Write([]byte{c})
 			}
 		}
diff --git a/vendor/github.com/lunixbochs/vtclean/vtclean/vtclean.go b/vendor/github.com/lunixbochs/vtclean/vtclean/vtclean.go
deleted file mode 100644
index 2c4f177..0000000
--- a/vendor/github.com/lunixbochs/vtclean/vtclean/vtclean.go
+++ /dev/null
@@ -1,17 +0,0 @@
-package main
-
-import (
-	"flag"
-	"github.com/lunixbochs/vtclean"
-	"io"
-	"os"
-)
-
-func main() {
-	color := flag.Bool("color", false, "enable color")
-	flag.Parse()
-
-	stdout := vtclean.NewWriter(os.Stdout, *color)
-	defer stdout.Close()
-	io.Copy(stdout, os.Stdin)
-}
diff --git a/vendor/github.com/manifoldco/promptui/codes.go b/vendor/github.com/manifoldco/promptui/codes.go
index de3f086..8138c40 100644
--- a/vendor/github.com/manifoldco/promptui/codes.go
+++ b/vendor/github.com/manifoldco/promptui/codes.go
@@ -11,7 +11,9 @@ const esc = "\033["
 
 type attribute int
 
-// Foreground weight/decoration attributes.
+// The possible state of text inside the application, either Bold, faint, italic or underline.
+//
+// These constants are called through the use of the Styler function.
 const (
 	reset attribute = iota
 
@@ -21,7 +23,9 @@ const (
 	FGUnderline
 )
 
-// Foreground color attributes
+// The possible colors of text inside the application.
+//
+// These constants are called through the use of the Styler function.
 const (
 	FGBlack attribute = iota + 30
 	FGRed
@@ -33,7 +37,9 @@ const (
 	FGWhite
 )
 
-// Background color attributes
+// The possible background colors of text inside the application.
+//
+// These constants are called through the use of the Styler function.
 const (
 	BGBlack attribute = iota + 40
 	BGRed
@@ -54,8 +60,10 @@ const (
 	clearLine  = esc + "2K"
 )
 
-// FuncMap defines template helpers for the output. It can be extended as a
-// regular map.
+// FuncMap defines template helpers for the output. It can be extended as a regular map.
+//
+// The functions inside the map link the state, color and background colors strings detected in templates to a Styler
+// function that applies the given style using the corresponding constant.
 var FuncMap = template.FuncMap{
 	"black":     Styler(FGBlack),
 	"red":       Styler(FGRed),
@@ -87,8 +95,12 @@ func movementCode(n uint, code rune) string {
 	return esc + strconv.FormatUint(uint64(n), 10) + string(code)
 }
 
-// Styler returns a func that applies the attributes given in the Styler call
-// to the provided string.
+// Styler is a function that accepts multiple possible styling transforms from the state,
+// color and background colors constants and transforms them into a templated string
+// to apply those styles in the CLI.
+//
+// The returned styling function accepts a string that will be extended with
+// the wrapping function's styling attributes.
 func Styler(attrs ...attribute) func(interface{}) string {
 	attrstrs := make([]string, len(attrs))
 	for i, v := range attrs {
diff --git a/vendor/github.com/manifoldco/promptui/keycodes.go b/vendor/github.com/manifoldco/promptui/keycodes.go
index c1f8491..2b22e24 100644
--- a/vendor/github.com/manifoldco/promptui/keycodes.go
+++ b/vendor/github.com/manifoldco/promptui/keycodes.go
@@ -4,22 +4,28 @@ package promptui
 
 import "github.com/chzyer/readline"
 
+// These runes are used to identity the commands entered by the user in the command prompt. They map
+// to specific actions of promptui in prompt mode and can be remapped if necessary.
 var (
-	// KeyEnter is the default key for submission/selection
+	// KeyEnter is the default key for submission/selection.
 	KeyEnter rune = readline.CharEnter
 
-	// KeyBackspace is the default key for deleting input text
+	// KeyBackspace is the default key for deleting input text.
 	KeyBackspace rune = readline.CharBackspace
 
-	// KeyPrev is the default key to go up during selection
-	KeyPrev rune = readline.CharPrev
+	// KeyPrev is the default key to go up during selection.
+	KeyPrev        rune = readline.CharPrev
+	KeyPrevDisplay      = "↑"
 
-	// KeyNext is the default key to go down during selection
-	KeyNext rune = readline.CharNext
+	// KeyNext is the default key to go down during selection.
+	KeyNext        rune = readline.CharNext
+	KeyNextDisplay      = "↓"
 
-	// KeyBackward is the default key to page up during selection
-	KeyBackward rune = readline.CharBackward
+	// KeyBackward is the default key to page up during selection.
+	KeyBackward        rune = readline.CharBackward
+	KeyBackwardDisplay      = "←"
 
-	// KeyForward is the default key to page down during selection
-	KeyForward rune = readline.CharForward
+	// KeyForward is the default key to page down during selection.
+	KeyForward        rune = readline.CharForward
+	KeyForwardDisplay      = "→"
 )
diff --git a/vendor/github.com/manifoldco/promptui/keycodes_windows.go b/vendor/github.com/manifoldco/promptui/keycodes_windows.go
index fa4709c..fc29d39 100644
--- a/vendor/github.com/manifoldco/promptui/keycodes_windows.go
+++ b/vendor/github.com/manifoldco/promptui/keycodes_windows.go
@@ -3,23 +3,27 @@ package promptui
 // source: https://msdn.microsoft.com/en-us/library/aa243025(v=vs.60).aspx
 
 var (
-	// KeyEnter is the default key for submission/selection
+	// KeyEnter is the default key for submission/selection inside a command line prompt.
 	KeyEnter rune = 13
 
-	// KeyBackspace is the default key for deleting input text
+	// KeyBackspace is the default key for deleting input text inside a command line prompt.
 	KeyBackspace rune = 8
 
 	// FIXME: keys below are not triggered by readline, not working on Windows
 
-	// KeyPrev is the default key to go up during selection
-	KeyPrev rune = 38
+	// KeyPrev is the default key to go up during selection inside a command line prompt.
+	KeyPrev        rune = 38
+	KeyPrevDisplay      = "k"
 
-	// KeyNext is the default key to go down during selection
-	KeyNext rune = 40
+	// KeyNext is the default key to go down during selection inside a command line prompt.
+	KeyNext        rune = 40
+	KeyNextDisplay      = "j"
 
-	// KeyBackward is the default key to page up during selection
-	KeyBackward rune = 37
+	// KeyBackward is the default key to page up during selection inside a command line prompt.
+	KeyBackward        rune = 37
+	KeyBackwardDisplay      = "h"
 
-	// KeyForward is the default key to page down during selection
-	KeyForward rune = 39
+	// KeyForward is the default key to page down during selection inside a command line prompt.
+	KeyForward        rune = 39
+	KeyForwardDisplay      = "l"
 )
diff --git a/vendor/github.com/manifoldco/promptui/list/list.go b/vendor/github.com/manifoldco/promptui/list/list.go
index b1cc8be..0765da9 100644
--- a/vendor/github.com/manifoldco/promptui/list/list.go
+++ b/vendor/github.com/manifoldco/promptui/list/list.go
@@ -6,7 +6,9 @@ import (
 	"strings"
 )
 
-// Searcher can be implemented to allow the list to search for results.
+// Searcher is a base function signature that is used inside select when activating the search mode.
+// If defined, it is called on each items of the select and should return a boolean for whether or not
+// the item fits the searched term.
 type Searcher func(input string, index int) bool
 
 // NotFound is an index returned when no item was selected. This could
@@ -25,8 +27,8 @@ type List struct {
 	Searcher Searcher
 }
 
-// New creates and initializes a list. Items must be a slice type and size must
-// be greater than 0.
+// New creates and initializes a list of searchable items. The items attribute must be a slice type with a
+// size greater than 0. Error will be returned if those two conditions are not met.
 func New(items interface{}, size int) (*List, error) {
 	if size < 1 {
 		return nil, fmt.Errorf("list size %d must be greater than 0", size)
@@ -61,7 +63,7 @@ func (l *List) Prev() {
 }
 
 // Search allows the list to be filtered by a given term. The list must
-// implement the searcher method for that.
+// implement the searcher function signature for this functionality to work.
 func (l *List) Search(term string) {
 	term = strings.Trim(term, " ")
 	l.cursor = 0
@@ -159,7 +161,8 @@ func (l *List) CanPageUp() bool {
 	return l.start > 0
 }
 
-// Index returns the index of the item currently selected.
+// Index returns the index of the item currently selected inside the searched list. If no item is selected,
+// the NotFound (-1) index is returned.
 func (l *List) Index() int {
 	selected := l.scope[l.cursor]
 
diff --git a/vendor/github.com/manifoldco/promptui/prompt.go b/vendor/github.com/manifoldco/promptui/prompt.go
index 9fdfcb6..402befc 100644
--- a/vendor/github.com/manifoldco/promptui/prompt.go
+++ b/vendor/github.com/manifoldco/promptui/prompt.go
@@ -12,31 +12,35 @@ import (
 
 const cursor = "\u2588"
 
-// Prompt represents a single line text field input.
+// Prompt represents a single line text field input with options for validation and input masks.
 type Prompt struct {
-	// Label is the value displayed on the command line prompt. It can be any
-	// value one would pass to a text/template Execute(), including just a string.
+	// Label is the value displayed on the command line prompt.
+	//
+	// The value for Label can be a simple string or a struct that will need to be accessed by dot notation
+	// inside the templates. For example, `{{ .Name }}` will display the name property of a struct.
 	Label interface{}
 
-	Default string // Default is the initial value to populate in the prompt
+	// Default is the initial value for the prompt. This value will be displayed next to the prompt's label
+	// and the user will be able to view or change it depending on the options.
+	Default string
 
 	// AllowEdit lets the user edit the default value. If false, any key press
 	// other than <Enter> automatically clears the default value.
 	AllowEdit bool
 
-	// Validate is optional. If set, this function is used to validate the input
-	// after each character entry.
+	// Validate is an optional function that fill be used against the entered value in the prompt to validate it.
 	Validate ValidateFunc
 
-	// If mask is set, this value is displayed instead of the actual input
-	// characters.
+	// Mask is an optional rune that sets which character to display instead of the entered characters. This
+	// allows hiding private information like passwords.
 	Mask rune
 
 	// Templates can be used to customize the prompt output. If nil is passed, the
-	// default templates are used.
+	// default templates are used. See the PromptTemplates docs for more info.
 	Templates *PromptTemplates
 
-	// IsConfirm sets the prompt to be a [y/N] question.
+	// IsConfirm makes the prompt ask for a yes or no ([Y/N]) question rather than request an input. When set,
+	// most properties related to input will be ignored.
 	IsConfirm bool
 
 	// IsVimMode enables vi-like movements (hjkl) and editing.
@@ -47,28 +51,51 @@ type Prompt struct {
 }
 
 // PromptTemplates allow a prompt to be customized following stdlib
-// text/template syntax. If any field is blank a default template is used.
+// text/template syntax. Custom state, colors and background color are available for use inside
+// the templates and are documented inside the Variable section of the docs.
+//
+// Examples
+//
+// text/templates use a special notation to display programmable content. Using the double bracket notation,
+// the value can be printed with specific helper functions. For example
+//
+// This displays the value given to the template as pure, unstylized text.
+// 	'{{ . }}'
+//
+// This displays the value colored in cyan
+// 	'{{ . | cyan }}'
+//
+// This displays the value colored in red with a cyan background-color
+// 	'{{ . | red | cyan }}'
+//
+// See the doc of text/template for more info: https://golang.org/pkg/text/template/
 type PromptTemplates struct {
-	// Prompt is a text/template for the initial prompt question.
+	// Prompt is a text/template for the prompt label displayed on the left side of the prompt.
 	Prompt string
 
-	// Prompt is a text/template if the prompt is a confirmation.
+	// Prompt is a text/template for the prompt label when IsConfirm is set as true.
 	Confirm string
 
-	// Valid is a text/template for when the current input is valid.
+	// Valid is a text/template for the prompt label when the value entered is valid.
 	Valid string
 
-	// Invalid is a text/template for when the current input is invalid.
+	// Invalid is a text/template for the prompt label when the value entered is invalid.
 	Invalid string
 
-	// Success is a text/template for the successful result.
+	// Success is a text/template for the prompt label when the user has pressed entered and the value has been
+	// deemed valid by the validation function. The label will keep using this template even when the prompt ends
+	// inside the console.
 	Success string
 
-	// Prompt is a text/template when there is a validation error.
+	// Prompt is a text/template for the prompt label when the value is invalid dur to an error triggered from
+	// the prompt's validation function.
 	ValidationError string
 
-	// FuncMap is a map of helpers for the templates. If nil, the default helpers
-	// are used.
+	// FuncMap is a map of helper functions that can be used inside of templates according to the text/template
+	// documentation.
+	//
+	// By default, FuncMap contains the color functions used to color the text in templates. If FuncMap
+	// is overridden, the colors functions must be added in the override from promptui.FuncMap to work.
 	FuncMap template.FuncMap
 
 	prompt     *template.Template
@@ -78,7 +105,9 @@ type PromptTemplates struct {
 	success    *template.Template
 }
 
-// Run runs the prompt, returning the validated input.
+// Run executes the prompt. Its displays the label and default value if any, asking the user to enter a value.
+// Run will keep the prompt alive until it has been canceled from the command prompt or it has received a valid
+// value. It will return the value and an error if any occurred during the prompt's execution.
 func (p *Prompt) Run() (string, error) {
 	c := &readline.Config{}
 	err := c.Init()
@@ -228,7 +257,7 @@ func (p *Prompt) Run() (string, error) {
 		echo = strings.Repeat(string(p.Mask), len(echo))
 	}
 
-	prompt := render(p.Templates.valid, p.Label)
+	prompt := render(p.Templates.success, p.Label)
 	prompt = append(prompt, []byte(echo)...)
 
 	if p.IsConfirm {
diff --git a/vendor/github.com/manifoldco/promptui/promptui.go b/vendor/github.com/manifoldco/promptui/promptui.go
index 4faa68d..6248e58 100644
--- a/vendor/github.com/manifoldco/promptui/promptui.go
+++ b/vendor/github.com/manifoldco/promptui/promptui.go
@@ -1,18 +1,27 @@
-// Package promptui provides ui elements for the command line prompt.
+// Package promptui is a library providing a simple interface to create command-line prompts for go.
+// It can be easily integrated into spf13/cobra, urfave/cli or any cli go application.
+//
+// promptui has two main input modes:
+//
+// Prompt provides a single line for user input. It supports optional live validation,
+// confirmation and masking the input.
+//
+// Select provides a list of options to choose from. It supports pagination, search,
+// detailed view and custom templates.
 package promptui
 
 import "errors"
 
-// ErrEOF is returned from prompts when EOF is encountered.
+// ErrEOF is the error returned from prompts when EOF is encountered.
 var ErrEOF = errors.New("^D")
 
-// ErrInterrupt is returned from prompts when an interrupt (ctrl-c) is
+// ErrInterrupt is the error returned from prompts when an interrupt (ctrl-c) is
 // encountered.
 var ErrInterrupt = errors.New("^C")
 
-// ErrAbort is returned when confirm prompts are supplied "n"
+// ErrAbort is the error returned when confirm prompts are supplied "n"
 var ErrAbort = errors.New("")
 
-// ValidateFunc validates the given input. It should return a ValidationError
-// if the input is not valid.
+// ValidateFunc is a placeholder type for any validation functions that validates a given input. It should return
+// a ValidationError if the input is not valid.
 type ValidateFunc func(string) error
diff --git a/vendor/github.com/manifoldco/promptui/screenbuf/screenbuf.go b/vendor/github.com/manifoldco/promptui/screenbuf/screenbuf.go
index f9dd24c..e4f87ee 100644
--- a/vendor/github.com/manifoldco/promptui/screenbuf/screenbuf.go
+++ b/vendor/github.com/manifoldco/promptui/screenbuf/screenbuf.go
@@ -40,7 +40,7 @@ func (s *ScreenBuf) Reset() {
 
 // Write writes a single line to the underlining buffer. If the ScreenBuf was
 // previously reset, all previous lines are cleared and the output starts from
-// the top. Lines with \r or \n will fail since they can interfere with the
+// the top. Lines with \r or \n will cause an error since they can interfere with the
 // terminal ability to move between lines.
 func (s *ScreenBuf) Write(b []byte) (int, error) {
 	if bytes.ContainsAny(b, "\r\n") {
@@ -97,7 +97,7 @@ func (s *ScreenBuf) Write(b []byte) (int, error) {
 	}
 }
 
-// Flush writes any buffered data to the underlying io.Writer.
+// Flush writes any buffered data to the underlying io.Writer, ensuring that any pending data is displayed.
 func (s *ScreenBuf) Flush() error {
 	for i := s.cursor; i < s.height; i++ {
 		if i < s.height {
diff --git a/vendor/github.com/manifoldco/promptui/select.go b/vendor/github.com/manifoldco/promptui/select.go
index 165b969..afa6f67 100644
--- a/vendor/github.com/manifoldco/promptui/select.go
+++ b/vendor/github.com/manifoldco/promptui/select.go
@@ -13,37 +13,55 @@ import (
 	"github.com/manifoldco/promptui/screenbuf"
 )
 
-// SelectedAdd is returned from SelectWithAdd when add is selected.
+// SelectedAdd is used internally inside SelectWithAdd when the add option is selected in select mode.
+// Since -1 is not a possible selected index, this ensure that add mode is always unique inside
+// SelectWithAdd's logic.
 const SelectedAdd = -1
 
-// Select represents a list for selecting a single item
+// Select represents a list of items used to enable selections, they can be used as search engines, menus
+// or as a list of items in a cli based prompt.
 type Select struct {
-	// Label is the value displayed on the command line prompt. It can be any
-	// value one would pass to a text/template Execute(), including just a string.
+	// Label is the text displayed on top of the list to direct input. The IconInitial value "?" will be
+	// appended automatically to the label so it does not need to be added.
+	//
+	// The value for Label can be a simple string or a struct that will need to be accessed by dot notation
+	// inside the templates. For example, `{{ .Name }}` will display the name property of a struct.
 	Label interface{}
 
-	// Items are the items to use in the list. It can be any slice type one would
-	// pass to a text/template execute, including a string slice.
+	// Items are the items to display inside the list. It expect a slice of any kind of values, including strings.
+	//
+	// If using a slice a strings, promptui will use those strings directly into its base templates or the
+	// provided templates. If using any other type in the slice, it will attempt to transform it into a string
+	// before giving it to its templates. Custom templates will override this behavior if using the dot notation
+	// inside the templates.
+	//
+	// For example, `{{ .Name }}` will display the name property of a struct.
 	Items interface{}
 
-	// Size is the number of items that should appear on the select before
-	// scrolling. If it is 0, defaults to 5.
+	// Size is the number of items that should appear on the select before scrolling is necessary. Defaults to 5.
 	Size int
 
-	// IsVimMode sets whether readline is using Vim mode.
+	// IsVimMode sets whether to use vim mode when using readline in the command prompt. Look at
+	// https://godoc.org/github.com/chzyer/readline#Config for more information on readline.
 	IsVimMode bool
 
 	// Templates can be used to customize the select output. If nil is passed, the
-	// default templates are used.
+	// default templates are used. See the SelectTemplates docs for more info.
 	Templates *SelectTemplates
 
-	// Keys can be used to change movement and search keys.
+	// Keys is the set of keys used in select mode to control the command line interface. See the SelectKeys docs for
+	// more info.
 	Keys *SelectKeys
 
-	// Searcher can be implemented to teach the select how to search for items.
+	// Searcher is a function that can be implemented to refine the base searching algorithm in selects.
+	//
+	// Search is a function that will receive the searched term and the item's index and should return a boolean
+	// for whether or not the terms are alike. It is unimplemented by default and search will not work unless
+	// it is implemented.
 	Searcher list.Searcher
 
-	// Starts the prompt in search mode.
+	// StartInSearchMode sets whether or not the select mdoe should start in search mode or selection mode.
+	// For search mode to work, the Search property must be implemented.
 	StartInSearchMode bool
 
 	label string
@@ -51,32 +69,71 @@ type Select struct {
 	list *list.List
 }
 
-// SelectKeys defines which keys can be used for movement and search.
+// SelectKeys defines the available keys used by select mode to enable the user to move around the list
+// and trigger search mode. See the Key struct docs for more information on keys.
 type SelectKeys struct {
-	Next     Key // Next defaults to down arrow key
-	Prev     Key // Prev defaults to up arrow key
-	PageUp   Key // PageUp defaults to left arrow key
-	PageDown Key // PageDown defaults to right arrow key
-	Search   Key // Search defaults to '/' key
+	// Next is the key used to move to the next element inside the list. Defaults to down arrow key.
+	Next Key
+
+	// Prev is the key used to move to the previous element inside the list. Defaults to up arrow key.
+	Prev Key
+
+	// PageUp is the key used to jump back to the first element inside the list. Defaults to left arrow key.
+	PageUp Key
+
+	// PageUp is the key used to jump forward to the last element inside the list. Defaults to right arrow key.
+	PageDown Key
+
+	// Search is the key used to trigger the search mode for the list. Default to the "/" key.
+	Search Key
 }
 
-// Key defines a keyboard code and a display representation for the help
-// Check https://github.com/chzyer/readline for a list of codes
+// Key defines a keyboard code and a display representation for the help menu.
 type Key struct {
-	Code    rune
+	// Code is a rune that will be used to compare against typed keys with readline.
+	// Check https://github.com/chzyer/readline for a list of codes
+	Code rune
+
+	// Display is the string that will be displayed inside the help menu to help inform the user
+	// of which key to use on his keyboard for various functions.
 	Display string
 }
 
-// SelectTemplates allow a select prompt to be customized following stdlib
-// text/template syntax. If any field is blank a default template is used.
+// SelectTemplates allow a select list to be customized following stdlib
+// text/template syntax. Custom state, colors and background color are available for use inside
+// the templates and are documented inside the Variable section of the docs.
+//
+// Examples
+//
+// text/templates use a special notation to display programmable content. Using the double bracket notation,
+// the value can be printed with specific helper functions. For example
+//
+// This displays the value given to the template as pure, unstylized text. Structs are transformed to string
+// with this notation.
+// 	'{{ . }}'
+//
+// This displays the name property of the value colored in cyan
+// 	'{{ .Name | cyan }}'
+//
+// This displays the label property of value colored in red with a cyan background-color
+// 	'{{ .Label | red | cyan }}'
+//
+// See the doc of text/template for more info: https://golang.org/pkg/text/template/
+//
+// Notes
+//
+// Setting any of these templates will remove the icons from the default templates. They must
+// be added back in each of their specific templates. The styles.go constants contains the default icons.
 type SelectTemplates struct {
-	// Active is a text/template for the label.
+	// Label is a text/template for the main command line label. Defaults to printing the label as it with
+	// the IconInitial.
 	Label string
 
-	// Active is a text/template for when an item is current active.
+	// Active is a text/template for when an item is currently active within the list.
 	Active string
 
-	// Inactive is a text/template for when an item is not current active.
+	// Inactive is a text/template for when an item is not currently active inside the list. This
+	// template is used for all items unless they are active or selected.
 	Inactive string
 
 	// Selected is a text/template for when an item was successfully selected.
@@ -84,14 +141,22 @@ type SelectTemplates struct {
 
 	// Details is a text/template for when an item current active to show
 	// additional information. It can have multiple lines.
+	//
+	// Detail will always be displayed for the active element and thus can be used to display additional
+	// information on the element beyond its label.
+	//
+	// promptui will not trim spaces and tabs will be displayed if the template is indented.
 	Details string
 
 	// Help is a text/template for displaying instructions at the top. By default
 	// it shows keys for movement and search.
 	Help string
 
-	// FuncMap is a map of helpers for the templates. If nil, the default helpers
-	// are used.
+	// FuncMap is a map of helper functions that can be used inside of templates according to the text/template
+	// documentation.
+	//
+	// By default, FuncMap contains the color functions used to color the text in templates. If FuncMap
+	// is overridden, the colors functions must be added in the override from promptui.FuncMap to work.
 	FuncMap template.FuncMap
 
 	label    *template.Template
@@ -102,8 +167,10 @@ type SelectTemplates struct {
 	help     *template.Template
 }
 
-// Run runs the Select list. It returns the index of the selected element,
-// and its value.
+// Run executes the select list. Its displays the label and the list of items, asking the user to chose any
+// value within to list. Run will keep the prompt alive until it has been canceled from
+// the command prompt or it has received a valid value. It will return the value and an error if any
+// occurred during the select's execution.
 func (s *Select) Run() (int, string, error) {
 	if s.Size == 0 {
 		s.Size = 5
@@ -382,23 +449,37 @@ func (s *Select) prepareTemplates() error {
 	return nil
 }
 
-// SelectWithAdd represents a list for selecting a single item, or selecting
-// a newly created item.
+// SelectWithAdd represents a list for selecting a single item inside a list of items with the possibility to
+// add new items to the list.
 type SelectWithAdd struct {
-	Label string   // Label is the value displayed on the command line prompt.
-	Items []string // Items are the items to use in the list.
+	// Label is the text displayed on top of the list to direct input. The IconInitial value "?" will be
+	// appended automatically to the label so it does not need to be added.
+	Label string
 
-	AddLabel string // The label used in the item list for creating a new item.
+	// Items are the items to display inside the list. Each item will be listed individually with the
+	// AddLabel as the first item of the list.
+	Items []string
 
-	// Validate is optional. If set, this function is used to validate the input
-	// after each character entry.
+	// AddLabel is the label used for the first item of the list that enables adding a new item.
+	// Selecting this item in the list displays the add item prompt using promptui/prompt.
+	AddLabel string
+
+	// Validate is an optional function that fill be used against the entered value in the prompt to validate it.
+	// If the value is valid, it is returned to the callee to be added in the list.
 	Validate ValidateFunc
 
-	IsVimMode bool // Whether readline is using Vim mode.
+	// IsVimMode sets whether to use vim mode when using readline in the command prompt. Look at
+	// https://godoc.org/github.com/chzyer/readline#Config for more information on readline.
+	IsVimMode bool
 }
 
-// Run runs the Select list. It returns the index of the selected element,
-// and its value. If a new element is created, -1 is returned as the index.
+// Run executes the select list. Its displays the label and the list of items, asking the user to chose any
+// value within to list or add his own. Run will keep the prompt alive until it has been canceled from
+// the command prompt or it has received a valid value.
+//
+// If the addLabel is selected in the list, this function will return a -1 index with the added label and no error.
+// Otherwise, it will return the index and the value of the selected item. In any case, if an error is triggered, it
+// will also return the error as its third return value.
 func (sa *SelectWithAdd) Run() (int, string, error) {
 	if len(sa.Items) > 0 {
 		newItems := append([]string{sa.AddLabel}, sa.Items...)
@@ -445,10 +526,10 @@ func (s *Select) setKeys() {
 		return
 	}
 	s.Keys = &SelectKeys{
-		Prev:     Key{Code: KeyPrev, Display: "↑"},
-		Next:     Key{Code: KeyNext, Display: "↓"},
-		PageUp:   Key{Code: KeyBackward, Display: "←"},
-		PageDown: Key{Code: KeyForward, Display: "→"},
+		Prev:     Key{Code: KeyPrev, Display: KeyPrevDisplay},
+		Next:     Key{Code: KeyNext, Display: KeyNextDisplay},
+		PageUp:   Key{Code: KeyBackward, Display: KeyBackwardDisplay},
+		PageDown: Key{Code: KeyForward, Display: KeyForwardDisplay},
 		Search:   Key{Code: '/', Display: "/"},
 	}
 }
diff --git a/vendor/github.com/manifoldco/promptui/styles.go b/vendor/github.com/manifoldco/promptui/styles.go
index 7decdd8..d7698c9 100644
--- a/vendor/github.com/manifoldco/promptui/styles.go
+++ b/vendor/github.com/manifoldco/promptui/styles.go
@@ -2,11 +2,22 @@
 
 package promptui
 
-// Icons used for displaying prompts or status
+// These are the default icons used by promptui for select and prompts. These should not be overridden and instead
+// customized through the use of custom templates
 var (
+	// IconInitial is the icon used when starting in prompt mode and the icon next to the label when
+	// starting in select mode.
 	IconInitial = Styler(FGBlue)("?")
-	IconGood    = Styler(FGGreen)("✔")
-	IconWarn    = Styler(FGYellow)("⚠")
-	IconBad     = Styler(FGRed)("✗")
-	IconSelect  = Styler(FGBold)("▸")
+
+	// IconGood is the icon used when a good answer is entered in prompt mode.
+	IconGood = Styler(FGGreen)("✔")
+
+	// IconWarn is the icon used when a good, but potentially invalid answer is entered in prompt mode.
+	IconWarn = Styler(FGYellow)("⚠")
+
+	// IconBad is the icon used when a bad answer is entered in prompt mode.
+	IconBad = Styler(FGRed)("✗")
+
+	// IconSelect is the icon used to identify the currently selected item in select mode.
+	IconSelect = Styler(FGBold)("▸")
 )
diff --git a/vendor/github.com/manifoldco/promptui/styles_windows.go b/vendor/github.com/manifoldco/promptui/styles_windows.go
index d48dfdd..36de268 100644
--- a/vendor/github.com/manifoldco/promptui/styles_windows.go
+++ b/vendor/github.com/manifoldco/promptui/styles_windows.go
@@ -1,10 +1,21 @@
 package promptui
 
-// Icons used for displaying prompts or status
+// These are the default icons used bu promptui for select and prompts. They can either be overridden directly
+// from these variable or customized through the use of custom templates
 var (
+	// IconInitial is the icon used when starting in prompt mode and the icon next to the label when
+	// starting in select mode.
 	IconInitial = Styler(FGBlue)("?")
-	IconGood    = Styler(FGGreen)("v")
-	IconWarn    = Styler(FGYellow)("!")
-	IconBad     = Styler(FGRed)("x")
-	IconSelect  = Styler(FGBold)(">")
+
+	// IconGood is the icon used when a good answer is entered in prompt mode.
+	IconGood = Styler(FGGreen)("v")
+
+	// IconWarn is the icon used when a good, but potentially invalid answer is entered in prompt mode.
+	IconWarn = Styler(FGYellow)("!")
+
+	// IconBad is the icon used when a bad answer is entered in prompt mode.
+	IconBad = Styler(FGRed)("x")
+
+	// IconSelect is the icon used to identify the currently selected item in select mode.
+	IconSelect = Styler(FGBold)(">")
 )
diff --git a/vendor/github.com/mattn/go-colorable/cmd/colorable/colorable.go b/vendor/github.com/mattn/go-colorable/cmd/colorable/colorable.go
deleted file mode 100644
index 8790477..0000000
--- a/vendor/github.com/mattn/go-colorable/cmd/colorable/colorable.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package main
-
-import (
-	"io"
-	"os"
-
-	"github.com/mattn/go-colorable"
-)
-
-func main() {
-	io.Copy(colorable.NewColorableStdout(), os.Stdin)
-}
diff --git a/vendor/github.com/mattn/go-colorable/colorable_windows.go b/vendor/github.com/mattn/go-colorable/colorable_windows.go
index 404e10c..e17a547 100644
--- a/vendor/github.com/mattn/go-colorable/colorable_windows.go
+++ b/vendor/github.com/mattn/go-colorable/colorable_windows.go
@@ -29,15 +29,6 @@ const (
 	backgroundMask      = (backgroundRed | backgroundBlue | backgroundGreen | backgroundIntensity)
 )
 
-const (
-	genericRead  = 0x80000000
-	genericWrite = 0x40000000
-)
-
-const (
-	consoleTextmodeBuffer = 0x1
-)
-
 type wchar uint16
 type short int16
 type dword uint32
@@ -78,17 +69,14 @@ var (
 	procGetConsoleCursorInfo       = kernel32.NewProc("GetConsoleCursorInfo")
 	procSetConsoleCursorInfo       = kernel32.NewProc("SetConsoleCursorInfo")
 	procSetConsoleTitle            = kernel32.NewProc("SetConsoleTitleW")
-	procCreateConsoleScreenBuffer  = kernel32.NewProc("CreateConsoleScreenBuffer")
 )
 
 // Writer provide colorable Writer to the console
 type Writer struct {
-	out       io.Writer
-	handle    syscall.Handle
-	althandle syscall.Handle
-	oldattr   word
-	oldpos    coord
-	rest      bytes.Buffer
+	out     io.Writer
+	handle  syscall.Handle
+	oldattr word
+	oldpos  coord
 }
 
 // NewColorable return new instance of Writer which handle escape sequence from File.
@@ -419,18 +407,7 @@ func (w *Writer) Write(data []byte) (n int, err error) {
 	var csbi consoleScreenBufferInfo
 	procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
 
-	handle := w.handle
-
-	var er *bytes.Reader
-	if w.rest.Len() > 0 {
-		var rest bytes.Buffer
-		w.rest.WriteTo(&rest)
-		w.rest.Reset()
-		rest.Write(data)
-		er = bytes.NewReader(rest.Bytes())
-	} else {
-		er = bytes.NewReader(data)
-	}
+	er := bytes.NewReader(data)
 	var bw [1]byte
 loop:
 	for {
@@ -448,55 +425,29 @@ loop:
 			break loop
 		}
 
-		switch c2 {
-		case '>':
-			continue
-		case ']':
-			w.rest.WriteByte(c1)
-			w.rest.WriteByte(c2)
-			er.WriteTo(&w.rest)
-			if bytes.IndexByte(w.rest.Bytes(), 0x07) == -1 {
+		if c2 == ']' {
+			if err := doTitleSequence(er); err != nil {
 				break loop
 			}
-			er = bytes.NewReader(w.rest.Bytes()[2:])
-			err := doTitleSequence(er)
-			if err != nil {
-				break loop
-			}
-			w.rest.Reset()
 			continue
-		// https://github.com/mattn/go-colorable/issues/27
-		case '7':
-			procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
-			w.oldpos = csbi.cursorPosition
-			continue
-		case '8':
-			procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&w.oldpos)))
-			continue
-		case 0x5b:
-			// execute part after switch
-		default:
+		}
+		if c2 != 0x5b {
 			continue
 		}
 
-		w.rest.WriteByte(c1)
-		w.rest.WriteByte(c2)
-		er.WriteTo(&w.rest)
-
 		var buf bytes.Buffer
 		var m byte
-		for i, c := range w.rest.Bytes()[2:] {
+		for {
+			c, err := er.ReadByte()
+			if err != nil {
+				break loop
+			}
 			if ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || c == '@' {
 				m = c
-				er = bytes.NewReader(w.rest.Bytes()[2+i+1:])
-				w.rest.Reset()
 				break
 			}
 			buf.Write([]byte(string(c)))
 		}
-		if m == 0 {
-			break loop
-		}
 
 		switch m {
 		case 'A':
@@ -504,64 +455,61 @@ loop:
 			if err != nil {
 				continue
 			}
-			procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
+			procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
 			csbi.cursorPosition.y -= short(n)
-			procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
+			procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
 		case 'B':
 			n, err = strconv.Atoi(buf.String())
 			if err != nil {
 				continue
 			}
-			procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
+			procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
 			csbi.cursorPosition.y += short(n)
-			procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
+			procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
 		case 'C':
 			n, err = strconv.Atoi(buf.String())
 			if err != nil {
 				continue
 			}
-			procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
+			procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
 			csbi.cursorPosition.x += short(n)
-			procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
+			procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
 		case 'D':
 			n, err = strconv.Atoi(buf.String())
 			if err != nil {
 				continue
 			}
-			procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
+			procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
 			csbi.cursorPosition.x -= short(n)
-			if csbi.cursorPosition.x < 0 {
-				csbi.cursorPosition.x = 0
-			}
-			procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
+			procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
 		case 'E':
 			n, err = strconv.Atoi(buf.String())
 			if err != nil {
 				continue
 			}
-			procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
+			procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
 			csbi.cursorPosition.x = 0
 			csbi.cursorPosition.y += short(n)
-			procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
+			procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
 		case 'F':
 			n, err = strconv.Atoi(buf.String())
 			if err != nil {
 				continue
 			}
-			procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
+			procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
 			csbi.cursorPosition.x = 0
 			csbi.cursorPosition.y -= short(n)
-			procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
+			procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
 		case 'G':
 			n, err = strconv.Atoi(buf.String())
 			if err != nil {
 				continue
 			}
-			procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
+			procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
 			csbi.cursorPosition.x = short(n - 1)
-			procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
+			procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
 		case 'H', 'f':
-			procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
+			procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
 			if buf.Len() > 0 {
 				token := strings.Split(buf.String(), ";")
 				switch len(token) {
@@ -586,7 +534,7 @@ loop:
 			} else {
 				csbi.cursorPosition.y = 0
 			}
-			procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
+			procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
 		case 'J':
 			n := 0
 			if buf.Len() > 0 {
@@ -597,20 +545,20 @@ loop:
 			}
 			var count, written dword
 			var cursor coord
-			procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
+			procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
 			switch n {
 			case 0:
 				cursor = coord{x: csbi.cursorPosition.x, y: csbi.cursorPosition.y}
-				count = dword(csbi.size.x) - dword(csbi.cursorPosition.x) + dword(csbi.size.y-csbi.cursorPosition.y)*dword(csbi.size.x)
+				count = dword(csbi.size.x - csbi.cursorPosition.x + (csbi.size.y-csbi.cursorPosition.y)*csbi.size.x)
 			case 1:
 				cursor = coord{x: csbi.window.left, y: csbi.window.top}
-				count = dword(csbi.size.x) - dword(csbi.cursorPosition.x) + dword(csbi.window.top-csbi.cursorPosition.y)*dword(csbi.size.x)
+				count = dword(csbi.size.x - csbi.cursorPosition.x + (csbi.window.top-csbi.cursorPosition.y)*csbi.size.x)
 			case 2:
 				cursor = coord{x: csbi.window.left, y: csbi.window.top}
-				count = dword(csbi.size.x) - dword(csbi.cursorPosition.x) + dword(csbi.size.y-csbi.cursorPosition.y)*dword(csbi.size.x)
+				count = dword(csbi.size.x - csbi.cursorPosition.x + (csbi.size.y-csbi.cursorPosition.y)*csbi.size.x)
 			}
-			procFillConsoleOutputCharacter.Call(uintptr(handle), uintptr(' '), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written)))
-			procFillConsoleOutputAttribute.Call(uintptr(handle), uintptr(csbi.attributes), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written)))
+			procFillConsoleOutputCharacter.Call(uintptr(w.handle), uintptr(' '), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written)))
+			procFillConsoleOutputAttribute.Call(uintptr(w.handle), uintptr(csbi.attributes), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written)))
 		case 'K':
 			n := 0
 			if buf.Len() > 0 {
@@ -619,28 +567,28 @@ loop:
 					continue
 				}
 			}
-			procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
+			procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
 			var cursor coord
 			var count, written dword
 			switch n {
 			case 0:
-				cursor = coord{x: csbi.cursorPosition.x, y: csbi.cursorPosition.y}
-				count = dword(csbi.size.x - csbi.cursorPosition.x)
+				cursor = coord{x: csbi.cursorPosition.x + 1, y: csbi.cursorPosition.y}
+				count = dword(csbi.size.x - csbi.cursorPosition.x - 1)
 			case 1:
-				cursor = coord{x: csbi.window.left, y: csbi.cursorPosition.y}
+				cursor = coord{x: csbi.window.left, y: csbi.window.top + csbi.cursorPosition.y}
 				count = dword(csbi.size.x - csbi.cursorPosition.x)
 			case 2:
-				cursor = coord{x: csbi.window.left, y: csbi.cursorPosition.y}
+				cursor = coord{x: csbi.window.left, y: csbi.window.top + csbi.cursorPosition.y}
 				count = dword(csbi.size.x)
 			}
-			procFillConsoleOutputCharacter.Call(uintptr(handle), uintptr(' '), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written)))
-			procFillConsoleOutputAttribute.Call(uintptr(handle), uintptr(csbi.attributes), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written)))
+			procFillConsoleOutputCharacter.Call(uintptr(w.handle), uintptr(' '), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written)))
+			procFillConsoleOutputAttribute.Call(uintptr(w.handle), uintptr(csbi.attributes), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written)))
 		case 'm':
-			procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
+			procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
 			attr := csbi.attributes
 			cs := buf.String()
 			if cs == "" {
-				procSetConsoleTextAttribute.Call(uintptr(handle), uintptr(w.oldattr))
+				procSetConsoleTextAttribute.Call(uintptr(w.handle), uintptr(w.oldattr))
 				continue
 			}
 			token := strings.Split(cs, ";")
@@ -679,21 +627,6 @@ loop:
 								attr |= n256foreAttr[n256]
 								i += 2
 							}
-						} else if len(token) == 5 && token[i+1] == "2" {
-							var r, g, b int
-							r, _ = strconv.Atoi(token[i+2])
-							g, _ = strconv.Atoi(token[i+3])
-							b, _ = strconv.Atoi(token[i+4])
-							i += 4
-							if r > 127 {
-								attr |= foregroundRed
-							}
-							if g > 127 {
-								attr |= foregroundGreen
-							}
-							if b > 127 {
-								attr |= foregroundBlue
-							}
 						} else {
 							attr = attr & (w.oldattr & backgroundMask)
 						}
@@ -721,21 +654,6 @@ loop:
 								attr |= n256backAttr[n256]
 								i += 2
 							}
-						} else if len(token) == 5 && token[i+1] == "2" {
-							var r, g, b int
-							r, _ = strconv.Atoi(token[i+2])
-							g, _ = strconv.Atoi(token[i+3])
-							b, _ = strconv.Atoi(token[i+4])
-							i += 4
-							if r > 127 {
-								attr |= backgroundRed
-							}
-							if g > 127 {
-								attr |= backgroundGreen
-							}
-							if b > 127 {
-								attr |= backgroundBlue
-							}
 						} else {
 							attr = attr & (w.oldattr & foregroundMask)
 						}
@@ -767,52 +685,38 @@ loop:
 							attr |= backgroundBlue
 						}
 					}
-					procSetConsoleTextAttribute.Call(uintptr(handle), uintptr(attr))
+					procSetConsoleTextAttribute.Call(uintptr(w.handle), uintptr(attr))
 				}
 			}
 		case 'h':
 			var ci consoleCursorInfo
 			cs := buf.String()
 			if cs == "5>" {
-				procGetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci)))
+				procGetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci)))
 				ci.visible = 0
-				procSetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci)))
+				procSetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci)))
 			} else if cs == "?25" {
-				procGetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci)))
+				procGetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci)))
 				ci.visible = 1
-				procSetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci)))
-			} else if cs == "?1049" {
-				if w.althandle == 0 {
-					h, _, _ := procCreateConsoleScreenBuffer.Call(uintptr(genericRead|genericWrite), 0, 0, uintptr(consoleTextmodeBuffer), 0, 0)
-					w.althandle = syscall.Handle(h)
-					if w.althandle != 0 {
-						handle = w.althandle
-					}
-				}
+				procSetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci)))
 			}
 		case 'l':
 			var ci consoleCursorInfo
 			cs := buf.String()
 			if cs == "5>" {
-				procGetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci)))
+				procGetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci)))
 				ci.visible = 1
-				procSetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci)))
+				procSetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci)))
 			} else if cs == "?25" {
-				procGetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci)))
+				procGetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci)))
 				ci.visible = 0
-				procSetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci)))
-			} else if cs == "?1049" {
-				if w.althandle != 0 {
-					syscall.CloseHandle(w.althandle)
-					w.althandle = 0
-					handle = w.handle
-				}
+				procSetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci)))
 			}
 		case 's':
-			procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
+			procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
 			w.oldpos = csbi.cursorPosition
 		case 'u':
-			procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&w.oldpos)))
+			procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&w.oldpos)))
 		}
 	}
 
diff --git a/vendor/github.com/mattn/go-runewidth/runewidth_posix_test.go b/vendor/github.com/mattn/go-runewidth/runewidth_posix_test.go
deleted file mode 100644
index 4bf7c25..0000000
--- a/vendor/github.com/mattn/go-runewidth/runewidth_posix_test.go
+++ /dev/null
@@ -1,78 +0,0 @@
-// +build !windows,!js
-
-package runewidth
-
-import (
-	"os"
-	"testing"
-)
-
-func TestIsEastAsian(t *testing.T) {
-	testcases := []struct {
-		locale string
-		want   bool
-	}{
-		{"foo@cjk_narrow", false},
-		{"foo@cjk", false},
-		{"utf-8@cjk", false},
-		{"ja_JP.CP932", true},
-	}
-
-	for _, tt := range testcases {
-		got := isEastAsian(tt.locale)
-		if got != tt.want {
-			t.Fatalf("isEastAsian(%q) should be %v", tt.locale, tt.want)
-		}
-	}
-}
-
-func TestIsEastAsianLCCTYPE(t *testing.T) {
-	lcctype := os.Getenv("LC_CTYPE")
-	defer os.Setenv("LC_CTYPE", lcctype)
-
-	testcases := []struct {
-		lcctype string
-		want    bool
-	}{
-		{"ja_JP.UTF-8", true},
-		{"C", false},
-		{"POSIX", false},
-		{"en_US.UTF-8", false},
-	}
-
-	for _, tt := range testcases {
-		os.Setenv("LC_CTYPE", tt.lcctype)
-		got := IsEastAsian()
-		if got != tt.want {
-			t.Fatalf("IsEastAsian() for LC_CTYPE=%v should be %v", tt.lcctype, tt.want)
-		}
-	}
-}
-
-func TestIsEastAsianLANG(t *testing.T) {
-	lcctype := os.Getenv("LC_CTYPE")
-	defer os.Setenv("LC_CTYPE", lcctype)
-	lang := os.Getenv("LANG")
-	defer os.Setenv("LANG", lang)
-
-	os.Setenv("LC_CTYPE", "")
-
-	testcases := []struct {
-		lcctype string
-		want    bool
-	}{
-		{"ja_JP.UTF-8", true},
-		{"C", false},
-		{"POSIX", false},
-		{"en_US.UTF-8", false},
-		{"C.UTF-8", false},
-	}
-
-	for _, tt := range testcases {
-		os.Setenv("LANG", tt.lcctype)
-		got := IsEastAsian()
-		if got != tt.want {
-			t.Fatalf("IsEastAsian() for LANG=%v should be %v", tt.lcctype, tt.want)
-		}
-	}
-}
diff --git a/vendor/github.com/mattn/go-runewidth/runewidth_test.go b/vendor/github.com/mattn/go-runewidth/runewidth_test.go
deleted file mode 100644
index e9edf6a..0000000
--- a/vendor/github.com/mattn/go-runewidth/runewidth_test.go
+++ /dev/null
@@ -1,297 +0,0 @@
-// +build !windows,!js
-
-package runewidth
-
-import (
-	"os"
-	"sort"
-	"testing"
-)
-
-var _ sort.Interface = (*table)(nil)
-
-func init() {
-	os.Setenv("RUNEWIDTH_EASTASIAN", "")
-}
-
-func (t table) Len() int {
-	return len(t)
-}
-
-func (t table) Less(i, j int) bool {
-	return t[i].first < t[j].first
-}
-
-func (t *table) Swap(i, j int) {
-	(*t)[i], (*t)[j] = (*t)[j], (*t)[i]
-}
-
-var tables = []table{
-	private,
-	nonprint,
-	combining,
-	doublewidth,
-	ambiguous,
-	emoji,
-	notassigned,
-	neutral,
-}
-
-func TestSorted(t *testing.T) {
-	for _, tbl := range tables {
-		if !sort.IsSorted(&tbl) {
-			t.Errorf("not sorted")
-		}
-	}
-}
-
-var runewidthtests = []struct {
-	in    rune
-	out   int
-	eaout int
-}{
-	{'世', 2, 2},
-	{'界', 2, 2},
-	{'セ', 1, 1},
-	{'カ', 1, 1},
-	{'イ', 1, 1},
-	{'☆', 1, 2}, // double width in ambiguous
-	{'\x00', 0, 0},
-	{'\x01', 0, 0},
-	{'\u0300', 0, 0},
-	{'\u2028', 0, 0},
-	{'\u2029', 0, 0},
-}
-
-func TestRuneWidth(t *testing.T) {
-	c := NewCondition()
-	c.EastAsianWidth = false
-	for _, tt := range runewidthtests {
-		if out := c.RuneWidth(tt.in); out != tt.out {
-			t.Errorf("RuneWidth(%q) = %d, want %d", tt.in, out, tt.out)
-		}
-	}
-	c.EastAsianWidth = true
-	for _, tt := range runewidthtests {
-		if out := c.RuneWidth(tt.in); out != tt.eaout {
-			t.Errorf("RuneWidth(%q) = %d, want %d", tt.in, out, tt.eaout)
-		}
-	}
-}
-
-var isambiguouswidthtests = []struct {
-	in  rune
-	out bool
-}{
-	{'世', false},
-	{'■', true},
-	{'界', false},
-	{'○', true},
-	{'㈱', false},
-	{'①', true},
-	{'②', true},
-	{'③', true},
-	{'④', true},
-	{'⑤', true},
-	{'⑥', true},
-	{'⑦', true},
-	{'⑧', true},
-	{'⑨', true},
-	{'⑩', true},
-	{'⑪', true},
-	{'⑫', true},
-	{'⑬', true},
-	{'⑭', true},
-	{'⑮', true},
-	{'⑯', true},
-	{'⑰', true},
-	{'⑱', true},
-	{'⑲', true},
-	{'⑳', true},
-	{'☆', true},
-}
-
-func TestIsAmbiguousWidth(t *testing.T) {
-	for _, tt := range isambiguouswidthtests {
-		if out := IsAmbiguousWidth(tt.in); out != tt.out {
-			t.Errorf("IsAmbiguousWidth(%q) = %v, want %v", tt.in, out, tt.out)
-		}
-	}
-}
-
-var stringwidthtests = []struct {
-	in    string
-	out   int
-	eaout int
-}{
-	{"■㈱の世界①", 10, 12},
-	{"スター☆", 7, 8},
-	{"つのだ☆HIRO", 11, 12},
-}
-
-func TestStringWidth(t *testing.T) {
-	c := NewCondition()
-	c.EastAsianWidth = false
-	for _, tt := range stringwidthtests {
-		if out := c.StringWidth(tt.in); out != tt.out {
-			t.Errorf("StringWidth(%q) = %d, want %d", tt.in, out, tt.out)
-		}
-	}
-	c.EastAsianWidth = true
-	for _, tt := range stringwidthtests {
-		if out := c.StringWidth(tt.in); out != tt.eaout {
-			t.Errorf("StringWidth(%q) = %d, want %d", tt.in, out, tt.eaout)
-		}
-	}
-}
-
-func TestStringWidthInvalid(t *testing.T) {
-	s := "こんにちわ\x00世界"
-	if out := StringWidth(s); out != 14 {
-		t.Errorf("StringWidth(%q) = %d, want %d", s, out, 14)
-	}
-}
-
-func TestTruncateSmaller(t *testing.T) {
-	s := "あいうえお"
-	expected := "あいうえお"
-
-	if out := Truncate(s, 10, "..."); out != expected {
-		t.Errorf("Truncate(%q) = %q, want %q", s, out, expected)
-	}
-}
-
-func TestTruncate(t *testing.T) {
-	s := "あいうえおあいうえおえおおおおおおおおおおおおおおおおおおおおおおおおおおおおおお"
-	expected := "あいうえおあいうえおえおおおおおおおおおおおおおおおおおおおおおおおおおおお..."
-	out := Truncate(s, 80, "...")
-	if out != expected {
-		t.Errorf("Truncate(%q) = %q, want %q", s, out, expected)
-	}
-	width := StringWidth(out)
-	if width != 79 {
-		t.Errorf("width of Truncate(%q) should be %d, but %d", s, 79, width)
-	}
-}
-
-func TestTruncateFit(t *testing.T) {
-	s := "aあいうえおあいうえおえおおおおおおおおおおおおおおおおおおおおおおおおおおおおおお"
-	expected := "aあいうえおあいうえおえおおおおおおおおおおおおおおおおおおおおおおおおおおお..."
-
-	out := Truncate(s, 80, "...")
-	if out != expected {
-		t.Errorf("Truncate(%q) = %q, want %q", s, out, expected)
-	}
-	width := StringWidth(out)
-	if width != 80 {
-		t.Errorf("width of Truncate(%q) should be %d, but %d", s, 80, width)
-	}
-}
-
-func TestTruncateJustFit(t *testing.T) {
-	s := "あいうえおあいうえおえおおおおおおおおおおおおおおおおおおおおおおおおおおおおお"
-	expected := "あいうえおあいうえおえおおおおおおおおおおおおおおおおおおおおおおおおおおおおお"
-
-	out := Truncate(s, 80, "...")
-	if out != expected {
-		t.Errorf("Truncate(%q) = %q, want %q", s, out, expected)
-	}
-	width := StringWidth(out)
-	if width != 80 {
-		t.Errorf("width of Truncate(%q) should be %d, but %d", s, 80, width)
-	}
-}
-
-func TestWrap(t *testing.T) {
-	s := `東京特許許可局局長はよく柿喰う客だ/東京特許許可局局長はよく柿喰う客だ
-123456789012345678901234567890
-
-END`
-	expected := `東京特許許可局局長はよく柿喰う
-客だ/東京特許許可局局長はよく
-柿喰う客だ
-123456789012345678901234567890
-
-END`
-
-	if out := Wrap(s, 30); out != expected {
-		t.Errorf("Wrap(%q) = %q, want %q", s, out, expected)
-	}
-}
-
-func TestTruncateNoNeeded(t *testing.T) {
-	s := "あいうえおあい"
-	expected := "あいうえおあい"
-
-	if out := Truncate(s, 80, "..."); out != expected {
-		t.Errorf("Truncate(%q) = %q, want %q", s, out, expected)
-	}
-}
-
-var isneutralwidthtests = []struct {
-	in  rune
-	out bool
-}{
-	{'→', false},
-	{'┊', false},
-	{'┈', false},
-	{'~', false},
-	{'└', false},
-	{'⣀', true},
-	{'⣀', true},
-}
-
-func TestIsNeutralWidth(t *testing.T) {
-	for _, tt := range isneutralwidthtests {
-		if out := IsNeutralWidth(tt.in); out != tt.out {
-			t.Errorf("IsNeutralWidth(%q) = %v, want %v", tt.in, out, tt.out)
-		}
-	}
-}
-
-func TestFillLeft(t *testing.T) {
-	s := "あxいうえお"
-	expected := "    あxいうえお"
-
-	if out := FillLeft(s, 15); out != expected {
-		t.Errorf("FillLeft(%q) = %q, want %q", s, out, expected)
-	}
-}
-
-func TestFillLeftFit(t *testing.T) {
-	s := "あいうえお"
-	expected := "あいうえお"
-
-	if out := FillLeft(s, 10); out != expected {
-		t.Errorf("FillLeft(%q) = %q, want %q", s, out, expected)
-	}
-}
-
-func TestFillRight(t *testing.T) {
-	s := "あxいうえお"
-	expected := "あxいうえお    "
-
-	if out := FillRight(s, 15); out != expected {
-		t.Errorf("FillRight(%q) = %q, want %q", s, out, expected)
-	}
-}
-
-func TestFillRightFit(t *testing.T) {
-	s := "あいうえお"
-	expected := "あいうえお"
-
-	if out := FillRight(s, 10); out != expected {
-		t.Errorf("FillRight(%q) = %q, want %q", s, out, expected)
-	}
-}
-
-func TestEnv(t *testing.T) {
-	old := os.Getenv("RUNEWIDTH_EASTASIAN")
-	defer os.Setenv("RUNEWIDTH_EASTASIAN", old)
-
-	os.Setenv("RUNEWIDTH_EASTASIAN", "1")
-
-	if w := RuneWidth('│'); w != 1 {
-		t.Errorf("RuneWidth('│') = %d, want %d", w, 1)
-	}
-}
diff --git a/vendor/github.com/mattn/go-shellwords/shellwords.go b/vendor/github.com/mattn/go-shellwords/shellwords.go
index 96feca7..1078039 100644
--- a/vendor/github.com/mattn/go-shellwords/shellwords.go
+++ b/vendor/github.com/mattn/go-shellwords/shellwords.go
@@ -44,7 +44,7 @@ func NewParser() *Parser {
 func (p *Parser) Parse(line string) ([]string, error) {
 	args := []string{}
 	buf := ""
-	var escaped, doubleQuoted, singleQuoted, backQuote, dollarQuote bool
+	var escaped, doubleQuoted, singleQuoted, backQuote bool
 	backtick := ""
 
 	pos := -1
@@ -68,7 +68,7 @@ loop:
 		}
 
 		if isSpace(r) {
-			if singleQuoted || doubleQuoted || backQuote || dollarQuote {
+			if singleQuoted || doubleQuoted || backQuote {
 				buf += string(r)
 				backtick += string(r)
 			} else if got {
@@ -84,7 +84,7 @@ loop:
 
 		switch r {
 		case '`':
-			if !singleQuoted && !doubleQuoted && !dollarQuote {
+			if !singleQuoted && !doubleQuoted {
 				if p.ParseBacktick {
 					if backQuote {
 						out, err := shellRun(backtick)
@@ -100,51 +100,18 @@ loop:
 				backtick = ""
 				backQuote = !backQuote
 			}
-		case ')':
-			if !singleQuoted && !doubleQuoted && !backQuote {
-				if p.ParseBacktick {
-					if dollarQuote {
-						out, err := shellRun(backtick)
-						if err != nil {
-							return nil, err
-						}
-						buf = out
-					}
-					backtick = ""
-					dollarQuote = !dollarQuote
-					continue
-				}
-				backtick = ""
-				dollarQuote = !dollarQuote
-			}
-		case '(':
-			if !singleQuoted && !doubleQuoted && !backQuote {
-				if !dollarQuote && len(buf) > 0 && buf == "$" {
-					dollarQuote = true
-					buf += "("
-					continue
-				} else {
-					return nil, errors.New("invalid command line string")
-				}
-			}
 		case '"':
-			if !singleQuoted && !dollarQuote {
+			if !singleQuoted {
 				doubleQuoted = !doubleQuoted
 				continue
 			}
 		case '\'':
-			if !doubleQuoted && !dollarQuote {
+			if !doubleQuoted {
 				singleQuoted = !singleQuoted
 				continue
 			}
 		case ';', '&', '|', '<', '>':
 			if !(escaped || singleQuoted || doubleQuoted || backQuote) {
-				if r == '>' {
-					if c := buf[0]; '0' <= c && c <= '9' {
-						i -= 1
-						got = false
-					}
-				}
 				pos = i
 				break loop
 			}
@@ -152,7 +119,7 @@ loop:
 
 		got = true
 		buf += string(r)
-		if backQuote || dollarQuote {
+		if backQuote {
 			backtick += string(r)
 		}
 	}
@@ -164,7 +131,7 @@ loop:
 		args = append(args, buf)
 	}
 
-	if escaped || singleQuoted || doubleQuoted || backQuote || dollarQuote {
+	if escaped || singleQuoted || doubleQuoted || backQuote {
 		return nil, errors.New("invalid command line string")
 	}
 
diff --git a/vendor/github.com/mattn/go-shellwords/util_go15.go b/vendor/github.com/mattn/go-shellwords/util_go15.go
deleted file mode 100644
index 180f00f..0000000
--- a/vendor/github.com/mattn/go-shellwords/util_go15.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// +build !go1.6
-
-package shellwords
-
-import (
-	"os"
-	"os/exec"
-	"runtime"
-	"strings"
-)
-
-func shellRun(line string) (string, error) {
-	var b []byte
-	var err error
-	if runtime.GOOS == "windows" {
-		b, err = exec.Command(os.Getenv("COMSPEC"), "/c", line).Output()
-	} else {
-		b, err = exec.Command(os.Getenv("SHELL"), "-c", line).Output()
-	}
-	if err != nil {
-		return "", err
-	}
-	return strings.TrimSpace(string(b)), nil
-}
diff --git a/vendor/github.com/mattn/go-shellwords/util_posix.go b/vendor/github.com/mattn/go-shellwords/util_posix.go
index eaf1011..4f8ac55 100644
--- a/vendor/github.com/mattn/go-shellwords/util_posix.go
+++ b/vendor/github.com/mattn/go-shellwords/util_posix.go
@@ -1,4 +1,4 @@
-// +build !windows,go1.6
+// +build !windows
 
 package shellwords
 
@@ -13,9 +13,6 @@ func shellRun(line string) (string, error) {
 	shell := os.Getenv("SHELL")
 	b, err := exec.Command(shell, "-c", line).Output()
 	if err != nil {
-		if eerr, ok := err.(*exec.ExitError); ok {
-			b = eerr.Stderr
-		}
 		return "", errors.New(err.Error() + ":" + string(b))
 	}
 	return strings.TrimSpace(string(b)), nil
diff --git a/vendor/github.com/mattn/go-shellwords/util_windows.go b/vendor/github.com/mattn/go-shellwords/util_windows.go
index e46f89a..7cad4cf 100644
--- a/vendor/github.com/mattn/go-shellwords/util_windows.go
+++ b/vendor/github.com/mattn/go-shellwords/util_windows.go
@@ -1,5 +1,3 @@
-// +build windows,go1.6
-
 package shellwords
 
 import (
@@ -13,9 +11,6 @@ func shellRun(line string) (string, error) {
 	shell := os.Getenv("COMSPEC")
 	b, err := exec.Command(shell, "/c", line).Output()
 	if err != nil {
-		if eerr, ok := err.(*exec.ExitError); ok {
-			b = eerr.Stderr
-		}
 		return "", errors.New(err.Error() + ":" + string(b))
 	}
 	return strings.TrimSpace(string(b)), nil
diff --git a/vendor/github.com/mitchellh/go-homedir/homedir.go b/vendor/github.com/mitchellh/go-homedir/homedir.go
index 47e1f9e..fb87bef 100644
--- a/vendor/github.com/mitchellh/go-homedir/homedir.go
+++ b/vendor/github.com/mitchellh/go-homedir/homedir.go
@@ -77,33 +77,51 @@ func Expand(path string) (string, error) {
 }
 
 func dirUnix() (string, error) {
+	homeEnv := "HOME"
+	if runtime.GOOS == "plan9" {
+		// On plan9, env vars are lowercase.
+		homeEnv = "home"
+	}
+
 	// First prefer the HOME environmental variable
-	if home := os.Getenv("HOME"); home != "" {
+	if home := os.Getenv(homeEnv); home != "" {
 		return home, nil
 	}
 
-	// If that fails, try getent
 	var stdout bytes.Buffer
-	cmd := exec.Command("getent", "passwd", strconv.Itoa(os.Getuid()))
-	cmd.Stdout = &stdout
-	if err := cmd.Run(); err != nil {
-		// If the error is ErrNotFound, we ignore it. Otherwise, return it.
-		if err != exec.ErrNotFound {
-			return "", err
+
+	// If that fails, try OS specific commands
+	if runtime.GOOS == "darwin" {
+		cmd := exec.Command("sh", "-c", `dscl -q . -read /Users/"$(whoami)" NFSHomeDirectory | sed 's/^[^ ]*: //'`)
+		cmd.Stdout = &stdout
+		if err := cmd.Run(); err == nil {
+			result := strings.TrimSpace(stdout.String())
+			if result != "" {
+				return result, nil
+			}
 		}
 	} else {
-		if passwd := strings.TrimSpace(stdout.String()); passwd != "" {
-			// username:password:uid:gid:gecos:home:shell
-			passwdParts := strings.SplitN(passwd, ":", 7)
-			if len(passwdParts) > 5 {
-				return passwdParts[5], nil
+		cmd := exec.Command("getent", "passwd", strconv.Itoa(os.Getuid()))
+		cmd.Stdout = &stdout
+		if err := cmd.Run(); err != nil {
+			// If the error is ErrNotFound, we ignore it. Otherwise, return it.
+			if err != exec.ErrNotFound {
+				return "", err
+			}
+		} else {
+			if passwd := strings.TrimSpace(stdout.String()); passwd != "" {
+				// username:password:uid:gid:gecos:home:shell
+				passwdParts := strings.SplitN(passwd, ":", 7)
+				if len(passwdParts) > 5 {
+					return passwdParts[5], nil
+				}
 			}
 		}
 	}
 
 	// If all else fails, try the shell
 	stdout.Reset()
-	cmd = exec.Command("sh", "-c", "cd && pwd")
+	cmd := exec.Command("sh", "-c", "cd && pwd")
 	cmd.Stdout = &stdout
 	if err := cmd.Run(); err != nil {
 		return "", err
@@ -123,14 +141,16 @@ func dirWindows() (string, error) {
 		return home, nil
 	}
 
+	// Prefer standard environment variable USERPROFILE
+	if home := os.Getenv("USERPROFILE"); home != "" {
+		return home, nil
+	}
+
 	drive := os.Getenv("HOMEDRIVE")
 	path := os.Getenv("HOMEPATH")
 	home := drive + path
 	if drive == "" || path == "" {
-		home = os.Getenv("USERPROFILE")
-	}
-	if home == "" {
-		return "", errors.New("HOMEDRIVE, HOMEPATH, and USERPROFILE are blank")
+		return "", errors.New("HOMEDRIVE, HOMEPATH, or USERPROFILE are blank")
 	}
 
 	return home, nil
diff --git a/vendor/github.com/olekukonko/tablewriter/README.md b/vendor/github.com/olekukonko/tablewriter/README.md
index 59cb86c..d44d31a 100644
--- a/vendor/github.com/olekukonko/tablewriter/README.md
+++ b/vendor/github.com/olekukonko/tablewriter/README.md
@@ -115,7 +115,7 @@ table.SetRowLine(true)         // Enable row line
 
 // Change table lines
 table.SetCenterSeparator("*")
-table.SetColumnSeparator("‡")
+table.SetColumnSeparator("╪")
 table.SetRowSeparator("-")
 
 table.SetAlignment(tablewriter.ALIGN_LEFT)
diff --git a/vendor/github.com/olekukonko/tablewriter/csv2table/README.md b/vendor/github.com/olekukonko/tablewriter/csv2table/README.md
deleted file mode 100644
index 6cf5628..0000000
--- a/vendor/github.com/olekukonko/tablewriter/csv2table/README.md
+++ /dev/null
@@ -1,43 +0,0 @@
-ASCII Table Writer Tool
-=========
-
-Generate ASCII table on the fly via command line ...  Installation is simple as
-
-#### Get Tool
-
-    go get  github.com/olekukonko/tablewriter/csv2table
-
-#### Install Tool
-
-    go install  github.com/olekukonko/tablewriter/csv2table
-
-
-#### Usage
-
-    csv2table -f test.csv
-
-#### Support for Piping
-
-    cat test.csv | csv2table -p=true
-
-#### Output
-
-```
-+------------+-----------+---------+
-| FIRST NAME | LAST NAME |   SSN   |
-+------------+-----------+---------+
-|    John    |   Barry   |  123456 |
-|   Kathy    |   Smith   |  687987 |
-|    Bob     | McCornick | 3979870 |
-+------------+-----------+---------+
-```
-
-#### Another Piping with Header set to `false`
-
-    echo dance,with,me | csv2table -p=true -h=false
-
-#### Output
-
-    +-------+------+-----+
-    | dance | with | me  |
-    +-------+------+-----+
diff --git a/vendor/github.com/olekukonko/tablewriter/csv2table/csv2table.go b/vendor/github.com/olekukonko/tablewriter/csv2table/csv2table.go
deleted file mode 100644
index 5e1d7f2..0000000
--- a/vendor/github.com/olekukonko/tablewriter/csv2table/csv2table.go
+++ /dev/null
@@ -1,85 +0,0 @@
-package main
-
-import (
-	"encoding/csv"
-	"flag"
-	"fmt"
-	"io"
-	"os"
-	"unicode/utf8"
-
-	"github.com/olekukonko/tablewriter"
-)
-
-var (
-	fileName  = flag.String("f", "", "Set file with  eg. sample.csv")
-	delimiter = flag.String("d", ",", "Set CSV File delimiter eg. ,|;|\t ")
-	header    = flag.Bool("h", true, "Set header options eg. true|false ")
-	align     = flag.String("a", "none", "Set aligmement with eg. none|left|right|center")
-	pipe      = flag.Bool("p", false, "Suport for Piping from STDIN")
-	border    = flag.Bool("b", true, "Enable / disable table border")
-)
-
-func main() {
-	flag.Parse()
-	fmt.Println()
-	if *pipe || hasArg("-p") {
-		process(os.Stdin)
-	} else {
-		if *fileName == "" {
-			fmt.Fprintf(os.Stderr, "Usage of %s:\n", os.Args[0])
-			flag.PrintDefaults()
-			fmt.Println()
-			os.Exit(1)
-		}
-		processFile()
-	}
-	fmt.Println()
-}
-
-func hasArg(name string) bool {
-	for _, v := range os.Args {
-		if name == v {
-			return true
-		}
-	}
-	return false
-}
-func processFile() {
-	r, err := os.Open(*fileName)
-	if err != nil {
-		exit(err)
-	}
-	defer r.Close()
-	process(r)
-}
-func process(r io.Reader) {
-	csvReader := csv.NewReader(r)
-	rune, size := utf8.DecodeRuneInString(*delimiter)
-	if size == 0 {
-		rune = ','
-	}
-	csvReader.Comma = rune
-
-	table, err := tablewriter.NewCSVReader(os.Stdout, csvReader, *header)
-
-	if err != nil {
-		exit(err)
-	}
-
-	switch *align {
-	case "left":
-		table.SetAlignment(tablewriter.ALIGN_LEFT)
-	case "right":
-		table.SetAlignment(tablewriter.ALIGN_RIGHT)
-	case "center":
-		table.SetAlignment(tablewriter.ALIGN_CENTER)
-	}
-	table.SetBorder(*border)
-	table.Render()
-}
-
-func exit(err error) {
-	fmt.Fprintf(os.Stderr, "#Error : %s", err)
-	os.Exit(1)
-}
diff --git a/vendor/github.com/olekukonko/tablewriter/table_test.go b/vendor/github.com/olekukonko/tablewriter/table_test.go
deleted file mode 100644
index 39fdb3c..0000000
--- a/vendor/github.com/olekukonko/tablewriter/table_test.go
+++ /dev/null
@@ -1,1055 +0,0 @@
-// Copyright 2014 Oleku Konko All rights reserved.
-// Use of this source code is governed by a MIT
-// license that can be found in the LICENSE file.
-
-// This module is a Table Writer  API for the Go Programming Language.
-// The protocols were written in pure Go and works on windows and unix systems
-
-package tablewriter
-
-import (
-	"bytes"
-	"fmt"
-	"io"
-	"os"
-	"reflect"
-	"strings"
-	"testing"
-)
-
-func checkEqual(t *testing.T, got, want interface{}, msgs ...interface{}) {
-	if !reflect.DeepEqual(got, want) {
-		buf := bytes.Buffer{}
-		buf.WriteString("got:\n[%v]\nwant:\n[%v]\n")
-		for _, v := range msgs {
-			buf.WriteString(v.(string))
-		}
-		t.Errorf(buf.String(), got, want)
-	}
-}
-
-func ExampleShort() {
-	data := [][]string{
-		{"A", "The Good", "500"},
-		{"B", "The Very very Bad Man", "288"},
-		{"C", "The Ugly", "120"},
-		{"D", "The Gopher", "800"},
-	}
-
-	table := NewWriter(os.Stdout)
-	table.SetHeader([]string{"Name", "Sign", "Rating"})
-
-	for _, v := range data {
-		table.Append(v)
-	}
-	table.Render()
-
-	// Output: +------+-----------------------+--------+
-	// | NAME |         SIGN          | RATING |
-	// +------+-----------------------+--------+
-	// | A    | The Good              |    500 |
-	// | B    | The Very very Bad Man |    288 |
-	// | C    | The Ugly              |    120 |
-	// | D    | The Gopher            |    800 |
-	// +------+-----------------------+--------+
-}
-
-func ExampleLong() {
-	data := [][]string{
-		{"Learn East has computers with adapted keyboards with enlarged print etc", "  Some Data  ", " Another Data"},
-		{"Instead of lining up the letters all ", "the way across, he splits the keyboard in two", "Like most ergonomic keyboards", "See Data"},
-	}
-
-	table := NewWriter(os.Stdout)
-	table.SetHeader([]string{"Name", "Sign", "Rating"})
-	table.SetCenterSeparator("*")
-	table.SetRowSeparator("=")
-
-	for _, v := range data {
-		table.Append(v)
-	}
-	table.Render()
-
-	// Output: *================================*================================*===============================*==========*
-	// |              NAME              |              SIGN              |            RATING             |          |
-	// *================================*================================*===============================*==========*
-	// | Learn East has computers       |   Some Data                    |  Another Data                 |
-	// | with adapted keyboards with    |                                |                               |
-	// | enlarged print etc             |                                |                               |
-	// | Instead of lining up the       | the way across, he splits the  | Like most ergonomic keyboards | See Data |
-	// | letters all                    | keyboard in two                |                               |          |
-	// *================================*================================*===============================*==========*
-}
-
-func ExampleCSV() {
-	table, _ := NewCSV(os.Stdout, "testdata/test.csv", true)
-	table.SetCenterSeparator("*")
-	table.SetRowSeparator("=")
-
-	table.Render()
-
-	// Output: *============*===========*=========*
-	// | FIRST NAME | LAST NAME |   SSN   |
-	// *============*===========*=========*
-	// | John       | Barry     |  123456 |
-	// | Kathy      | Smith     |  687987 |
-	// | Bob        | McCornick | 3979870 |
-	// *============*===========*=========*
-}
-
-// TestNumLines to test the numbers of lines
-func TestNumLines(t *testing.T) {
-	data := [][]string{
-		{"A", "The Good", "500"},
-		{"B", "The Very very Bad Man", "288"},
-		{"C", "The Ugly", "120"},
-		{"D", "The Gopher", "800"},
-	}
-
-	buf := &bytes.Buffer{}
-	table := NewWriter(buf)
-	table.SetHeader([]string{"Name", "Sign", "Rating"})
-
-	for i, v := range data {
-		table.Append(v)
-		checkEqual(t, table.NumLines(), i+1, "Number of lines failed")
-	}
-
-	checkEqual(t, table.NumLines(), len(data), "Number of lines failed")
-}
-
-func TestCSVInfo(t *testing.T) {
-	buf := &bytes.Buffer{}
-	table, err := NewCSV(buf, "testdata/test_info.csv", true)
-	if err != nil {
-		t.Error(err)
-		return
-	}
-	table.SetAlignment(ALIGN_LEFT)
-	table.SetBorder(false)
-	table.Render()
-
-	got := buf.String()
-	want := `   FIELD   |     TYPE     | NULL | KEY | DEFAULT |     EXTRA       
-+----------+--------------+------+-----+---------+----------------+
-  user_id  | smallint(5)  | NO   | PRI | NULL    | auto_increment  
-  username | varchar(10)  | NO   |     | NULL    |                 
-  password | varchar(100) | NO   |     | NULL    |                 
-`
-	checkEqual(t, got, want, "CSV info failed")
-}
-
-func TestCSVSeparator(t *testing.T) {
-	buf := &bytes.Buffer{}
-	table, err := NewCSV(buf, "testdata/test.csv", true)
-	if err != nil {
-		t.Error(err)
-		return
-	}
-	table.SetRowLine(true)
-	table.SetCenterSeparator("+")
-	table.SetColumnSeparator("|")
-	table.SetRowSeparator("-")
-	table.SetAlignment(ALIGN_LEFT)
-	table.Render()
-
-	want := `+------------+-----------+---------+
-| FIRST NAME | LAST NAME |   SSN   |
-+------------+-----------+---------+
-| John       | Barry     | 123456  |
-+------------+-----------+---------+
-| Kathy      | Smith     | 687987  |
-+------------+-----------+---------+
-| Bob        | McCornick | 3979870 |
-+------------+-----------+---------+
-`
-
-	checkEqual(t, buf.String(), want, "CSV info failed")
-}
-
-func TestNoBorder(t *testing.T) {
-	data := [][]string{
-		{"1/1/2014", "Domain name", "2233", "$10.98"},
-		{"1/1/2014", "January Hosting", "2233", "$54.95"},
-		{"", "    (empty)\n    (empty)", "", ""},
-		{"1/4/2014", "February Hosting", "2233", "$51.00"},
-		{"1/4/2014", "February Extra Bandwidth", "2233", "$30.00"},
-		{"1/4/2014", "    (Discount)", "2233", "-$1.00"},
-	}
-
-	var buf bytes.Buffer
-	table := NewWriter(&buf)
-	table.SetAutoWrapText(false)
-	table.SetHeader([]string{"Date", "Description", "CV2", "Amount"})
-	table.SetFooter([]string{"", "", "Total", "$145.93"}) // Add Footer
-	table.SetBorder(false)                                // Set Border to false
-	table.AppendBulk(data)                                // Add Bulk Data
-	table.Render()
-
-	want := `    DATE   |       DESCRIPTION        |  CV2  | AMOUNT   
-+----------+--------------------------+-------+---------+
-  1/1/2014 | Domain name              |  2233 | $10.98   
-  1/1/2014 | January Hosting          |  2233 | $54.95   
-           |     (empty)              |       |          
-           |     (empty)              |       |          
-  1/4/2014 | February Hosting         |  2233 | $51.00   
-  1/4/2014 | February Extra Bandwidth |  2233 | $30.00   
-  1/4/2014 |     (Discount)           |  2233 | -$1.00   
-+----------+--------------------------+-------+---------+
-                                        TOTAL | $145 93  
-                                      +-------+---------+
-`
-
-	checkEqual(t, buf.String(), want, "border table rendering failed")
-}
-
-func TestWithBorder(t *testing.T) {
-	data := [][]string{
-		{"1/1/2014", "Domain name", "2233", "$10.98"},
-		{"1/1/2014", "January Hosting", "2233", "$54.95"},
-		{"", "    (empty)\n    (empty)", "", ""},
-		{"1/4/2014", "February Hosting", "2233", "$51.00"},
-		{"1/4/2014", "February Extra Bandwidth", "2233", "$30.00"},
-		{"1/4/2014", "    (Discount)", "2233", "-$1.00"},
-	}
-
-	var buf bytes.Buffer
-	table := NewWriter(&buf)
-	table.SetAutoWrapText(false)
-	table.SetHeader([]string{"Date", "Description", "CV2", "Amount"})
-	table.SetFooter([]string{"", "", "Total", "$145.93"}) // Add Footer
-	table.AppendBulk(data)                                // Add Bulk Data
-	table.Render()
-
-	want := `+----------+--------------------------+-------+---------+
-|   DATE   |       DESCRIPTION        |  CV2  | AMOUNT  |
-+----------+--------------------------+-------+---------+
-| 1/1/2014 | Domain name              |  2233 | $10.98  |
-| 1/1/2014 | January Hosting          |  2233 | $54.95  |
-|          |     (empty)              |       |         |
-|          |     (empty)              |       |         |
-| 1/4/2014 | February Hosting         |  2233 | $51.00  |
-| 1/4/2014 | February Extra Bandwidth |  2233 | $30.00  |
-| 1/4/2014 |     (Discount)           |  2233 | -$1.00  |
-+----------+--------------------------+-------+---------+
-|                                       TOTAL | $145 93 |
-+----------+--------------------------+-------+---------+
-`
-
-	checkEqual(t, buf.String(), want, "border table rendering failed")
-}
-
-func TestPrintingInMarkdown(t *testing.T) {
-	data := [][]string{
-		{"1/1/2014", "Domain name", "2233", "$10.98"},
-		{"1/1/2014", "January Hosting", "2233", "$54.95"},
-		{"1/4/2014", "February Hosting", "2233", "$51.00"},
-		{"1/4/2014", "February Extra Bandwidth", "2233", "$30.00"},
-	}
-
-	var buf bytes.Buffer
-	table := NewWriter(&buf)
-	table.SetHeader([]string{"Date", "Description", "CV2", "Amount"})
-	table.AppendBulk(data) // Add Bulk Data
-	table.SetBorders(Border{Left: true, Top: false, Right: true, Bottom: false})
-	table.SetCenterSeparator("|")
-	table.Render()
-
-	want := `|   DATE   |       DESCRIPTION        | CV2  | AMOUNT |
-|----------|--------------------------|------|--------|
-| 1/1/2014 | Domain name              | 2233 | $10.98 |
-| 1/1/2014 | January Hosting          | 2233 | $54.95 |
-| 1/4/2014 | February Hosting         | 2233 | $51.00 |
-| 1/4/2014 | February Extra Bandwidth | 2233 | $30.00 |
-`
-	checkEqual(t, buf.String(), want, "border table rendering failed")
-}
-
-func TestPrintHeading(t *testing.T) {
-	var buf bytes.Buffer
-	table := NewWriter(&buf)
-	table.SetHeader([]string{"1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c"})
-	table.printHeading()
-	want := `| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C |
-+---+---+---+---+---+---+---+---+---+---+---+---+
-`
-	checkEqual(t, buf.String(), want, "header rendering failed")
-}
-
-func TestPrintHeadingWithoutAutoFormat(t *testing.T) {
-	var buf bytes.Buffer
-	table := NewWriter(&buf)
-	table.SetHeader([]string{"1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c"})
-	table.SetAutoFormatHeaders(false)
-	table.printHeading()
-	want := `| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | a | b | c |
-+---+---+---+---+---+---+---+---+---+---+---+---+
-`
-	checkEqual(t, buf.String(), want, "header rendering failed")
-}
-
-func TestPrintFooter(t *testing.T) {
-	var buf bytes.Buffer
-	table := NewWriter(&buf)
-	table.SetHeader([]string{"1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c"})
-	table.SetFooter([]string{"1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c"})
-	table.printFooter()
-	want := `| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C |
-+---+---+---+---+---+---+---+---+---+---+---+---+
-`
-	checkEqual(t, buf.String(), want, "footer rendering failed")
-}
-
-func TestPrintFooterWithoutAutoFormat(t *testing.T) {
-	var buf bytes.Buffer
-	table := NewWriter(&buf)
-	table.SetAutoFormatHeaders(false)
-	table.SetHeader([]string{"1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c"})
-	table.SetFooter([]string{"1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c"})
-	table.printFooter()
-	want := `| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | a | b | c |
-+---+---+---+---+---+---+---+---+---+---+---+---+
-`
-	checkEqual(t, buf.String(), want, "footer rendering failed")
-}
-
-func TestPrintShortCaption(t *testing.T) {
-	var buf bytes.Buffer
-	data := [][]string{
-		{"A", "The Good", "500"},
-		{"B", "The Very very Bad Man", "288"},
-		{"C", "The Ugly", "120"},
-		{"D", "The Gopher", "800"},
-	}
-
-	table := NewWriter(&buf)
-	table.SetHeader([]string{"Name", "Sign", "Rating"})
-	table.SetCaption(true, "Short caption.")
-
-	for _, v := range data {
-		table.Append(v)
-	}
-	table.Render()
-
-	want := `+------+-----------------------+--------+
-| NAME |         SIGN          | RATING |
-+------+-----------------------+--------+
-| A    | The Good              |    500 |
-| B    | The Very very Bad Man |    288 |
-| C    | The Ugly              |    120 |
-| D    | The Gopher            |    800 |
-+------+-----------------------+--------+
-Short caption.
-`
-	checkEqual(t, buf.String(), want, "long caption for short example rendering failed")
-}
-
-func TestPrintLongCaptionWithShortExample(t *testing.T) {
-	var buf bytes.Buffer
-	data := [][]string{
-		{"A", "The Good", "500"},
-		{"B", "The Very very Bad Man", "288"},
-		{"C", "The Ugly", "120"},
-		{"D", "The Gopher", "800"},
-	}
-
-	table := NewWriter(&buf)
-	table.SetHeader([]string{"Name", "Sign", "Rating"})
-	table.SetCaption(true, "This is a very long caption. The text should wrap. If not, we have a problem that needs to be solved.")
-
-	for _, v := range data {
-		table.Append(v)
-	}
-	table.Render()
-
-	want := `+------+-----------------------+--------+
-| NAME |         SIGN          | RATING |
-+------+-----------------------+--------+
-| A    | The Good              |    500 |
-| B    | The Very very Bad Man |    288 |
-| C    | The Ugly              |    120 |
-| D    | The Gopher            |    800 |
-+------+-----------------------+--------+
-This is a very long caption. The text
-should wrap. If not, we have a problem
-that needs to be solved.
-`
-	checkEqual(t, buf.String(), want, "long caption for short example rendering failed")
-}
-
-func TestPrintCaptionWithFooter(t *testing.T) {
-	data := [][]string{
-		{"1/1/2014", "Domain name", "2233", "$10.98"},
-		{"1/1/2014", "January Hosting", "2233", "$54.95"},
-		{"1/4/2014", "February Hosting", "2233", "$51.00"},
-		{"1/4/2014", "February Extra Bandwidth", "2233", "$30.00"},
-	}
-
-	var buf bytes.Buffer
-	table := NewWriter(&buf)
-	table.SetHeader([]string{"Date", "Description", "CV2", "Amount"})
-	table.SetFooter([]string{"", "", "Total", "$146.93"})                                                  // Add Footer
-	table.SetCaption(true, "This is a very long caption. The text should wrap to the width of the table.") // Add caption
-	table.SetBorder(false)                                                                                 // Set Border to false
-	table.AppendBulk(data)                                                                                 // Add Bulk Data
-	table.Render()
-
-	want := `    DATE   |       DESCRIPTION        |  CV2  | AMOUNT   
-+----------+--------------------------+-------+---------+
-  1/1/2014 | Domain name              |  2233 | $10.98   
-  1/1/2014 | January Hosting          |  2233 | $54.95   
-  1/4/2014 | February Hosting         |  2233 | $51.00   
-  1/4/2014 | February Extra Bandwidth |  2233 | $30.00   
-+----------+--------------------------+-------+---------+
-                                        TOTAL | $146 93  
-                                      +-------+---------+
-This is a very long caption. The text should wrap to the
-width of the table.
-`
-	checkEqual(t, buf.String(), want, "border table rendering failed")
-}
-
-func TestPrintLongCaptionWithLongExample(t *testing.T) {
-	var buf bytes.Buffer
-	data := [][]string{
-		{"Learn East has computers with adapted keyboards with enlarged print etc", "Some Data", "Another Data"},
-		{"Instead of lining up the letters all", "the way across, he splits the keyboard in two", "Like most ergonomic keyboards"},
-	}
-
-	table := NewWriter(&buf)
-	table.SetCaption(true, "This is a very long caption. The text should wrap. If not, we have a problem that needs to be solved.")
-	table.SetHeader([]string{"Name", "Sign", "Rating"})
-
-	for _, v := range data {
-		table.Append(v)
-	}
-	table.Render()
-
-	want := `+--------------------------------+--------------------------------+-------------------------------+
-|              NAME              |              SIGN              |            RATING             |
-+--------------------------------+--------------------------------+-------------------------------+
-| Learn East has computers       | Some Data                      | Another Data                  |
-| with adapted keyboards with    |                                |                               |
-| enlarged print etc             |                                |                               |
-| Instead of lining up the       | the way across, he splits the  | Like most ergonomic keyboards |
-| letters all                    | keyboard in two                |                               |
-+--------------------------------+--------------------------------+-------------------------------+
-This is a very long caption. The text should wrap. If not, we have a problem that needs to be
-solved.
-`
-	checkEqual(t, buf.String(), want, "long caption for long example rendering failed")
-}
-
-func Example_autowrap() {
-	var multiline = `A multiline
-string with some lines being really long.`
-
-	const (
-		testRow = iota
-		testHeader
-		testFooter
-		testFooter2
-	)
-	for mode := testRow; mode <= testFooter2; mode++ {
-		for _, autoFmt := range []bool{false, true} {
-			if mode == testRow && autoFmt {
-				// Nothing special to test, skip
-				continue
-			}
-			for _, autoWrap := range []bool{false, true} {
-				for _, reflow := range []bool{false, true} {
-					if !autoWrap && reflow {
-						// Invalid configuration, skip
-						continue
-					}
-					fmt.Println("mode", mode, "autoFmt", autoFmt, "autoWrap", autoWrap, "reflow", reflow)
-					t := NewWriter(os.Stdout)
-					t.SetAutoFormatHeaders(autoFmt)
-					t.SetAutoWrapText(autoWrap)
-					t.SetReflowDuringAutoWrap(reflow)
-					if mode == testHeader {
-						t.SetHeader([]string{"woo", multiline})
-					} else {
-						t.SetHeader([]string{"woo", "waa"})
-					}
-					if mode == testRow {
-						t.Append([]string{"woo", multiline})
-					} else {
-						t.Append([]string{"woo", "waa"})
-					}
-					if mode == testFooter {
-						t.SetFooter([]string{"woo", multiline})
-					} else if mode == testFooter2 {
-						t.SetFooter([]string{"", multiline})
-					} else {
-						t.SetFooter([]string{"woo", "waa"})
-					}
-					t.Render()
-				}
-			}
-		}
-		fmt.Println()
-	}
-
-	// Output:
-	// mode 0 autoFmt false autoWrap false reflow false
-	// +-----+-------------------------------------------+
-	// | woo |                    waa                    |
-	// +-----+-------------------------------------------+
-	// | woo | A multiline                               |
-	// |     | string with some lines being really long. |
-	// +-----+-------------------------------------------+
-	// | woo |                    waa                    |
-	// +-----+-------------------------------------------+
-	// mode 0 autoFmt false autoWrap true reflow false
-	// +-----+--------------------------------+
-	// | woo |              waa               |
-	// +-----+--------------------------------+
-	// | woo | A multiline                    |
-	// |     |                                |
-	// |     | string with some lines being   |
-	// |     | really long.                   |
-	// +-----+--------------------------------+
-	// | woo |              waa               |
-	// +-----+--------------------------------+
-	// mode 0 autoFmt false autoWrap true reflow true
-	// +-----+--------------------------------+
-	// | woo |              waa               |
-	// +-----+--------------------------------+
-	// | woo | A multiline string with some   |
-	// |     | lines being really long.       |
-	// +-----+--------------------------------+
-	// | woo |              waa               |
-	// +-----+--------------------------------+
-	//
-	// mode 1 autoFmt false autoWrap false reflow false
-	// +-----+-------------------------------------------+
-	// | woo |                A multiline                |
-	// |     | string with some lines being really long. |
-	// +-----+-------------------------------------------+
-	// | woo | waa                                       |
-	// +-----+-------------------------------------------+
-	// | woo |                    waa                    |
-	// +-----+-------------------------------------------+
-	// mode 1 autoFmt false autoWrap true reflow false
-	// +-----+--------------------------------+
-	// | woo |          A multiline           |
-	// |     |                                |
-	// |     |  string with some lines being  |
-	// |     |          really long.          |
-	// +-----+--------------------------------+
-	// | woo | waa                            |
-	// +-----+--------------------------------+
-	// | woo |              waa               |
-	// +-----+--------------------------------+
-	// mode 1 autoFmt false autoWrap true reflow true
-	// +-----+--------------------------------+
-	// | woo |  A multiline string with some  |
-	// |     |    lines being really long.    |
-	// +-----+--------------------------------+
-	// | woo | waa                            |
-	// +-----+--------------------------------+
-	// | woo |              waa               |
-	// +-----+--------------------------------+
-	// mode 1 autoFmt true autoWrap false reflow false
-	// +-----+-------------------------------------------+
-	// | WOO |                A MULTILINE                |
-	// |     | STRING WITH SOME LINES BEING REALLY LONG  |
-	// +-----+-------------------------------------------+
-	// | woo | waa                                       |
-	// +-----+-------------------------------------------+
-	// | WOO |                    WAA                    |
-	// +-----+-------------------------------------------+
-	// mode 1 autoFmt true autoWrap true reflow false
-	// +-----+--------------------------------+
-	// | WOO |          A MULTILINE           |
-	// |     |                                |
-	// |     |  STRING WITH SOME LINES BEING  |
-	// |     |          REALLY LONG           |
-	// +-----+--------------------------------+
-	// | woo | waa                            |
-	// +-----+--------------------------------+
-	// | WOO |              WAA               |
-	// +-----+--------------------------------+
-	// mode 1 autoFmt true autoWrap true reflow true
-	// +-----+--------------------------------+
-	// | WOO |  A MULTILINE STRING WITH SOME  |
-	// |     |    LINES BEING REALLY LONG     |
-	// +-----+--------------------------------+
-	// | woo | waa                            |
-	// +-----+--------------------------------+
-	// | WOO |              WAA               |
-	// +-----+--------------------------------+
-	//
-	// mode 2 autoFmt false autoWrap false reflow false
-	// +-----+-------------------------------------------+
-	// | woo |                    waa                    |
-	// +-----+-------------------------------------------+
-	// | woo | waa                                       |
-	// +-----+-------------------------------------------+
-	// | woo |                A multiline                |
-	// |     | string with some lines being really long. |
-	// +-----+-------------------------------------------+
-	// mode 2 autoFmt false autoWrap true reflow false
-	// +-----+--------------------------------+
-	// | woo |              waa               |
-	// +-----+--------------------------------+
-	// | woo | waa                            |
-	// +-----+--------------------------------+
-	// | woo |          A multiline           |
-	// |     |                                |
-	// |     |  string with some lines being  |
-	// |     |          really long.          |
-	// +-----+--------------------------------+
-	// mode 2 autoFmt false autoWrap true reflow true
-	// +-----+--------------------------------+
-	// | woo |              waa               |
-	// +-----+--------------------------------+
-	// | woo | waa                            |
-	// +-----+--------------------------------+
-	// | woo |  A multiline string with some  |
-	// |     |    lines being really long.    |
-	// +-----+--------------------------------+
-	// mode 2 autoFmt true autoWrap false reflow false
-	// +-----+-------------------------------------------+
-	// | WOO |                    WAA                    |
-	// +-----+-------------------------------------------+
-	// | woo | waa                                       |
-	// +-----+-------------------------------------------+
-	// | WOO |                A MULTILINE                |
-	// |     | STRING WITH SOME LINES BEING REALLY LONG  |
-	// +-----+-------------------------------------------+
-	// mode 2 autoFmt true autoWrap true reflow false
-	// +-----+--------------------------------+
-	// | WOO |              WAA               |
-	// +-----+--------------------------------+
-	// | woo | waa                            |
-	// +-----+--------------------------------+
-	// | WOO |          A MULTILINE           |
-	// |     |                                |
-	// |     |  STRING WITH SOME LINES BEING  |
-	// |     |          REALLY LONG           |
-	// +-----+--------------------------------+
-	// mode 2 autoFmt true autoWrap true reflow true
-	// +-----+--------------------------------+
-	// | WOO |              WAA               |
-	// +-----+--------------------------------+
-	// | woo | waa                            |
-	// +-----+--------------------------------+
-	// | WOO |  A MULTILINE STRING WITH SOME  |
-	// |     |    LINES BEING REALLY LONG     |
-	// +-----+--------------------------------+
-	//
-	// mode 3 autoFmt false autoWrap false reflow false
-	// +-----+-------------------------------------------+
-	// | woo |                    waa                    |
-	// +-----+-------------------------------------------+
-	// | woo | waa                                       |
-	// +-----+-------------------------------------------+
-	// |                      A multiline                |
-	// |       string with some lines being really long. |
-	// +-----+-------------------------------------------+
-	// mode 3 autoFmt false autoWrap true reflow false
-	// +-----+--------------------------------+
-	// | woo |              waa               |
-	// +-----+--------------------------------+
-	// | woo | waa                            |
-	// +-----+--------------------------------+
-	// |                A multiline           |
-	// |                                      |
-	// |        string with some lines being  |
-	// |                really long.          |
-	// +-----+--------------------------------+
-	// mode 3 autoFmt false autoWrap true reflow true
-	// +-----+--------------------------------+
-	// | woo |              waa               |
-	// +-----+--------------------------------+
-	// | woo | waa                            |
-	// +-----+--------------------------------+
-	// |        A multiline string with some  |
-	// |          lines being really long.    |
-	// +-----+--------------------------------+
-	// mode 3 autoFmt true autoWrap false reflow false
-	// +-----+-------------------------------------------+
-	// | WOO |                    WAA                    |
-	// +-----+-------------------------------------------+
-	// | woo | waa                                       |
-	// +-----+-------------------------------------------+
-	// |                      A MULTILINE                |
-	// |       STRING WITH SOME LINES BEING REALLY LONG  |
-	// +-----+-------------------------------------------+
-	// mode 3 autoFmt true autoWrap true reflow false
-	// +-----+--------------------------------+
-	// | WOO |              WAA               |
-	// +-----+--------------------------------+
-	// | woo | waa                            |
-	// +-----+--------------------------------+
-	// |                A MULTILINE           |
-	// |                                      |
-	// |        STRING WITH SOME LINES BEING  |
-	// |                REALLY LONG           |
-	// +-----+--------------------------------+
-	// mode 3 autoFmt true autoWrap true reflow true
-	// +-----+--------------------------------+
-	// | WOO |              WAA               |
-	// +-----+--------------------------------+
-	// | woo | waa                            |
-	// +-----+--------------------------------+
-	// |        A MULTILINE STRING WITH SOME  |
-	// |          LINES BEING REALLY LONG     |
-	// +-----+--------------------------------+
-}
-
-func TestPrintLine(t *testing.T) {
-	header := make([]string, 12)
-	val := " "
-	want := ""
-	for i := range header {
-		header[i] = val
-		want = fmt.Sprintf("%s+-%s-", want, strings.Replace(val, " ", "-", -1))
-		val = val + " "
-	}
-	want = want + "+"
-	var buf bytes.Buffer
-	table := NewWriter(&buf)
-	table.SetHeader(header)
-	table.printLine(false)
-	checkEqual(t, buf.String(), want, "line rendering failed")
-}
-
-func TestAnsiStrip(t *testing.T) {
-	header := make([]string, 12)
-	val := " "
-	want := ""
-	for i := range header {
-		header[i] = "\033[43;30m" + val + "\033[00m"
-		want = fmt.Sprintf("%s+-%s-", want, strings.Replace(val, " ", "-", -1))
-		val = val + " "
-	}
-	want = want + "+"
-	var buf bytes.Buffer
-	table := NewWriter(&buf)
-	table.SetHeader(header)
-	table.printLine(false)
-	checkEqual(t, buf.String(), want, "line rendering failed")
-}
-
-func NewCustomizedTable(out io.Writer) *Table {
-	table := NewWriter(out)
-	table.SetCenterSeparator("")
-	table.SetColumnSeparator("")
-	table.SetRowSeparator("")
-	table.SetBorder(false)
-	table.SetAlignment(ALIGN_LEFT)
-	table.SetHeader([]string{})
-	return table
-}
-
-func TestSubclass(t *testing.T) {
-	buf := new(bytes.Buffer)
-	table := NewCustomizedTable(buf)
-
-	data := [][]string{
-		{"A", "The Good", "500"},
-		{"B", "The Very very Bad Man", "288"},
-		{"C", "The Ugly", "120"},
-		{"D", "The Gopher", "800"},
-	}
-
-	for _, v := range data {
-		table.Append(v)
-	}
-	table.Render()
-
-	want := `  A  The Good               500  
-  B  The Very very Bad Man  288  
-  C  The Ugly               120  
-  D  The Gopher             800  
-`
-	checkEqual(t, buf.String(), want, "test subclass failed")
-}
-
-func TestAutoMergeRows(t *testing.T) {
-	data := [][]string{
-		{"A", "The Good", "500"},
-		{"A", "The Very very Bad Man", "288"},
-		{"B", "The Very very Bad Man", "120"},
-		{"B", "The Very very Bad Man", "200"},
-	}
-	var buf bytes.Buffer
-	table := NewWriter(&buf)
-	table.SetHeader([]string{"Name", "Sign", "Rating"})
-
-	for _, v := range data {
-		table.Append(v)
-	}
-	table.SetAutoMergeCells(true)
-	table.Render()
-	want := `+------+-----------------------+--------+
-| NAME |         SIGN          | RATING |
-+------+-----------------------+--------+
-| A    | The Good              |    500 |
-|      | The Very very Bad Man |    288 |
-| B    |                       |    120 |
-|      |                       |    200 |
-+------+-----------------------+--------+
-`
-	got := buf.String()
-	if got != want {
-		t.Errorf("\ngot:\n%s\nwant:\n%s\n", got, want)
-	}
-
-	buf.Reset()
-	table = NewWriter(&buf)
-	table.SetHeader([]string{"Name", "Sign", "Rating"})
-
-	for _, v := range data {
-		table.Append(v)
-	}
-	table.SetAutoMergeCells(true)
-	table.SetRowLine(true)
-	table.Render()
-	want = `+------+-----------------------+--------+
-| NAME |         SIGN          | RATING |
-+------+-----------------------+--------+
-| A    | The Good              |    500 |
-+      +-----------------------+--------+
-|      | The Very very Bad Man |    288 |
-+------+                       +--------+
-| B    |                       |    120 |
-+      +                       +--------+
-|      |                       |    200 |
-+------+-----------------------+--------+
-`
-	checkEqual(t, buf.String(), want)
-
-	buf.Reset()
-	table = NewWriter(&buf)
-	table.SetHeader([]string{"Name", "Sign", "Rating"})
-
-	dataWithlongText := [][]string{
-		{"A", "The Good", "500"},
-		{"A", "The Very very very very very Bad Man", "288"},
-		{"B", "The Very very very very very Bad Man", "120"},
-		{"C", "The Very very Bad Man", "200"},
-	}
-	table.AppendBulk(dataWithlongText)
-	table.SetAutoMergeCells(true)
-	table.SetRowLine(true)
-	table.Render()
-	want = `+------+--------------------------------+--------+
-| NAME |              SIGN              | RATING |
-+------+--------------------------------+--------+
-| A    | The Good                       |    500 |
-+------+--------------------------------+--------+
-| A    | The Very very very very very   |    288 |
-|      | Bad Man                        |        |
-+------+                                +--------+
-| B    |                                |    120 |
-|      |                                |        |
-+------+--------------------------------+--------+
-| C    | The Very very Bad Man          |    200 |
-+------+--------------------------------+--------+
-`
-	checkEqual(t, buf.String(), want)
-}
-
-func TestClearRows(t *testing.T) {
-	data := [][]string{
-		{"1/1/2014", "Domain name", "2233", "$10.98"},
-	}
-
-	var buf bytes.Buffer
-	table := NewWriter(&buf)
-	table.SetAutoWrapText(false)
-	table.SetHeader([]string{"Date", "Description", "CV2", "Amount"})
-	table.SetFooter([]string{"", "", "Total", "$145.93"}) // Add Footer
-	table.AppendBulk(data)                                // Add Bulk Data
-	table.Render()
-
-	originalWant := `+----------+-------------+-------+---------+
-|   DATE   | DESCRIPTION |  CV2  | AMOUNT  |
-+----------+-------------+-------+---------+
-| 1/1/2014 | Domain name |  2233 | $10.98  |
-+----------+-------------+-------+---------+
-|                          TOTAL | $145 93 |
-+----------+-------------+-------+---------+
-`
-	want := originalWant
-
-	checkEqual(t, buf.String(), want, "table clear rows failed")
-
-	buf.Reset()
-	table.ClearRows()
-	table.Render()
-
-	want = `+----------+-------------+-------+---------+
-|   DATE   | DESCRIPTION |  CV2  | AMOUNT  |
-+----------+-------------+-------+---------+
-+----------+-------------+-------+---------+
-|                          TOTAL | $145 93 |
-+----------+-------------+-------+---------+
-`
-
-	checkEqual(t, buf.String(), want, "table clear rows failed")
-
-	buf.Reset()
-	table.AppendBulk(data) // Add Bulk Data
-	table.Render()
-
-	want = `+----------+-------------+-------+---------+
-|   DATE   | DESCRIPTION |  CV2  | AMOUNT  |
-+----------+-------------+-------+---------+
-| 1/1/2014 | Domain name |  2233 | $10.98  |
-+----------+-------------+-------+---------+
-|                          TOTAL | $145 93 |
-+----------+-------------+-------+---------+
-`
-
-	checkEqual(t, buf.String(), want, "table clear rows failed")
-}
-
-func TestClearFooters(t *testing.T) {
-	data := [][]string{
-		{"1/1/2014", "Domain name", "2233", "$10.98"},
-	}
-
-	var buf bytes.Buffer
-	table := NewWriter(&buf)
-	table.SetAutoWrapText(false)
-	table.SetHeader([]string{"Date", "Description", "CV2", "Amount"})
-	table.SetFooter([]string{"", "", "Total", "$145.93"}) // Add Footer
-	table.AppendBulk(data)                                // Add Bulk Data
-	table.Render()
-
-	buf.Reset()
-	table.ClearFooter()
-	table.Render()
-
-	want := `+----------+-------------+-------+---------+
-|   DATE   | DESCRIPTION |  CV2  | AMOUNT  |
-+----------+-------------+-------+---------+
-| 1/1/2014 | Domain name |  2233 | $10.98  |
-+----------+-------------+-------+---------+
-`
-
-	checkEqual(t, buf.String(), want)
-}
-
-func TestMoreDataColumnsThanHeaders(t *testing.T) {
-	var (
-		buf    = &bytes.Buffer{}
-		table  = NewWriter(buf)
-		header = []string{"A", "B", "C"}
-		data   = [][]string{
-			{"a", "b", "c", "d"},
-			{"1", "2", "3", "4"},
-		}
-		want = `+---+---+---+---+
-| A | B | C |   |
-+---+---+---+---+
-| a | b | c | d |
-| 1 | 2 | 3 | 4 |
-+---+---+---+---+
-`
-	)
-	table.SetHeader(header)
-	// table.SetFooter(ctx.tableCtx.footer)
-	table.AppendBulk(data)
-	table.Render()
-
-	checkEqual(t, buf.String(), want)
-}
-
-func TestMoreFooterColumnsThanHeaders(t *testing.T) {
-	var (
-		buf    = &bytes.Buffer{}
-		table  = NewWriter(buf)
-		header = []string{"A", "B", "C"}
-		data   = [][]string{
-			{"a", "b", "c", "d"},
-			{"1", "2", "3", "4"},
-		}
-		footer = []string{"a", "b", "c", "d", "e"}
-		want   = `+---+---+---+---+---+
-| A | B | C |   |   |
-+---+---+---+---+---+
-| a | b | c | d |
-| 1 | 2 | 3 | 4 |
-+---+---+---+---+---+
-| A | B | C | D | E |
-+---+---+---+---+---+
-`
-	)
-	table.SetHeader(header)
-	table.SetFooter(footer)
-	table.AppendBulk(data)
-	table.Render()
-
-	checkEqual(t, buf.String(), want)
-}
-
-func TestSetColMinWidth(t *testing.T) {
-	var (
-		buf    = &bytes.Buffer{}
-		table  = NewWriter(buf)
-		header = []string{"AAA", "BBB", "CCC"}
-		data   = [][]string{
-			{"a", "b", "c"},
-			{"1", "2", "3"},
-		}
-		footer = []string{"a", "b", "cccc"}
-		want   = `+-----+-----+-------+
-| AAA | BBB |  CCC  |
-+-----+-----+-------+
-| a   | b   | c     |
-|   1 |   2 |     3 |
-+-----+-----+-------+
-|  A  |  B  | CCCC  |
-+-----+-----+-------+
-`
-	)
-	table.SetHeader(header)
-	table.SetFooter(footer)
-	table.AppendBulk(data)
-	table.SetColMinWidth(2, 5)
-	table.Render()
-
-	checkEqual(t, buf.String(), want)
-}
-
-func TestWrapString(t *testing.T) {
-	want := []string{"ああああああああああああああああああああああああ", "あああああああ"}
-	got, _ := WrapString("ああああああああああああああああああああああああ あああああああ", 55)
-	checkEqual(t, got, want)
-}
-
-func TestCustomAlign(t *testing.T) {
-	var (
-		buf    = &bytes.Buffer{}
-		table  = NewWriter(buf)
-		header = []string{"AAA", "BBB", "CCC"}
-		data   = [][]string{
-			{"a", "b", "c"},
-			{"1", "2", "3"},
-		}
-		footer = []string{"a", "b", "cccc"}
-		want   = `+-----+-----+-------+
-| AAA | BBB |  CCC  |
-+-----+-----+-------+
-| a   |  b  |     c |
-| 1   |  2  |     3 |
-+-----+-----+-------+
-|  A  |  B  | CCCC  |
-+-----+-----+-------+
-`
-	)
-	table.SetHeader(header)
-	table.SetFooter(footer)
-	table.AppendBulk(data)
-	table.SetColMinWidth(2, 5)
-	table.SetColumnAlignment([]int{ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT})
-	table.Render()
-
-	checkEqual(t, buf.String(), want)
-}
diff --git a/vendor/github.com/olekukonko/tablewriter/util.go b/vendor/github.com/olekukonko/tablewriter/util.go
index dea3c7a..9e8f0cb 100644
--- a/vendor/github.com/olekukonko/tablewriter/util.go
+++ b/vendor/github.com/olekukonko/tablewriter/util.go
@@ -30,12 +30,27 @@ func ConditionString(cond bool, valid, inValid string) string {
 	return inValid
 }
 
+func isNumOrSpace(r rune) bool {
+	return ('0' <= r && r <= '9') || r == ' '
+}
+
 // Format Table Header
 // Replace _ , . and spaces
 func Title(name string) string {
 	origLen := len(name)
-	name = strings.Replace(name, "_", " ", -1)
-	name = strings.Replace(name, ".", " ", -1)
+	rs := []rune(name)
+	for i, r := range rs {
+		switch r {
+		case '_':
+			rs[i] = ' '
+		case '.':
+			// ignore floating number 0.0
+			if (i != 0 && !isNumOrSpace(rs[i-1])) || (i != len(rs)-1 && !isNumOrSpace(rs[i+1])) {
+				rs[i] = ' '
+			}
+		}
+	}
+	name = string(rs)
 	name = strings.TrimSpace(name)
 	if len(name) == 0 && origLen > 0 {
 		// Keep at least one character. This is important to preserve
diff --git a/vendor/github.com/olekukonko/tablewriter/wrap_test.go b/vendor/github.com/olekukonko/tablewriter/wrap_test.go
deleted file mode 100644
index a03f9fc..0000000
--- a/vendor/github.com/olekukonko/tablewriter/wrap_test.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2014 Oleku Konko All rights reserved.
-// Use of this source code is governed by a MIT
-// license that can be found in the LICENSE file.
-
-// This module is a Table Writer  API for the Go Programming Language.
-// The protocols were written in pure Go and works on windows and unix systems
-
-package tablewriter
-
-import (
-	"strings"
-	"testing"
-
-	"github.com/mattn/go-runewidth"
-)
-
-var text = "The quick brown fox jumps over the lazy dog."
-
-func TestWrap(t *testing.T) {
-	exp := []string{
-		"The", "quick", "brown", "fox",
-		"jumps", "over", "the", "lazy", "dog."}
-
-	got, _ := WrapString(text, 6)
-	checkEqual(t, len(got), len(exp))
-}
-
-func TestWrapOneLine(t *testing.T) {
-	exp := "The quick brown fox jumps over the lazy dog."
-	words, _ := WrapString(text, 500)
-	checkEqual(t, strings.Join(words, string(sp)), exp)
-
-}
-
-func TestUnicode(t *testing.T) {
-	input := "Česká řeřicha"
-	var wordsUnicode []string
-	if runewidth.IsEastAsian() {
-		wordsUnicode, _ = WrapString(input, 14)
-	} else {
-		wordsUnicode, _ = WrapString(input, 13)
-	}
-	// input contains 13 (or 14 for CJK) runes, so it fits on one line.
-	checkEqual(t, len(wordsUnicode), 1)
-}
-
-func TestDisplayWidth(t *testing.T) {
-	input := "Česká řeřicha"
-	want := 13
-	if runewidth.IsEastAsian() {
-		want = 14
-	}
-	if n := DisplayWidth(input); n != want {
-		t.Errorf("Wants: %d Got: %d", want, n)
-	}
-	input = "\033[43;30m" + input + "\033[00m"
-	checkEqual(t, DisplayWidth(input), want)
-}
diff --git a/vendor/gopkg.in/ini.v1/file.go b/vendor/gopkg.in/ini.v1/file.go
index d7982c3..61ef963 100644
--- a/vendor/gopkg.in/ini.v1/file.go
+++ b/vendor/gopkg.in/ini.v1/file.go
@@ -45,6 +45,9 @@ type File struct {
 
 // newFile initializes File object with given data sources.
 func newFile(dataSources []dataSource, opts LoadOptions) *File {
+	if len(opts.KeyValueDelimiters) == 0 {
+		opts.KeyValueDelimiters = "=:"
+	}
 	return &File{
 		BlockMode:   true,
 		dataSources: dataSources,
@@ -227,7 +230,8 @@ func (f *File) Append(source interface{}, others ...interface{}) error {
 }
 
 func (f *File) writeToBuffer(indent string) (*bytes.Buffer, error) {
-	equalSign := "="
+	equalSign := DefaultFormatLeft + "=" + DefaultFormatRight
+
 	if PrettyFormat || PrettyEqual {
 		equalSign = " = "
 	}
@@ -237,13 +241,18 @@ func (f *File) writeToBuffer(indent string) (*bytes.Buffer, error) {
 	for i, sname := range f.sectionList {
 		sec := f.Section(sname)
 		if len(sec.Comment) > 0 {
-			if sec.Comment[0] != '#' && sec.Comment[0] != ';' {
-				sec.Comment = "; " + sec.Comment
-			} else {
-				sec.Comment = sec.Comment[:1] + " " + strings.TrimSpace(sec.Comment[1:])
-			}
-			if _, err := buf.WriteString(sec.Comment + LineBreak); err != nil {
-				return nil, err
+			// Support multiline comments
+			lines := strings.Split(sec.Comment, LineBreak)
+			for i := range lines {
+				if lines[i][0] != '#' && lines[i][0] != ';' {
+					lines[i] = "; " + lines[i]
+				} else {
+					lines[i] = lines[i][:1] + " " + strings.TrimSpace(lines[i][1:])
+				}
+
+				if _, err := buf.WriteString(lines[i] + LineBreak); err != nil {
+					return nil, err
+				}
 			}
 		}
 
@@ -280,7 +289,7 @@ func (f *File) writeToBuffer(indent string) (*bytes.Buffer, error) {
 			for _, kname := range sec.keyList {
 				keyLength := len(kname)
 				// First case will surround key by ` and second by """
-				if strings.ContainsAny(kname, "\"=:") {
+				if strings.Contains(kname, "\"") || strings.ContainsAny(kname, f.options.KeyValueDelimiters) {
 					keyLength += 2
 				} else if strings.Contains(kname, "`") {
 					keyLength += 6
@@ -300,17 +309,19 @@ func (f *File) writeToBuffer(indent string) (*bytes.Buffer, error) {
 				if len(indent) > 0 && sname != DEFAULT_SECTION {
 					buf.WriteString(indent)
 				}
-				if key.Comment[0] != '#' && key.Comment[0] != ';' {
-					key.Comment = "; " + key.Comment
-				} else {
-					key.Comment = key.Comment[:1] + " " + strings.TrimSpace(key.Comment[1:])
-				}
 
 				// Support multiline comments
-				key.Comment = strings.Replace(key.Comment, "\n", "\n; ", -1)
+				lines := strings.Split(key.Comment, LineBreak)
+				for i := range lines {
+					if lines[i][0] != '#' && lines[i][0] != ';' {
+						lines[i] = "; " + lines[i]
+					} else {
+						lines[i] = lines[i][:1] + " " + strings.TrimSpace(lines[i][1:])
+					}
 
-				if _, err := buf.WriteString(key.Comment + LineBreak); err != nil {
-					return nil, err
+					if _, err := buf.WriteString(lines[i] + LineBreak); err != nil {
+						return nil, err
+					}
 				}
 			}
 
@@ -321,7 +332,7 @@ func (f *File) writeToBuffer(indent string) (*bytes.Buffer, error) {
 			switch {
 			case key.isAutoIncrement:
 				kname = "-"
-			case strings.ContainsAny(kname, "\"=:"):
+			case strings.Contains(kname, "\"") || strings.ContainsAny(kname, f.options.KeyValueDelimiters):
 				kname = "`" + kname + "`"
 			case strings.Contains(kname, "`"):
 				kname = `"""` + kname + `"""`
diff --git a/vendor/gopkg.in/ini.v1/ini.go b/vendor/gopkg.in/ini.v1/ini.go
index ccba1ee..b6505a9 100644
--- a/vendor/gopkg.in/ini.v1/ini.go
+++ b/vendor/gopkg.in/ini.v1/ini.go
@@ -1,3 +1,5 @@
+// +build go1.6
+
 // Copyright 2014 Unknwon
 //
 // Licensed under the Apache License, Version 2.0 (the "License"): you may
@@ -32,7 +34,7 @@ const (
 
 	// Maximum allowed depth when recursively substituing variable names.
 	_DEPTH_VALUES = 99
-	_VERSION      = "1.35.0"
+	_VERSION      = "1.39.0"
 )
 
 // Version returns current package version literal.
@@ -46,6 +48,10 @@ var (
 	// at package init time.
 	LineBreak = "\n"
 
+	// Place custom spaces when PrettyFormat and PrettyEqual are both disabled
+	DefaultFormatLeft  = ""
+	DefaultFormatRight = ""
+
 	// Variable regexp pattern: %(variable)s
 	varPattern = regexp.MustCompile(`%\(([^\)]+)\)s`)
 
@@ -132,6 +138,8 @@ type LoadOptions struct {
 	IgnoreContinuation bool
 	// IgnoreInlineComment indicates whether to ignore comments at the end of value and treat it as part of value.
 	IgnoreInlineComment bool
+	// SkipUnrecognizableLines indicates whether to skip unrecognizable lines that do not conform to key/value pairs.
+	SkipUnrecognizableLines bool
 	// AllowBooleanKeys indicates whether to allow boolean type keys or treat as value is missing.
 	// This type of keys are mostly used in my.cnf.
 	AllowBooleanKeys bool
@@ -140,6 +148,16 @@ type LoadOptions struct {
 	// AllowNestedValues indicates whether to allow AWS-like nested values.
 	// Docs: http://docs.aws.amazon.com/cli/latest/topic/config-vars.html#nested-values
 	AllowNestedValues bool
+	// AllowPythonMultilineValues indicates whether to allow Python-like multi-line values.
+	// Docs: https://docs.python.org/3/library/configparser.html#supported-ini-file-structure
+	// Relevant quote:  Values can also span multiple lines, as long as they are indented deeper
+	// than the first line of the value.
+	AllowPythonMultilineValues bool
+	// SpaceBeforeInlineComment indicates whether to allow comment symbols (\# and \;) inside value.
+	// Docs: https://docs.python.org/2/library/configparser.html
+	// Quote: Comments may appear on their own in an otherwise empty line, or may be entered in lines holding values or section names.
+	// In the latter case, they need to be preceded by a whitespace character to be recognized as a comment.
+	SpaceBeforeInlineComment bool
 	// UnescapeValueDoubleQuotes indicates whether to unescape double quotes inside value to regular format
 	// when value is surrounded by double quotes, e.g. key="a \"value\"" => key=a "value"
 	UnescapeValueDoubleQuotes bool
@@ -147,9 +165,11 @@ type LoadOptions struct {
 	// when value is NOT surrounded by any quotes.
 	// Note: UNSTABLE, behavior might change to only unescape inside double quotes but may noy necessary at all.
 	UnescapeValueCommentSymbols bool
-	// Some INI formats allow group blocks that store a block of raw content that doesn't otherwise
+	// UnparseableSections stores a list of blocks that are allowed with raw content which do not otherwise
 	// conform to key/value pairs. Specify the names of those blocks here.
 	UnparseableSections []string
+	// KeyValueDelimiters is the sequence of delimiters that are used to separate key and value. By default, it is "=:".
+	KeyValueDelimiters string
 }
 
 func LoadSources(opts LoadOptions, source interface{}, others ...interface{}) (_ *File, err error) {
@@ -190,7 +210,7 @@ func InsensitiveLoad(source interface{}, others ...interface{}) (*File, error) {
 	return LoadSources(LoadOptions{Insensitive: true}, source, others...)
 }
 
-// InsensitiveLoad has exactly same functionality as Load function
+// ShadowLoad has exactly same functionality as Load function
 // except it allows have shadow keys.
 func ShadowLoad(source interface{}, others ...interface{}) (*File, error) {
 	return LoadSources(LoadOptions{AllowShadows: true}, source, others...)
diff --git a/vendor/gopkg.in/ini.v1/parser.go b/vendor/gopkg.in/ini.v1/parser.go
index db3af8f..36cb3da 100644
--- a/vendor/gopkg.in/ini.v1/parser.go
+++ b/vendor/gopkg.in/ini.v1/parser.go
@@ -19,11 +19,14 @@ import (
 	"bytes"
 	"fmt"
 	"io"
+	"regexp"
 	"strconv"
 	"strings"
 	"unicode"
 )
 
+var pythonMultiline = regexp.MustCompile("^(\\s+)([^\n]+)")
+
 type tokenType int
 
 const (
@@ -97,7 +100,7 @@ func cleanComment(in []byte) ([]byte, bool) {
 	return in[i:], true
 }
 
-func readKeyName(in []byte) (string, int, error) {
+func readKeyName(delimiters string, in []byte) (string, int, error) {
 	line := string(in)
 
 	// Check if key name surrounded by quotes.
@@ -124,7 +127,7 @@ func readKeyName(in []byte) (string, int, error) {
 		pos += startIdx
 
 		// Find key-value delimiter
-		i := strings.IndexAny(line[pos+startIdx:], "=:")
+		i := strings.IndexAny(line[pos+startIdx:], delimiters)
 		if i < 0 {
 			return "", -1, ErrDelimiterNotFound{line}
 		}
@@ -132,7 +135,7 @@ func readKeyName(in []byte) (string, int, error) {
 		return strings.TrimSpace(line[startIdx:pos]), endIdx + startIdx + 1, nil
 	}
 
-	endIdx = strings.IndexAny(line, "=:")
+	endIdx = strings.IndexAny(line, delimiters)
 	if endIdx < 0 {
 		return "", -1, ErrDelimiterNotFound{line}
 	}
@@ -194,7 +197,8 @@ func hasSurroundedQuote(in string, quote byte) bool {
 }
 
 func (p *parser) readValue(in []byte,
-	ignoreContinuation, ignoreInlineComment, unescapeValueDoubleQuotes, unescapeValueCommentSymbols bool) (string, error) {
+	parserBufferSize int,
+	ignoreContinuation, ignoreInlineComment, unescapeValueDoubleQuotes, unescapeValueCommentSymbols, allowPythonMultilines, spaceBeforeInlineComment bool) (string, error) {
 
 	line := strings.TrimLeftFunc(string(in), unicode.IsSpace)
 	if len(line) == 0 {
@@ -224,21 +228,34 @@ func (p *parser) readValue(in []byte,
 		return line[startIdx : pos+startIdx], nil
 	}
 
+	lastChar := line[len(line)-1]
 	// Won't be able to reach here if value only contains whitespace
 	line = strings.TrimSpace(line)
+	trimmedLastChar := line[len(line)-1]
 
 	// Check continuation lines when desired
-	if !ignoreContinuation && line[len(line)-1] == '\\' {
+	if !ignoreContinuation && trimmedLastChar == '\\' {
 		return p.readContinuationLines(line[:len(line)-1])
 	}
 
 	// Check if ignore inline comment
 	if !ignoreInlineComment {
-		i := strings.IndexAny(line, "#;")
+		var i int
+		if spaceBeforeInlineComment {
+			i = strings.Index(line, " #")
+			if i == -1 {
+				i = strings.Index(line, " ;")
+			}
+
+		} else {
+			i = strings.IndexAny(line, "#;")
+		}
+
 		if i > -1 {
 			p.comment.WriteString(line[i:])
 			line = strings.TrimSpace(line[:i])
 		}
+
 	}
 
 	// Trim single and double quotes
@@ -252,7 +269,50 @@ func (p *parser) readValue(in []byte,
 		if strings.Contains(line, `\#`) {
 			line = strings.Replace(line, `\#`, "#", -1)
 		}
+	} else if allowPythonMultilines && lastChar == '\n' {
+		parserBufferPeekResult, _ := p.buf.Peek(parserBufferSize)
+		peekBuffer := bytes.NewBuffer(parserBufferPeekResult)
+
+		identSize := -1
+		val := line
+
+		for {
+			peekData, peekErr := peekBuffer.ReadBytes('\n')
+			if peekErr != nil {
+				if peekErr == io.EOF {
+					return val, nil
+				}
+				return "", peekErr
+			}
+
+			peekMatches := pythonMultiline.FindStringSubmatch(string(peekData))
+			if len(peekMatches) != 3 {
+				return val, nil
+			}
+
+			currentIdentSize := len(peekMatches[1])
+			// NOTE: Return if not a python-ini multi-line value.
+			if currentIdentSize < 0 {
+				return val, nil
+			}
+			identSize = currentIdentSize
+
+			// NOTE: Just advance the parser reader (buffer) in-sync with the peek buffer.
+			_, err := p.readUntil('\n')
+			if err != nil {
+				return "", err
+			}
+
+			val += fmt.Sprintf("\n%s", peekMatches[2])
+		}
+
+		// NOTE: If it was a Python multi-line value,
+		// return the appended value.
+		if identSize > 0 {
+			return val, nil
+		}
 	}
+
 	return line, nil
 }
 
@@ -276,6 +336,28 @@ func (f *File) parse(reader io.Reader) (err error) {
 
 	var line []byte
 	var inUnparseableSection bool
+
+	// NOTE: Iterate and increase `currentPeekSize` until
+	// the size of the parser buffer is found.
+	// TODO(unknwon): When Golang 1.10 is the lowest version supported, replace with `parserBufferSize := p.buf.Size()`.
+	parserBufferSize := 0
+	// NOTE: Peek 1kb at a time.
+	currentPeekSize := 1024
+
+	if f.options.AllowPythonMultilineValues {
+		for {
+			peekBytes, _ := p.buf.Peek(currentPeekSize)
+			peekBytesLength := len(peekBytes)
+
+			if parserBufferSize >= peekBytesLength {
+				break
+			}
+
+			currentPeekSize *= 2
+			parserBufferSize = peekBytesLength
+		}
+	}
+
 	for !p.isEOF {
 		line, err = p.readUntil('\n')
 		if err != nil {
@@ -307,8 +389,7 @@ func (f *File) parse(reader io.Reader) (err error) {
 		// Section
 		if line[0] == '[' {
 			// Read to the next ']' (TODO: support quoted strings)
-			// TODO(unknwon): use LastIndexByte when stop supporting Go1.4
-			closeIdx := bytes.LastIndex(line, []byte("]"))
+			closeIdx := bytes.LastIndexByte(line, ']')
 			if closeIdx == -1 {
 				return fmt.Errorf("unclosed section: %s", line)
 			}
@@ -347,25 +428,34 @@ func (f *File) parse(reader io.Reader) (err error) {
 			continue
 		}
 
-		kname, offset, err := readKeyName(line)
+		kname, offset, err := readKeyName(f.options.KeyValueDelimiters, line)
 		if err != nil {
 			// Treat as boolean key when desired, and whole line is key name.
-			if IsErrDelimiterNotFound(err) && f.options.AllowBooleanKeys {
-				kname, err := p.readValue(line,
-					f.options.IgnoreContinuation,
-					f.options.IgnoreInlineComment,
-					f.options.UnescapeValueDoubleQuotes,
-					f.options.UnescapeValueCommentSymbols)
-				if err != nil {
-					return err
-				}
-				key, err := section.NewBooleanKey(kname)
-				if err != nil {
-					return err
+			if IsErrDelimiterNotFound(err) {
+				switch {
+				case f.options.AllowBooleanKeys:
+					kname, err := p.readValue(line,
+						parserBufferSize,
+						f.options.IgnoreContinuation,
+						f.options.IgnoreInlineComment,
+						f.options.UnescapeValueDoubleQuotes,
+						f.options.UnescapeValueCommentSymbols,
+						f.options.AllowPythonMultilineValues,
+						f.options.SpaceBeforeInlineComment)
+					if err != nil {
+						return err
+					}
+					key, err := section.NewBooleanKey(kname)
+					if err != nil {
+						return err
+					}
+					key.Comment = strings.TrimSpace(p.comment.String())
+					p.comment.Reset()
+					continue
+
+				case f.options.SkipUnrecognizableLines:
+					continue
 				}
-				key.Comment = strings.TrimSpace(p.comment.String())
-				p.comment.Reset()
-				continue
 			}
 			return err
 		}
@@ -379,10 +469,13 @@ func (f *File) parse(reader io.Reader) (err error) {
 		}
 
 		value, err := p.readValue(line[offset:],
+			parserBufferSize,
 			f.options.IgnoreContinuation,
 			f.options.IgnoreInlineComment,
 			f.options.UnescapeValueDoubleQuotes,
-			f.options.UnescapeValueCommentSymbols)
+			f.options.UnescapeValueCommentSymbols,
+			f.options.AllowPythonMultilineValues,
+			f.options.SpaceBeforeInlineComment)
 		if err != nil {
 			return err
 		}
diff --git a/vendor/gopkg.in/ini.v1/section.go b/vendor/gopkg.in/ini.v1/section.go
index d8a4026..340a1ef 100644
--- a/vendor/gopkg.in/ini.v1/section.go
+++ b/vendor/gopkg.in/ini.v1/section.go
@@ -82,6 +82,7 @@ func (s *Section) NewKey(name, val string) (*Key, error) {
 			}
 		} else {
 			s.keys[name].value = val
+			s.keysHash[name] = val
 		}
 		return s.keys[name], nil
 	}