A User's view of Hledger

Learning about hledger

One favorite hledger shortcut

As I work on the command line, I like to find shortcuts for typing. Why type something longer when something shorter will work equally well?

One of my favorites is to use 3 letter abbreviations for account names. For example, let’s say I have the following account:


Yes, I can type a command such as

hledger register assets:BigBank:checking

However, I can shorten the account name to just “che,” as in

hledger register che

Note, though sometimes 3 letters may not be enough to disambiguate the account you want. For example, suppose that you have the following 2 accounts:


In the above case, we will need something other than “che” to distinguish between the two. For example, we could use

ank:che for assets:BigBank:checking


ion:che for assets:CreditUnion:checking

In short, I like to keep it short at the command line by using abbreviations. Often 3 letters works fine for an account name. In that case, no need to type anything longer!