Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve CLI command history across sessions. The up/down arrows #79

Closed
olofhagsand opened this issue Mar 6, 2019 · 1 comment
Closed

Comments

@olofhagsand
Copy link
Member

Similar to sh/bash history The up/down arrows can be used to find commands executed earlier in the current CLI session. Store a list of commands executed by a user in a hidden file in the user's home directory. When clixon_cli is started, the up arrow can be used to find the commands run in the last CLI session.
(from @mgsmith1000 )

olofhagsand added a commit that referenced this issue Mar 8, 2019
…down arrows](#79)

  * The design is similar to bash history:
      * The CLI loads/saves its complete history to a file on entry and exit, respectively
      * The size (number of lines) of the file is the same as the history in memory
      * Only the latest session dumping its history will survive (bash merges multiple session history).
      * Tilde-expansion is supported
      * Files not found or without appropriate access will not cause an exit but will be logged at debug level
  * New config options: CLICON_CLI_HIST_FILE with default value `~/.clixon_cli_history`
  * New config options: CLICON_CLI_HIST_SIZE with default value 300.
@olofhagsand
Copy link
Member Author

Done, see CHANGELOG for 3.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant