← 返回命令列表

Linux command

hledger-add 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Add transactions interactively

hledger add

Add to specific file

hledger add -f [journal.ledger]

Dry run without writing

hledger add --dry-run

Disable history suggestions

hledger add --no-history

说明

hledger add interactively prompts for new transactions and appends them to the journal file. It guides through date (defaults to today), description, account names, and amounts with auto-completion from existing entries. Ensures transactions balance before writing. Enter . when finished adding transactions.

参数

-f, --file _file_
Use specified journal file.
--dry-run
Print entry without writing.
--no-history
Disable suggestion of past values.

FAQ

What is the hledger-add command used for?

hledger add interactively prompts for new transactions and appends them to the journal file. It guides through date (defaults to today), description, account names, and amounts with auto-completion from existing entries. Ensures transactions balance before writing. Enter . when finished adding transactions.

How do I run a basic hledger-add example?

Run `hledger add` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -f, --file _file_ do in hledger-add?

Use specified journal file.