I kind of wish there was a shell that had the option for histories localized to a directory. So I can go into a directory and then look at what I was doing when I was last in that directory. Some complicated compilation command line to compile and link a source file and a bunch of libraries that was run when I was last in that directory, for example. There'd still be the 'history' command for everything and then maybe 'dhistory' for the commands that I ran in that specific directory when I was last there.
I kind of wish there was a project-oriented complete desktop environment, where you could enter a project and everything was context-sensitive to it. editor, files, directories, shell, browser, whatever.
sort of a way to work on projects, then put them on old.
and maybe meta-projects to choose, track, arrange, manage some or all projects. maybe by area of responsibility.
nushell does this by default, sort of. it will show you autocompletes that are relevant to the current directory and will fallback to history more generally.
i’m a huge nushell fan. if you can stand a non POSIX shell, it’s great for working with any kind of structured data and has a sane mostly FP scripting language
Neat idea. I think I’d like it to maintain a global history and local, with some UI affordance to remind me both exist and perhaps what are the last few entries.
A lot of my commands would work in any directory, but sometimes the directory matters and I run it in the wrong place.
What I do is split up my work by context into different screen (or tmux, depending on mood when I set up the computer) sessions. I have a script that attaches one by name if it's present and otherwise creates one with the name in question after setting an environment variable that's therefore inherited by any shells spawned in that screen session. Various things in my bashrc then look at that environment variable to point things at a context specific config directory, including setting HISTFILE to a context specific history file and sourcing a context specific bashrc (in which I often cd to a relevant directory and may set some variables, functions, and aliases specific to the context).
If you are open to using zsh, take a look at https://github.com/larkery/zsh-histdb . It stores your zsh history in a sqlite3 db. The benefit of this is that your history is well-structured and indexed, and that you can use SQL to query it. The working directory, exit status, and more are included, so you can easily implement your own smart history tools.
This is a great idea. Just better history management in general would be such a boon. If I have multiple console windows open, I still don't know what will wind up in .bash_history, and what (which?) history will be there when I start a new one.
I've never seen a mid-sized C codebase that annotate "restrict", "nonnull" pointers and "pure", "const" functions so thoroughly, very interesting, would be an important case study if I ever get around to write C optimizer passes.
Scenario: Something forces a reboot. I've got 4 bash shells open. I've been doing some compilation & linking of libraries with a crazy long gcc command. After I reboot, that's not in my history because only the first-opened bash shell's history seems to get saved and I've gotta recreate the commandline again. Is there any shell that would let me see all the history from all of the different shells I might have had open?
It's a comfortable, feature-rich interactive shell like bash, but with a relatively clean and small codebase, and the binary is only a third of bash's size. It's also much easier to build from source. Sort of a suckless bash replacement. Not compatible to most bash features though, focus is on POSIX compatibility.
Not sure, but it says it's the most POSIX-compliant shell. Sometimes you have a requirement for a project like "must use a POSIX-compliant shell". If all the other existing shells are only mostly POSIX-compliant, then you'd want Yash.
UncleOxidant|1 year ago
m463|1 year ago
sort of a way to work on projects, then put them on old.
and maybe meta-projects to choose, track, arrange, manage some or all projects. maybe by area of responsibility.
nodar86|1 year ago
chrash|1 year ago
i’m a huge nushell fan. if you can stand a non POSIX shell, it’s great for working with any kind of structured data and has a sane mostly FP scripting language
aoanevdus|1 year ago
A lot of my commands would work in any directory, but sometimes the directory matters and I run it in the wrong place.
dllthomas|1 year ago
karshan|1 year ago
oftenwrong|1 year ago
tmm1|1 year ago
vogelke|1 year ago
https://bezoar.org/src/dotfiles/README.htm#command-history
akoboldfrying|1 year ago
emmelaich|1 year ago
laktak|1 year ago
https://github.com/laktak/tome
johnisgood|1 year ago
fuhsnn|1 year ago
postepowanieadm|1 year ago
UncleOxidant|1 year ago
KerrAvon|1 year ago
klysm|1 year ago
Lammy|1 year ago
potus_kushner|1 year ago
0xbadcafebee|1 year ago
DiggyJohnson|1 year ago