-- Leo's gemini proxy

-- Connecting to thrig.me:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

History in shell programs


    $ grep HIST ~/.kshrc
    unset HISTFILE
    HISTSIZE=64
    LESSHISTFILE=-

Yes, I've mostly disabled the shell history. If it's important, it needs to be in a script, Makefile, or documentation. Or possibly all of the above. (In a work environment I would maintain a very detailed history, probably in ZSH, as there will be questions about who did what when when multiple sysadmins are involved with multiple systems. But that's a different story.)


    [quintin] Counter argument.. using your history search to find a
              command and save keystrokes

Yes, I used to do that, and it may turn into a huge history across multiple shell instances on multiple machines and maybe backups of that history and search and… have you looked at what the history contains?


    vi `which brogue`
    brogue
    cd share/video/music/
    recent
    mpvnv Domenico_Scarlatti_-_Harpsichord_Sonatas_-_Igor_Kipnis_Part_1-\[MfuZL_RZwIw\].mp4
    anonradio
    sv 25 ff 80
    cd
    ow g velociraptors
    cat `which dim`
    cd var/gemini/thrig.me/blog/2024/04/15/
    vi pantheon.gmi
    commit -m 'blog - pantheon'
    pushgem
    ow g shakey the robot
    mutt
    vi ~/tmp/history-in-shell-programs.gmi
    grep HIST ~/.kshrc
    blog ~/tmp/history-in-shell-programs.gmi
    ...

Important stuff. None of this is worth saving. What is? Here you might step back and think about what commands you run, what things you fiddle around with in your history, and whether any of that could be a script, better documented, or put into a build system or configuration management. This is how I got to my present "nope, don't use the shell history except for single instance short-term recall" state. A bunch of things did get put into scripts, better documented, etc.

-- Response ended

-- Page fetched on Fri May 3 22:11:45 2024