Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Account completion does not suggest account names specified with the account directive or periodic (budget) transactions #159

Open
RyanGibb opened this issue Jul 13, 2024 · 2 comments

Comments

@RyanGibb
Copy link
Contributor

RyanGibb commented Jul 13, 2024

For example, in the following file:

account Expenses:Food
account Expenses:Rent
account Expenses:Hobbies                                account Assets

~ monthly
  Expenses:Food               £1
  Assets

2024-07-12 rent
  Expenses:Rent              £1
  Assets

2024-07-12 hobbies
   Expenses:Hobbies           £1
  Assets

I would expect the Expenses:Food account name to be autocompleted, but it's not included in the suggestions:

Screenshot_20240713-090636~2

@RyanGibb
Copy link
Contributor Author

RyanGibb commented Jul 13, 2024

I haven't looked at the code yet but it seems like the --add-budget option on the accounts command might be relevant here:

$ ledger -f test.ledger accounts
Assets
Expenses:Hobbies
Expenses:Rent
$ ledger -f test.ledger accounts --add-budget
Assets
Expenses:Food
Expenses:Hobbies
Expenses:Rent

This doesn't include accounts specified with the accounts directive, but does include budgeted accounts.

@RyanGibb
Copy link
Contributor Author

Ah-ha! Looks like ledger_accounts_cmd = 'ledger accounts --add-budget fixes this for accounts included in a budget at least`. Perhaps this should be the default?

@RyanGibb RyanGibb changed the title Account completion does not suggest account names specified with the account command or periodic (budget) transactions Account completion does not suggest account names specified with the account directive or periodic (budget) transactions Jul 13, 2024
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

No branches or pull requests

1 participant