pudb icon indicating copy to clipboard operation
pudb copied to clipboard

Add --config to use customize configuration file

Open Freed-Wu opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. No

Describe the solution you'd like

$ pudb3 --help
usage: pudb3 [options] [-m] SCRIPT-OR-MODULE-TO-RUN [SCRIPT_ARGS]

positional arguments:
  script_args           Arguments to pass to script or module

optional arguments:
  -h, --help            show this help message and exit
  -s, --steal-output
  -m, --module          Debug as module or package instead of as a script
  -le FILE, --log-errors FILE
                        Log internal errors to the given file
  --pre-run COMMAND     Run command before each program run
  --config CONFIG       Use config file [Default: ~/.config/pudb/pudb.cfg]
  --version             show program's version number and exit

pudb:pudb3 v2022.1.2

Freed-Wu avatar Jul 30 '22 12:07 Freed-Wu

I'd be happy to consider a PR. One question is whether this should switch the whole config directory, which also stores histories, breakpoints and such.

inducer avatar Jul 30 '22 19:07 inducer

One question is whether this should switch the whole config directory, which also stores histories, breakpoints and such.

Switch the whold config directory and only switch config file, which is better? And, can we add a default config file in current directory, i.e., pudb.cfg in current directory can have higher priority than ~/.config/pudb/pudb.conf? It can keep different config from default ~/.config/pudb/pudb.conf for different path.

Freed-Wu avatar Aug 04 '22 16:08 Freed-Wu