It's the expected behavior. Dotfiles in your home folder usually have
global settings, so having more than one is a bad practice.

You may have your common rules in it, and then in the directory where you
have each ledger file (e.g. `~/work` and `~/personal`) you can have another
`.ledgerrc` with specific settings for each project if you need.

Also, instead of sourcing many files with `--file` you may use includes
<https://ledger-cli.org/doc/ledger3.html#index-include> in a main ledger
file, e.g.:

    include accounts.ledger
    include 2022.ledger
    include 2023.ledger
    include loans/friends.ledger

Then you just have to specify this file with `--file` and all the others
will be included as you want.

This could even simplify your two `.ledgerrc` files down to a single one,
because if you specify e.g. "--file main.ledger", I think it should work in
both directories.


On Sun, Oct 22, 2023 at 3:00 PM lipp f <[email protected]> wrote:

> $ find ~ -name \*.ledgerrc
> /home/<user>/.ledgerrc
> /home/<user>/t14.ledgerrc
>
> The default one supposed to be for myself and t14 for my business.
> Expecting to be completely separated. Each file has one or more --file
> entry, no overlap.
>
>
> $ ledger -i ~/t14.ledgerrc stats
> and
> $ ledger -i ~/.ledgerrc stats
>
> show actually only the default data, never the t14.
>
> I was expecting that whenever an init file is specified, the default one
> wouldn't be used. Is this a bug?
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Ledger" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ledger-cli/dd183690-c70b-45d4-a881-87080cf5c510n%40googlegroups.com
> <https://groups.google.com/d/msgid/ledger-cli/dd183690-c70b-45d4-a881-87080cf5c510n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/CAJHhZn%3DcpzVT_qkA8ijoNrW9FJorcNAbWiR_%3DysmL7yUAku02g%40mail.gmail.com.

Reply via email to