I’ve used distrobox more and more and am at the point where I need to start saving and integrating history differently. Or like, when I’m installing and building something complicated, I need to start saving that specific session’s history. I am curious what others might be doing and looking for simple advice and ideas.

  • N0x0n@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    4 months ago

    Genuine question, I see alot of people concerned by losing their shell history, any specific reason why?

    I mean I keep mine to default and auto-delete every shell history after logout :/ And I never seemed bothered, I never go up more than 10 lines anyway… Whats the point/use case of keeping a whole shell history over time?

    • j4k3@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      4 months ago

      For me, it is not about “lost history.” It is about contextual history and knowing if some tool I built in a distrobox uses only dandified, pacman, aptitude, portage; or if it also uses venv, conda; or if there was some install script.

      It would be nice if I was on a stable kernel to avoid such a dependency salad, but that is not within the scope of playing with the latest AI toys where new tools and exploring new spaces is constantly creating opportunities to explore.

      It would be nice if I was some genius full stack dev that could easily normalized all the tools under a single dependency containerization scheme, but that is not within my mental scope or interests at the present. For most AI tools, I follow the example given and only add a distrobox container as an extra layer of dependency buffering from the host. The ability to lazily see the terminal history for each of those containers is a handy way to see exactly what I did months ago.

      • N0x0n@lemmy.ml
        link
        fedilink
        arrow-up
        0
        ·
        4 months ago

        Thanks for your insight ! Even though I didn’t really get everything, but It seems there is a specific use case !

        Maybe overtime with more experience I will get there and have a better understanding of what you meant with contextual history.

  • taaz@biglemmowski.win
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    4 months ago

    I have been pretty content with just zsh with fzf - extends the ctrl+R with interactive fuzzy search across the history.

    In theory some session like behaviour should be easy to make with a little script that changes $HISTFILE

  • devfuuu@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    4 months ago

    My default is too use fish shell in all my machines. Never worried again about losing history.

    • j4k3@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      4 months ago

      I’m not worried about losing my history. I’m looking for a way to seamlessly create a dual history where the default is to have a unique history for each distrobox container with a way to integrate a full history from my primary terminal, likely with timestamps to switch back and forth. I can think of a couple of ways of doing this, but I wonder if others have explored already and found a better way.

  • Shdwdrgn@mander.xyz
    link
    fedilink
    English
    arrow-up
    0
    ·
    4 months ago

    I think this is the only change I’ve made that affects my history… It simply ignores multiple copies of a command when you repeat it multiple times, making it easier to up-arrow through the unique things I’ve executed.

    export HISTCONTROL=ignoredups

  • Eager Eagle@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    4 months ago

    Just fzf + the same version control I use for my dotfiles. I have no interest in mixing machine histories like atuin offers, so that makes sense to me.