HOWTO set the default p database in the ENVIRONMENT - binbash23/p GitHub Wiki

If you start p, you can set the database file to open with the "-D" option.

p -D my_private_database.db

It is also possible to set the database name in an environment variable. The name of the variable is: P_DATABASE. So, if you want to set and use this varibale in linux, you have to export the variable in your .bashrc or a place you like:

export P_DATABASE='/home/peter/p/my_private_database.db'

When you start p, it will try to open the database file "/home/peter/p/my_private_database.db"

Note: The -D commandline option has priority if it is set together with the environment variable P_DATABASE.