Loading ...
Sorry, an error occurred while loading the content.

Getting a password from stdin

Expand Messages
  • David Fishburn
    Vim 6.1.353 I want to shell out and execute a command which connects to a database. According to the postgres psql source there is no command line parameter
    Message 1 of 1 , Feb 28, 2003
    • 0 Attachment
      Vim 6.1.353

      I want to shell out and execute a command which connects to a database.

      According to the postgres psql source there is no command line parameter
      for password (which is pretty silly...).

      There is a simple_prompt(...) function, that reads the password. At
      first it tries to open the "/dev/tty" file, and reads the things typed
      on the terminal (eg. password). If the file is not found it reads the
      password from stdin. I don't know how could I write the password into
      /dev/tty from vim while psql is waiting for my input.

      Any ideas?

      Thanks,
      Dave
    Your message has been successfully submitted and would be delivered to recipients shortly.