RFC: Rename -walletdir option to -walletsdir (scripted-diff) #12221

pull ryanofsky wants to merge 1 commits into bitcoin:master from ryanofsky:pr/wdren changing 4 files +18 −18
  1. ryanofsky commented at 7:16 PM on January 18, 2018: contributor

    Reasons for rename:

    1. Default value is <datadir>/wallets so calling it -walletsdir instead of -walletdir would be more internally consistent.
    2. Directory can contain more than one wallet so plural makes sense
    3. This makes it harder to confuse -walletdir option with -wallet option if we store wallets in their own directories as proposed in #11466 (comment) and implemented in https://github.com/bitcoin/bitcoin/pull/12216
  2. scripted-diff: rename -walletdir options -walletsdir
    Reasons for rename:
    
      1) Default value is `<datadir>/wallets` so calling it `-walletsdir` instead
         of `-walletdir` would be more internally consistent
    
      2) Directory can contain more than one wallet so plural makes more sense
    
      3) This makes it harder to confuse -walletdir option with -wallet option
         if we store wallets in their own directories as proposed in
         https://github.com/bitcoin/bitcoin/pull/11466#issuecomment-335827526 and
         implemented in https://github.com/bitcoin/bitcoin/pull/12216
    
    -BEGIN VERIFY SCRIPT-
    git grep -l walletdir | xargs sed -i s/walletdir/walletsdir/g
    -END VERIFY SCRIPT-
    23fc59a941
  3. meshcollider commented at 7:19 PM on January 18, 2018: contributor

    This was suggested on the original PR here: #11466 (review)

    Both @laanwj and I agreed that walletdir is easier to remember and type :)

  4. laanwj commented at 7:21 PM on January 18, 2018: member

    I strongly prefer the singular name. I'm going to forget the 's' every time. I think it's fairly clear that it's a directory that it can contain multiple things, but in any case that belongs in the documentation, I don't see a reason to rename it.

  5. jonasschnelli commented at 7:26 PM on January 18, 2018: contributor

    Agree with @laanwj.

  6. ryanofsky commented at 7:31 PM on January 18, 2018: contributor

    I did mention three reasons above (hopefully they make sense), and I don't exactly know when you would be typing this option, but if getting rid of the s here is important do you also want to make the default location <datadir>/wallet?

  7. ryanofsky commented at 7:37 PM on January 18, 2018: contributor

    Ok, I don't have a strong preference. Maybe you had a bad experience with the letter s. Was mostly concerned about confusion between -walletdir and -wallet options if different wallets stopped being stored together in a single bdb environment. Will close.

  8. ryanofsky closed this on Jan 18, 2018

  9. laanwj commented at 7:48 PM on January 18, 2018: member

    Was mostly concerned about confusion between -walletdir and -wallet options if different wallets stopped being stored together in a single bdb environment. Will close.

    Yes, that's a valid concern.

  10. Sjors commented at 8:14 AM on January 19, 2018: member

    Fwiw, it's "computer store", not "computers store", "grocery bag", not "groceries bag", "cookie jar", not "cookies jar". Though I'm sure there's plenty of counter examples.

  11. ryanofsky cross-referenced this on Sep 26, 2018 from issue wallet: Add ListWalletDir utility function by promag
  12. promag commented at 11:30 AM on September 26, 2018: member

    Another plural exception:

      QDesktopServices::DocumentsLocation
      QDesktopServices::FontsLocation
      QDesktopServices::ApplicationsLocation
    * QDesktopServices::MusicLocation
      QDesktopServices::MoviesLocation
      QDesktopServices::PicturesLocation
    

    so wallet is like music 🎶 ...

    (not english native speaker, so maybe there is a reason to be singular in this case)

  13. ryanofsky cross-referenced this on Apr 8, 2020 from issue rpc, cli: add multiwallet balances rpc and use it in -getinfo by jonatack
  14. ryanofsky cross-referenced this on Jun 5, 2020 from issue Remove g_rpc_chain global by ryanofsky
  15. bitcoin locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-20 06:55 UTC