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 name omni completion does not include ending ")" #68

Open
sorsasampo opened this issue Apr 22, 2018 · 4 comments
Open

Account name omni completion does not include ending ")" #68

sorsasampo opened this issue Apr 22, 2018 · 4 comments
Labels

Comments

@sorsasampo
Copy link

If the account name ends with ")", the auto completion does not include it.

Probably related to virtual postings syntax parsing?

@alerque alerque added the bug label Jul 1, 2019
@alerque
Copy link
Member

alerque commented Jul 1, 2019

Confirmed, but I'm not sure how this should be fixed. The account name itself being completed does not have the ), nor should it since the same account names can be used for virtual or real postings. But of course when completing a virtual posting the most logical thing to do would be including it.

Perhaps the solution to this it actually to turn on some kind of parentheses completion function so that typing ( automatically adds the ending parenthesis, then filling in the account name can proceed as normal.

Thoughts anyone?

@sorsasampo
Copy link
Author

@alerque: account names can contain parentheses, for example: Bank:Example (BE71 0961 2345 6769)

@alerque
Copy link
Member

alerque commented Jul 7, 2019

Really. How does ledger parse virtual postings? Or is that unique to hledger? What about balance virtual postings (square brackets in hledger)? We've going to know exactly how both tools parse accounts to get this right.

@tbm
Copy link

tbm commented Jul 7, 2019

Account names can't start with ( since that would make it a virtual posting but otherwise they can contain brackets and they don't have to be matched.

Actually, that's not true. Account names can start with (. It's only a virtual posting if it starts with ( and ends with ).

Test:

2019-02-03 * Foo
    A(foo    10.00 EUR
    B

2019-02-03 * Foo
    (Afoo    10.00 EUR
    B
ledger -f d accounts
(Afoo
A(foo
B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants