Add postgres psql completion

Options and descriptions are from psql --help output. Database and username
completion based on the bash completion
This commit is contained in:
Ronaldo Maia 2013-10-02 14:33:58 -03:00 committed by ridiculousfish
parent 238bbfcbbb
commit 3788f462b4

View file

@ -14,8 +14,8 @@ complete -c psql --no-files -a '(__fish_complete_pg_database)'
# General options: # General options:
# #
complete -c psql -s d -l dbname -a '(__fish_complete_pg_database)' --description "database name to connect to"
complete -c psql -s c -l command --description "run only single command (SQL or internal) and exit" complete -c psql -s c -l command --description "run only single command (SQL or internal) and exit"
complete -c psql -s d -l dbname -a '(__fish_complete_pg_database)' --description "database name to connect to (default: "romaia")"
complete -c psql -s f -l file -r --description "execute commands from file, then exit" complete -c psql -s f -l file -r --description "execute commands from file, then exit"
complete -c psql -s l -l list --description "list available databases, then exit" complete -c psql -s l -l list --description "list available databases, then exit"