zsh-workers
 help / color / mirror / code / Atom feed
11d670bf27f9cff618dadfaceb8c9fdfda2cd4a4 blob 1034 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 
#compdef sqlite sqlite3

_sqlite () {
  local opt display_opt excludeopts
  local -a _opts _output_modes

  _opts=(
    '-init[startup file]:file name to process:_files'
    '-echo[echo commands]'
    '(-noheader)-header[turn headers on]'
    '(-header)-noheader[turn headers off]'
  )

  # output modes are mutually exclusive to each other
  _output_modes=( column HTML line list )
  excludeopts="-${^_output_modes:l}"
  for display_opt in $_output_modes ; do
    opt=$display_opt:l
    # finagle the description to match the way SQLite's help formats them
    [[ $opt = $display_opt ]] && display_opt="'$display_opt'"
    _opts+=( "($excludeopts)-${opt}[set output mode to $display_opt]" )
  done

  _opts+=(
    '-separator[set output field separator]:string to separate output fields:'
    '-nullvalue[set null value string]:string for NULL values:'
    '(- : *)-version[show SQLite version]'
    '(- : *)-help[show help]'
    "1:database file:_files -g '(#i)*.(db|$service)(-.)'"
    '*:SQL to run'
  )

  _arguments -s $_opts
}
debug log:

solving 11d670b ...
found 11d670b in https://inbox.vuxu.org/zsh-workers/1300543889-21998-1-git-send-email-zsh@benizi.com/

applying [1/1] https://inbox.vuxu.org/zsh-workers/1300543889-21998-1-git-send-email-zsh@benizi.com/
diff --git a/Completion/Unix/Command/_sqlite b/Completion/Unix/Command/_sqlite
new file mode 100644
index 0000000..11d670b

Checking patch Completion/Unix/Command/_sqlite...
Applied patch Completion/Unix/Command/_sqlite cleanly.

index at:
100644 11d670bf27f9cff618dadfaceb8c9fdfda2cd4a4	Completion/Unix/Command/_sqlite

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).