fjp icon indicating copy to clipboard operation
fjp copied to clipboard

[ FEAT ] - CP Subcommand

Open UsairimIsani opened this issue 5 years ago • 3 comments

CP - Subcommand

copy profiles.

@rusty-snake More info needed, copy profile to same directory or to a different directory, provided an argument.

UsairimIsani avatar Sep 17 '20 05:09 UsairimIsani

Copying between /etc/firejail/, ~/.config/firejail and ..

Syntax ideas, fell free to comment others/improved:

  1. <PREFIX> : <NAME for profile::Profile>
fjp cp sys:firefox usr ==> cp /etc/firejail/firefox.profile ~/.config/firejail
fjp cp cwd:thunderbird.profile ~:thunderbird-beta.profile ==> cp ./thunderbird.profile ~/.config/firejail/thunderbird-beta.profile
  1. Arguments
fjp cp --sys firefox --usr
fjp cp --cwd thunderbird.profile --usr thunderbird-beta.profile

rusty-snake avatar Sep 17 '20 11:09 rusty-snake

I think the second syntax is more intuitive as people are accustomed to similar syntax. Can we do copy the other way around as well, for example.

fjp cp --usr firefox --sys
fjp cp --usr thunderbird.profile --cwd thunderbird-beta.profile

This would allow users to overwrite system profiles. Should this be allowed? @rusty-snake

UsairimIsani avatar Sep 17 '20 16:09 UsairimIsani

The second syntax is also easier for shell-completions.

This would allow users to overwrite system profiles. Should this be allowed?

I can' t find a reason why this should be forbidden.

rusty-snake avatar Sep 17 '20 18:09 rusty-snake