On 2024-07-28 at 09:29, Yassine Chaouche wrote: > Le 7/28/24 à 12:19, songbird a écrit : > >> to keep my own setup consistent and to not keep certain things in >> history i actually do the opposite of what you want because i want >> certain commands already preloaded in my history for all windows >> when i start up and then i adjust my environment based upon which >> pty or directory i'm in. > > I'm scratching my head here. > > Can anyone provide a solid example or reason why preloading commands > in history is necessary?
It's never *necessary*, AFAIK, but it *is* often convenient. (And in many things, convenience is *the* deciding factor.) It's often *far* easier to repeat a lengthy command from history (e.g. via Ctrl+R and typing part of the command), either verbatim or with modifications, than by retyping it from scratch. I rely on this extensively - more in my terminal-based SQL-database interaction sessions than in the shell itself, because the commands there are far more complex than those in the shell, but I certainly do also rely on it in the shell. If you expect to want to use similar commands repeatedly over multiple shell sessions, why wouldn't you want them there in the history for ready access? -- The Wanderer The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. -- George Bernard Shaw
signature.asc
Description: OpenPGP digital signature