Erlang Shell history

4 views
Skip to first unread message

Frank Muller

unread,
Jul 9, 2021, 6:28:53 PMJul 9
to Erlang-Questions Questions
Hi guys

Is there a way to remove the last N commands from shell history ?

/Frank

Fred Hebert

unread,
Jul 9, 2021, 6:54:17 PMJul 9
to Frank Muller, Erlang-Questions Questions
By default the cache lines are stored at `filename:basedir(user_cache,
"erlang-history")`, which will contain the log data. This is handled using
disk_log as an application (http://erlang.org/doc/man/disk_log.html) and it
uses the internal format, which has both a size check and an index. Deleting or
removing records would require specifically maintaining that format.

It might be easier to just drop the files, or replace the content of the bad
lines in the actual content file while maintaining the string length, since I
don't think it does an actual hash check, just a size check.

I've tried replacing a few lines out of mine and the in-line edit seems to work
fine as long as length is maintained.

Frank Muller

unread,
Jul 10, 2021, 3:55:21 AMJul 10
to Fred Hebert, Erlang-Questions Questions
Fred, I’m not very comfortable playing with disk_log. Would it be possible to prevent the next N commands to be stored in the history?

/Frank

Fred Hebert

unread,
Jul 11, 2021, 12:50:22 PMJul 11
to Frank Muller, Erlang-Questions Questions
You could probably just turn off shell history to run the commands. Nothing similar to what you ask exists today.
Reply all
Reply to author
Forward
0 new messages