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

Make history record success/failure of each entry #38

Open
BenAveling opened this issue Jul 2, 2021 · 0 comments
Open

Make history record success/failure of each entry #38

BenAveling opened this issue Jul 2, 2021 · 0 comments

Comments

@BenAveling
Copy link

As well as recording the command and the time, it would useful if tcsh could also record the "$status" (AKA "$?") returned by each command.

This would allow the user to see not just what commands have been run, but which ones had an effect or not.

For example, history could display an extra column, with perhaps one character for success and a different character for failure.

Personally, I like to use "/" for success, because it reminds me of a tick, and I use "X" for failure. But maybe that's just me.

Another option would be to display the actual numeric status, or to display "X" for failure and a blank " " for success.

Without having checked the existing codebase, I see two potential issues:

  • if the history list is updated when the command is issued, then it would need to be modified when the command has succeeded/failed.
  • if there is a need to preserve the format of the .history file, then some alternate way of storing the status codes would be needed.

If people might be prepared to consider such a feature (and it could of course be implemented as optional), then I am prepared to investigate and see if I can produce a working proof-of-concept.

@suominen suominen changed the title (wish) History would record success/failure of each request Make history record success/failure of each command Nov 17, 2021
@suominen suominen changed the title Make history record success/failure of each command Make history record success/failure of each entry Nov 17, 2021
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

2 participants