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

Fix ledger/vim-ledger issue #163 by disabling further option processing #164

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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