Giter Site home page Giter Site logo

Discussion: sub-commands about gocryptfs HOT 10 CLOSED

kofalt avatar kofalt commented on August 25, 2024
Discussion: sub-commands

from gocryptfs.

Comments (10)

rfjakob avatar rfjakob commented on August 25, 2024

Indeed it is a bit asymmetric. The reason is that I wanted to keep the most common action (mounting) as simple as possible and not require any argument.

EncFS handles the other actions in a seperate command ( http://linux.die.net/man/1/encfsctl ), but having two binaries instead of one seem undesireable as well.

from gocryptfs.

kofalt avatar kofalt commented on August 25, 2024

I'm not sure I understand the two binaries comment - to be clear I'm proposing all the commands stay within a single binary.

If you're interested, I could take a whack at a PR for this to try it out?

from gocryptfs.

rfjakob avatar rfjakob commented on August 25, 2024

from gocryptfs.

rfjakob avatar rfjakob commented on August 25, 2024

from gocryptfs.

kofalt avatar kofalt commented on August 25, 2024

Fair enough! I think, if you were adamant about keeping the mount example the same, it could default to mounting if the parameter doesn't match any sub-commands.

I'll be honest, this is the first I've heard of fallocate so I don't think I'd be super confident taking that on. But I am open to becoming a general contributor once I've played with it a bit more. Gocryptfs looks like an ideal candidate for sharing encrypted files through conventional cloud providers with colleagues, though I've yet to see what the user-visible behaviour is in the case of conflicts (my guess is nothing good).

from gocryptfs.

rfjakob avatar rfjakob commented on August 25, 2024

Regarding conflicts: Dropbox appends something like "conflicted copy 1" to the file name and keeps both versions if there is a conflict. This will work just fine with gocryptfs when file name encryption is disabled. Use the -plaintextnames flag to disable file name encryption.

from gocryptfs.

rfjakob avatar rfjakob commented on August 25, 2024

I will close the ticket for as I don't think subcommands have enough merit to be implemented.

You are welcome to contribute on other open issues!

from gocryptfs.

spl avatar spl commented on August 25, 2024

I'm trying out gocryptfs for the first time, and, as a newcomer, the command-line flag documentation is a bit confusing. Also, I had to search the web for how to unmount, but that probably shouldn't be necessary.

One solution would be to improve the usage string. You could categorize and/or group related flags together. This should, for example, remove the need to add (with -init) at the end of some flags.

Another solution is to use subcommands as mentioned above. Personally, I find this approach better.

Subcommands are self-documenting to an extent because they present the primary actions as mutually exclusive alternatives and separate those from optional flags. Looking at the current set of flags, it requires some reading to realize that -init is a special case. I also have to think a bit about whether -init works with -ro, for example.

Subcommands also make it intuitive to get documentation on a subcommand and to determine which optional flags work with a subcommand. By typing (for example) gocryptfs <command> -h/--help, I can immediately learn more about <command>. And having this extra documentation not in the main usage string allows you to keep the latter brief.

To alleviate the concern about making the “mount” command easiest, you could use a subcommand “alias:” securefs uses m for mount.

Better usage documentation could, of course, improve things for newcomers like myself. But I think subcommands go an extra level by highlighting the discrete operations of gocryptfs in an intuitive way.

from gocryptfs.

sabrehagen avatar sabrehagen commented on August 25, 2024

I too came here searching for how to unmount a gocrypfs folder. It feels "wrong" to have to use a different program (fusermount) to reverse an operation taken the gocryptfs program.

from gocryptfs.

Nodens- avatar Nodens- commented on August 25, 2024

This is the standard for all FUSE filesystems.

from gocryptfs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.