Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changeable default options aka config file #113

Open
stefanct opened this issue Dec 25, 2019 · 7 comments
Open

Changeable default options aka config file #113

stefanct opened this issue Dec 25, 2019 · 7 comments

Comments

@stefanct
Copy link

I've been using picocom as first choice when dealing with serial ports of all sorts for years because it makes the most commonly needed things possible with little effort. I was quite surprised that there does not seem to be a way to change the defaults (without recompilation). For example, it would be very convenient for me to change the default baud rate to 115200. I would have expected that picocom reads in a config file like ~/.config/picocom containing settings that overwrite the default options (but get overwritten by command line options). However, this apparently does not exist...?

@StuckUpCreations
Copy link

i think this would be very useful too :(

@wsakernel
Copy link

The intended way to alter defaults is using aliases, see 8707801 . I think this makes sense for a tool which wants to be pico. It should be mentioned in the docs, though. I'll add such a paragraph unless someone beats me to it.

@stefanct
Copy link
Author

That's nice as an option but is inferior to a dedicated config file. There is good reason that many applications use that IMHO.
For example, updates to aliases aren't picked up immediately and easily lead to intermittent errors when changes are not propagated to all respective shells. Also, they depend on the respective shell and thus might not be available in all circumstances.
Would you be willing to accept pull requests (not that I would have the time to do that myself... :)?

@agausmann
Copy link

Another option is scripts, which I prefer over aliases. I typically create a shell script for each different config that I end up using often.

@wsakernel
Copy link

I'd accept a pull request if the implementation was simple, robust, and optional (i.e. can be compiled out). I'd suggest a textfile containing command-line parameters, but other simple solutions may be fine, too. That being said, I also won't implement it because I need my custom built version anyhow. Thanks for the feedback, though!

wsakernel added a commit to wsakernel/picocom that referenced this issue Jul 10, 2022
@wsakernel
Copy link

I added some documentation now: wsakernel@95accb0

@wsakernel
Copy link

I think command substitutions are also a nice solution. See this pull request from my repo: https://gitlab.com/wsakernel/picocom/-/merge_requests/10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants