3 Commits
Author SHA1 Message Date
Adrien OllierandJonathan White caa7d14761 Cleanup line reader code for CLI (#13330)
* refactor(LineReader): Make use of the LineReader class in a much simpler way

The LineReader is made a concrete class whose declaration is independent of the readline library. Only its implementation depends on the presence or absence of the readline library. The LineReader code is embedded in a new library : line_reader, to make the cli library independant of the USE_READLINE definition.

* refactor(readline): better FindReadline module

The readline library is now searched with pkg-config first. If pkg-config is not installed, the search is manual. In both cases, the Readline::readline target is created, embedding transitive requirements.

FindReadline module was written with the help of Le Chat AI (https://chat.mistral.ai/chat)

---------

Co-authored-by: Jonathan White <[email protected]>
2026-07-23 06:41:11 -04:00
a1346054 e3c7b570ae Minor documentation and script cleanups (#6868)
* Remove mention of no longer used IRC network

Channels exist on matrix, and on libera.chat now.

* Correctly match only files with .png extension

The current search would match files such as 'createpng'.

* Fix comparison in script

The result was always false, due to comparing a literal string instead of a variable.

* Use correct license files from upstream

Correct license files obtained from:
https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
https://www.gnu.org/licenses/gpl-3.0.txt
https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
https://www.gnu.org/licenses/lgpl-3.0.txt

* Refresh several shell scripts

This fixes several shellcheck warnings, as well as makes the code more
robust and have consistent codestyle between all the files.

* Trim excess whitespace
2021-09-21 00:17:46 -04:00
James Ring b1eda37cca CLI: Add interactive session mode command open
This change adds a GNU Readline-based interactive mode to keepassxc-cli. If GNU Readline is not available, commands are just read from stdin with no editing or auto-complete support.

DatabaseCommand is modified to add the path to the current database to the arguments passed to executeWithDatabase. In this way, instances of DatabaseCommand do not have to prompt to re-open the database after each invocation, and existing command implementations do not have to be changed to support interactive mode.

This change also introduces a new way of handling commands between interactive and batch modes.

* Fixes #3224.
* Ran make format
2019-09-28 11:24:42 -04:00