-
Notifications
You must be signed in to change notification settings - Fork 47
feat: overwrite prompt, config file + commands, add relay flag when copying password #53
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> yo dawg I heard you like configs so I created a config command so you can config your config while configing your config - `portal config view` outputs current config with syntax highlighting - `portal config path` outputs the path of the config file - `portal config edit` opens the config file in default $EDITOR - `portal config reset` resets the config file to its default values
- fixes reading from the config file (it was not working at all!) - since this was not working at all, there are no breaking changes (haha!) - thus, we also move the config file to `$HOME/.config/portal/config.yml` - moved relay-related constants to config file
F/copy with flag
feat: config command with various subcommands
feat: refactor config for more extensibility
feat: file overwrite prompt (with configurability)
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #53 +/- ##
==========================================
+ Coverage 31.30% 40.00% +8.69%
==========================================
Files 6 6
Lines 230 230
==========================================
+ Hits 72 92 +20
+ Misses 138 111 -27
- Partials 20 27 +7
|
mellonnen
approved these changes
Feb 24, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prompt
--yes
,-y
flags that will automatically overwrite files without prompting.Copying passwords when sending
--relay [relay-address]
flag to the copiableportal receive 1-x-x-x
command when a sender is sending files through a relay which is not the default.Configuration
New
config
command with useful subcommands to handle your config file.portal config view
outputs current config with syntax highlighting.portal config path
outputs the path of the config file.portal config edit
opens the config file in default $EDITOR.portal config reset
resets the config file to its default values.New configuration options.
relay: [addr:port|domain]
replaces thedefault_rendezvous_address
anddefault_rendezvous_port
options. It incorporates both the IP and port into one value, sorelay: 1.2.3.4:8726
is a valid value.verbose: [true|**false**]
can now be configured in the config to always output verbose info.prompt_overwrite_files: [**true**|false]
can be configured to always prompt, or never prompt when overwriting files.Changes to config file behavior.
$HOME/.config/portal/config.yml
.Valid relay addresses
localhost:5432
or:5432
. Previously, one had to use127.0.0.1:5432
to address a relay on the loopback interface.