Live data from Hacker News

Yash: Yet Another Shell

github.com

21–30 of 54 posts

Re: Yash: Yet Another Shell

#21

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 mayb…

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.

Re: Yash: Yet Another Shell

#22
post #20

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 mayb…

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

When I first switched to nushell as my daily driver, I spent a lot of time integrating fzf in various creative ways, which was a fine learning exercise I guess.

But once I realized that the auto complete was sensitive to my cwd, I've since been using my fzf bindings less and less.

I'm very happy I made the switch, for this and many other reasons.

Re: Yash: Yet Another Shell

#23
post #21

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 mayb…

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.

Or switchable buffers, some could be dedicated to certain projects.

Re: Yash: Yet Another Shell

#24

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 mayb…

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).

Re: Yash: Yet Another Shell

#25
post #20

Earlier quoted context omitted.

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

When I first switched to nushell as my daily driver, I spent a lot of time integrating fzf in various creative ways, which was a fine learning exercise I guess. But once I realized that the auto complete was sensitive to my cwd, I've since been using my fzf bindings less and less. I'm very happy I made the switch, for this and many other reasons.

What’s it give you that is significant?

Re: Yash: Yet Another Shell

#26
post #20

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 mayb…

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

What do you love about it? How would you demonstrate to a friend its value?

Re: Yash: Yet Another Shell

#27

It's quite nice. However a few basic functions are missing, like separate history for each instance.

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 op…

I really like https://atuin.sh/

It’s a free local (or remote) better shell history utility. Does a good job of syncing histories across multiple windows in my experience

Re: Yash: Yet Another Shell

#28
post #3

What's the tl;dr on why one would use Yash vs anything else? ReadMe doesn't really explain what's unique here.

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.

Re: Yash: Yet Another Shell

#30

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 mayb…

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.

Post reply on HN