There is no mouse... Error on hledger startup

2 views
Skip to first unread message

mike marcott

unread,
Aug 22, 2025, 2:30:42 AMAug 22
to hledger
Hi,
I've had hledger installed on OpenBSD for a while now like 2 years.  Haven't really used it as I'm stuck in excel hell.  But wanted to get going on it now so I updated my system to the latest version 1.42.1 supported by OpenBSD through it's ports system.  Now when  I run hledger I get the following returned at a prompt:

There is no mouse --no-init --quit-at-eof --quit-if-one-screen --RAW-CONTROL-CHARS --shift=8 --squeeze-blank-lines --use-backslash option ("less --help" for help)

But when I type hledger >> test.txt and cat out the text it appears to start as normal.  see attached.   

I use PDKSH 
KSH_VERSION='@(#)PD KSH v5.2.14 99/07/13.2'
LANG=en_US.UTF-8
LC_CTYPE=en_US.UTF-8

and my TERM=xterm-256color

I can use hledger on a fedora system, but I'd prefer OpenBSD as it's my daily driver.  Any thoughts? 

Thank you!
Mike
test.txt

Simon Michael

unread,
Aug 22, 2025, 2:35:26 AMAug 22
to hle...@googlegroups.com
Oops, that's a fun message. hledger is assuming a version of `less` with mouse support. To work around, you could set HLEDGER_LESS, see the last paragraph at https://hledger.org/1.43/hledger.html#paging .  I'll fix it, thanks for the bug report.

-Simon
--
You received this message because you are subscribed to the Google Groups "hledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hledger+u...@googlegroups.com.

Attachments:
  • test.txt

Chunhui Ouyang

unread,
Aug 23, 2025, 3:30:11 AMAug 23
to hle...@googlegroups.com
Try recompiling and running the command correctly.

Try that?

* mike marcott <marco...@gmail.com> [2025-08-21 :32:36]:
> --
> You received this message because you are subscribed to the Google Groups "hledger" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to hledger+u...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/hledger/c65daab7-0445-4011-a764-f98fd60c245cn%40googlegroups.com.

> __ __ __
> / / / /__ ___/ /__ ____ ____
> / _ \/ / -_) _ / _ `/ -_) __/
> /_//_/_/\__/\_,_/\_, /\__/_/
> /___/
> -------------------------------------------------------------------------------
> hledger 1.42.1, openbsd-x86_64
> Usage: hledger COMMAND [OPTIONS] [-- ADDONOPTIONS]
> Commands:
>
> HELP (docs, demos..)
> commands show the commands list (default)
> demo [DEMO] show brief demos in the terminal
> help [-i|-m|-p] [TOPIC] show the hledger manual with info/man/pager
> --tldr [COMMAND] show command examples [for command] with tldr
> --help/-h [COMMAND] show command line help [for command]
> --info [COMMAND] show the hledger manual [for command] with info
> --man [COMMAND] show the hledger manual [for command] with man
> more help: https://hledger.org
>
> USER INTERFACES (alternate UIs)
> repl run commands from an interactive prompt
> run run command scripts from files or arguments
>
> ENTERING DATA (add or edit transactions)
> add add transactions using interactive prompts
> import add new transactions from other files, eg CSV files
>
> BASIC REPORTS (simple lists)
> accounts show account names
> codes show transaction codes
> commodities show commodity/currency symbols
> descriptions show transaction descriptions
> files show data files in use
> notes show note part of transaction descriptions
> payees show payee part of transaction descriptions
> prices show historical market prices
> stats show journal statistics
> tags show tag names
>
> STANDARD REPORTS (the most useful financial reports)
> print show full transaction entries, or export journal data
> aregister (areg) show transactions & running balance in one account
> register (reg) show postings & running total in one or more accounts
> balancesheet (bs) show assets and liabilities
> balancesheetequity (bse) show assets, liabilities and equity
> cashflow (cf) show changes in liquid assets
> incomestatement (is) show revenues and expenses
>
> ADVANCED REPORTS (more versatile/advanced reports)
> balance (bal) show balance changes, end balances, gains, budgets..
> roi show return on investments
>
> CHARTS (bar charts, line graphs..)
> activity show posting counts as a bar chart
>
> GENERATING DATA (generate or download journal entries; less common)
> close generate transactions to zero/restore/assert balances
> rewrite add postings to transactions, like print --auto
>
> MAINTENANCE (error checking, data management..)
> check run any of hledger's built-in correctness checks
> diff compare an account's transactions in two journals
> test run some self tests
>
> OTHER ADDONS (more hledger-* commands found in PATH):
>

Red Oak REI

unread,
Aug 23, 2025, 3:30:11 AMAug 23
to hledger
That worked!  Set the environmental variable minus the mouse and it starts .   

HLEDGER_LESS='--chop-long-lines --hilite-unread --ignore-case  --no-init --quit-at-eof --quit-if-one-screen --RAW-CONTROL-CHARS --shift=8 --squeeze-blank-lines --use-backslash'

For reference, OpenBSD's version of less appears to be a cleaned-up fork of less 458 from 2014.

Thank you for your help!
Reply all
Reply to author
Forward
0 new messages