configshell with additional modifications, see README
Find a file
Nick Venenga d7413fa75e Cap the path_history saved to the prefs file
Every 'cd' appends to path_history, and because the list is reloaded
from disk each run, it grows without bound (observed at 61k entries /
3.9 MB in the wild). save() rewrites the whole file on every 'cd', so
each one pickles and writes the full multi-megabyte dict.

Keep at most max_saved_path_history (10) entries when saving, shifting
path_history_index to match. The saved window normally ends at the newest
entry. If 'cd <' has moved the current position back past that window,
the window starts at the current position, so the current path is never
dropped. Interactive startup still resumes in the last directory and
'cd <' still reaches back into the previous session; the in-memory
history is not trimmed. An existing bloated prefs file shrinks on the
next save.

The current position can now be saved at index 0, so run_interactive()
also resumes there; before, index 0 only ever pointed at the starting
path.

Related: #60
Signed-off-by: Nick Venenga <nick@venenga.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 17:45:54 +01:00
.fmf Add ci-tests 2025-09-26 12:07:12 +08:00
.github/workflows ci: add CodeQL security scanning workflow 2025-09-26 12:07:12 +08:00
ci-tests Add ci-tests 2025-09-26 12:07:12 +08:00
configshell Cap the path_history saved to the prefs file 2026-12-02 17:45:54 +01:00
examples Move to PEP-621; Use configshell module name 2024-05-20 11:47:29 +02:00
tests Cap the path_history saved to the prefs file 2026-12-02 17:45:54 +01:00
.gitignore Update pre-commit hooks, ruff rules 2024-10-25 16:21:40 +02:00
.packit.yaml builds on the newest stable Fedora 2025-09-26 12:07:12 +08:00
.pre-commit-config.yaml [pre-commit.ci] pre-commit autoupdate 2026-12-02 17:15:59 +01:00
configshell_fb Fix configshell_fb import compatibility 2025-06-27 13:16:45 +08:00
COPYING Adding pre-commit config 2024-05-20 14:05:39 +02:00
pyproject.toml Fix configshell_fb import compatibility 2025-06-27 13:16:45 +08:00
python-configshell-fb.spec Ensure symbolic link to configshell exist before build 2025-09-26 12:07:12 +08:00
README.md Move to PEP-621; Use configshell module name 2024-05-20 11:47:29 +02:00

configshell-fb

A Python library for building configuration shells

configshell-fb is a Python library that provides a framework for building simple but nice CLI-based applications.

configshell-fb development

configshell-fb is licensed under the Apache 2.0 license. Contributions are welcome.

Since configshell-fb is used most often with targetcli-fb, the targetcli-fb mailing should be used for configshell-fb discussion.

Packages

configshell-fb is packaged for a number of Linux distributions including RHEL, Fedora, openSUSE, Arch Linux, Gentoo, and Debian.

"fb" -- "free branch"

configshell-fb is a fork of the "configshell" code written by RisingTide Systems. The "-fb" differentiates between the original and this version. Please ensure to use either all "fb" versions of the targetcli components -- targetcli, rtslib, and configshell, or stick with all non-fb versions, since they are no longer strictly compatible.