Skip to content

Passing negative values to ledger#entry errors. #163

Open
@adamipc

Description

@adamipc

When passing a negative value to ledger#entry such as 2024-12-04 employer income -500 checking you get an error Illegal option -5 because vim-ledger doesn't escape the parameters to ledger entry.

Example:

2024-12-03 Employer
	Income:Salary	-$500
	Assets:Checking

2024-12-04 employer -500

(Note: Yes, I know that in most cases if you organize your transactions such that you reverse the accounts you don't have to specify a negative value. But for some of my work it is clearer to provide negative values to some entries.)

This can be fixed by adding -- to the command line run before entry so that the rest of the arguments are not treated as possible options.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions