holzschu / a-shell

A terminal for iOS, with multiple windows
BSD 3-Clause "New" or "Revised" License
2.6k stars 117 forks source link

Add shell history file #34

Open rafal-1990 opened 4 years ago

rafal-1990 commented 4 years ago

After closing a-shell app, the shell history (last entered commands) is not present anymore. So it would be great to add a history file (e.g. .sh_history) which stores the entered commands and is automatically loaded when a-shell starts. Also a possibility to search in the history (like Ctrl+R in bash) would be nice.

holzschu commented 4 years ago

I tried several things with that one. Currently, the history is stored on a per-window basis, so each window has its own history (like the Terminal in OSX). If you close a window with "exit", then it erases all things related to this window, including the history. If you leave it in the background, then the history is stored and comes back when you reopen the app (or at least it does come back for me. If you have history being erased, let's keep talking so we can figure out what is happening).