ledger-mode icon indicating copy to clipboard operation
ledger-mode copied to clipboard

Tab completions with account aliases include keyword "alias"

Open trev-dev opened this issue 2 years ago • 3 comments

Given the following account defined in my accounts.ledger:

account Expenses:Business:OFC:Hosting
  alias Office:Hosting

When I start typing the alias Office:Hosting and hit <TAB> the completion resolves to alias Office:Hosting

trev-dev avatar Jan 28 '22 21:01 trev-dev

Yes, as designed. What do you think it should do?

On Fri, Jan 28, 2022 at 14:58 trevDev(); @.***> wrote:

Given the following account defined in my accounts.ledger:

account Expenses:Business:OFC:Hosting alias Office:Hosting

When I start typing the alias Office:Hosting and hit <TAB> the completion resolves to alias Office:Hosting

— Reply to this email directly, view it on GitHub https://github.com/ledger/ledger-mode/issues/327, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGWWLEEMHHLZ3THIBRIWALUYMGQBANCNFSM5NB3I65Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Craig, Corona De Tucson, AZ [image: missile_flyout] enderw88.wordpress.com

enderw88 avatar Jan 28 '22 22:01 enderw88

The hope is that it would complete the alias alone and not include the keyword alias.

For example, this:

2022-01-28 * Digital Ocean
    Off| <-- cursor
    Assets:Business:Chequing

Would complete into this:

2022-01-28 * Digital Ocean
    Office:Hosting
    Assets:Business:Chequing

And not an invalid account name like:

2022-01-28 * Digital Ocean
    alias Office:Hosting
    Assets:Business:Chequing

"Craig Earls" @.***> writes:

Yes, as designed. What do you think it should do?

On Fri, Jan 28, 2022 at 14:58 trevDev(); @.***> wrote:

Given the following account defined in my accounts.ledger:

account Expenses:Business:OFC:Hosting alias Office:Hosting

When I start typing the alias Office:Hosting and hit <TAB> the completion resolves to alias Office:Hosting

— Reply to this email directly, view it on GitHub https://github.com/ledger/ledger-mode/issues/327, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGWWLEEMHHLZ3THIBRIWALUYMGQBANCNFSM5NB3I65Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

trev-dev avatar Jan 28 '22 23:01 trev-dev

Sorry, I missed the extra 'alias'. The regexes allow spaces in account names. They don't recognize that "alias" at the beginning is a keyword. This is the first time since I wrote those about 11 years ago anyone has asked for this. You are welcome to try to hack this into the regexes, but there are serious dragons in there.

On Fri, Jan 28, 2022 at 4:15 PM trevDev(); @.***> wrote:

The hope is that it would complete the alias alone and not include the keyword alias.

For example, this:

2022-01-28 * Digital Ocean
Off| <-- cursor
Assets:Business:Chequing

Would complete into this:

2022-01-28 * Digital Ocean
Office:Hosting
Assets:Business:Chequing

And not an invalid account name like:

2022-01-28 * Digital Ocean
alias Office:Hosting
Assets:Business:Chequing

"Craig Earls" @.***> writes:

Yes, as designed. What do you think it should do?

On Fri, Jan 28, 2022 at 14:58 trevDev(); @.***> wrote:

Given the following account defined in my accounts.ledger:

account Expenses:Business:OFC:Hosting alias Office:Hosting

When I start typing the alias Office:Hosting and hit <TAB> the completion resolves to alias Office:Hosting

— Reply to this email directly, view it on GitHub https://github.com/ledger/ledger-mode/issues/327, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAGWWLEEMHHLZ3THIBRIWALUYMGQBANCNFSM5NB3I65Q

. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android

< https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/ledger/ledger-mode/issues/327#issuecomment-1024733931, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGWWLCUHIQ6HYJQIHK2WMDUYMPRFANCNFSM5NB3I65Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

-- Craig, Corona De Tucson, AZ [image: missile_flyout] enderw88.wordpress.com

enderw88 avatar Jan 29 '22 02:01 enderw88

Stale

trev-dev avatar Nov 24 '22 20:11 trev-dev