Skip to content

Conversation

adamipc
Copy link

@adamipc adamipc commented Dec 4, 2024

Fixes #163.

@@ -674,7 +674,7 @@ endf
" Use current line as input to ledger entry and replace with output. If there
" are errors, they are echoed instead.
function! ledger#entry() abort
let l:output = split(system(s:ledger_cmd(g:ledger_main, join(['entry', getline('.')]))), '\n')
let l:output = split(system(s:ledger_cmd(g:ledger_main, join(['--', 'entry', getline('.')]))), '\n')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the entry subcommand go on the other side of (prior to) the argument separator?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you prefer I can change it. entry being a command is not an option so putting -- before it to end option processing is still correct.

I can imagine there being a user somewhere that might be using this current behavior to pass custom options to ledger when running entry and either version of the fix would break their workflow. Otherwise putting the -- before or after entry has the same effect.

@ledger ledger deleted a comment from adamipc Dec 4, 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

Successfully merging this pull request may close these issues.

Passing negative values to ledger#entry errors.
2 participants