- Python 100%
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> |
||
|---|---|---|
| .fmf | ||
| .github/workflows | ||
| ci-tests | ||
| configshell | ||
| examples | ||
| tests | ||
| .gitignore | ||
| .packit.yaml | ||
| .pre-commit-config.yaml | ||
| configshell_fb | ||
| COPYING | ||
| pyproject.toml | ||
| python-configshell-fb.spec | ||
| README.md | ||
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.
- Mailing list: targetcli-fb-devel
- Source repo: GitHub
- Bugs: GitHub or Trac
- Tarballs: fedorahosted
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.