Skip to content

Conversation

ZinoKader
Copy link
Member

@ZinoKader ZinoKader commented Feb 24, 2023

Prompt

  • (default!) Prompt with a [Y/n] for each file that would be overwritten when receiving files.
  • Adds --yes, -y flags that will automatically overwrite files without prompting.

Copying passwords when sending

  • Adds the --relay [relay-address] flag to the copiable portal 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 the default_rendezvous_address and default_rendezvous_port options. It incorporates both the IP and port into one value, so relay: 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.

    • fixes reading configs from the config file (it was broken!).
    • moved the config file to $HOME/.config/portal/config.yml.

Valid relay addresses

  • Now you can use loopback relay addresses on the form localhost:5432 or :5432. Previously, one had to use 127.0.0.1:5432 to address a relay on the loopback interface.

mellonnen and others added 20 commits February 22, 2023 22:52
> 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
feat: config command with various subcommands
feat: refactor config for more extensibility
feat: file overwrite prompt (with configurability)
@ZinoKader ZinoKader requested a review from mellonnen February 24, 2023 14:40
@ZinoKader ZinoKader linked an issue Feb 24, 2023 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Feb 24, 2023

Codecov Report

Merging #53 (e434c30) into master (c3276cc) will increase coverage by 8.69%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
portal/portal.go 36.11% <0.00%> (+36.11%) ⬆️
portal/config.go 100.00% <0.00%> (+100.00%) ⬆️

Impacted file tree graph

@ZinoKader ZinoKader changed the title feat: overwrite prompt, config file + commands, add relay flag when copying password WIP: feat: overwrite prompt, config file + commands, add relay flag when copying password Feb 24, 2023
@ZinoKader ZinoKader changed the title WIP: feat: overwrite prompt, config file + commands, add relay flag when copying password feat: overwrite prompt, config file + commands, add relay flag when copying password Feb 24, 2023
Copy link
Member

@mellonnen mellonnen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ZinoKader ZinoKader merged commit 09abbee into master Feb 24, 2023
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

Successfully merging this pull request may close these issues.

Prompt before overwriting file Portal proposes to copy and use a bad command (not complete) to receive.
2 participants