fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
d02736c0c
master
1complete -c psql --no-files -a'(__fish_complete_pg_database)' 2 3# General options: 4complete -c psql -s d -l dbname -x -a'(__fish_complete_pg_database)' -d"Database name to connect to" 5complete -c psql -s c -l command -d"Run only single command (SQL or internal) and exit" 6complete -c psql -s f -l file -r -d"Execute commands from file, then exit" 7complete -c psql -s l -l list -d"List available databases, then exit" 8complete -c psql -s v -l set -l variable -x -d"Set psql variable NAME to VALUE" 9complete -c psql -s X -l no-psqlrc -d"Do not read startup file (~/.psqlrc)" 10complete -c psql -s1 -l single-transaction -d"Execute command file as a single transaction" 11complete -c psql -s'?' -l help -a"options commands variables" -d"Show this help, then exit" 12complete -c psql -l version -d"Output version information, then exit" 13 14# Input and output options: 15complete -c psql -s a -l echo-all -d"Echo all input from script" 16complete -c psql -s b -l echo-errors -d"Echo failed commands" 17complete -c psql -s e -l echo-queries -d"Echo commands sent to server" 18complete -c psql -s E -l echo-hidden -d"Display queries that internal commands generate" 19complete -c psql -s L -l log-file -r -d"Send session log to file" 20complete -c psql -s n -l no-readline -d"Disable enhanced command line editing (readline)" 21complete -c psql -s o -l output -r -d"Send query results to file (or |pipe)" 22complete -c psql -s q -l quiet -d"Run quietly (no messages, only query output)" 23complete -c psql -s s -l single-step -d"Single-step mode (confirm each query)" 24complete -c psql -s S -l single-line -d"Single-line mode (end of line terminates SQL command)" 25 26# Output format options: 27complete -c psql -s A -l no-align -d"Unaligned table output mode" 28complete -c psql -s H -l html -d"HTML table output mode" 29complete -c psql -s P -l pset -d"Set printing option VAR to ARG (see \pset command)" 30complete -c psql -s t -l tuples-only -d"Print rows only" 31complete -c psql -s T -l table-attr -d"Set HTML table tag attributes (e.g., width, border)" 32complete -c psql -s x -l expanded -d"Turn on expanded table output" 33complete -c psql -s F -l field-separator -x -d"Set field separator (default: '|')" 34complete -c psql -s R -l record-separator -x -d"Set record separator (default: newline)" 35complete -c psql -s0 -l record-separator-zero -d"Set record separator for unaligned output to zero byte" 36 37# Connection options: 38complete -c psql -s h -l host -x -a'(__fish_print_hostnames)' -d"Database server host or socket directory" 39complete -c psql -s p -l port -x -d"Database server port" 40complete -c psql -s U -l username -x -a'(__fish_complete_pg_user)' -d"Database user name" 41complete -c psql -s w -l no-password -d"Never prompt for password" 42complete -c psql -s W -l password -d"Force password prompt (should happen automatically)"