obelisk icon indicating copy to clipboard operation
obelisk copied to clipboard

ob shell clobbers zsh shell on darwin

Open o1lo01ol1o opened this issue 3 years ago • 3 comments
trafficstars

ob shell

in an obelisk project clobbers my shell on nix 2.6.0 and darwin (10.15):

\[\][nix-shell:~/foo]$\[\] ps -p $$
  PID TTY           TIME CMD
72648 ttys003    0:06.18 bash --rcfile /private/tmp/nix-shell-72648-0/rc

This is undesirable because I can neither use completion or recall previous shell commands during development and, since I launch an IDE from the obelisk shell, the IDE inherits this shell as well.

o1lo01ol1o avatar Feb 17 '22 11:02 o1lo01ol1o

Are you able to restart zsh from within the ob shell ? This behaviour is normal for nix-shell, if I recall correctly. I use Fish and in order to access that functionality I have to enter the shell and then run fish from there. Or use the --run command similar to:

$ nix-shell shell.nix --run 'fish'

mankyKitty avatar Mar 01 '22 14:03 mankyKitty

I'm able to run zsh from within ob shell but doing so clears PATH. All other nix-shells are normal for me, including nix-shell -A shells.ghc

On Tue, Mar 1, 2022 at 2:05 PM Sean Chalmers @.***> wrote:

Are you able to restart zsh from within the ob shell ? This behaviour is normal for nix-shell, if I recall correctly. I use Fish and in order to access that functionality I have to enter the shell and then run fish from there. Or use the --run command similar to:

$ nix-shell shell.nix --run 'fish'

— Reply to this email directly, view it on GitHub https://github.com/obsidiansystems/obelisk/issues/900#issuecomment-1055476715, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5DC5KPBVSP2F5MSBID4ZLU5YP3JANCNFSM5OUOXVMQ . You are receiving this because you authored the thread.Message ID: @.***>

-- 328 Plymouth St Brooklyn, NY 11201

617 990 7876

o1lo01ol1o avatar Mar 01 '22 15:03 o1lo01ol1o

I'm taking a look at this now. Could you run ob shell -v on develop and confirm to me that the shell it is entering looks approximately like this?

/nix/store/4z4336r8yhyznz3fiscvz53wgdj43kjb-nix-2.3.11/bin/nix-shell -E $'{root, pkgs, shell}: ((import root {}).passthru.__unstable__.self.extend (_: _: {shellPackages = builtins.fromJSON pkgs;})).project.shells.${shell}' --arg root ./. --argstr pkgs $'{"backend":"/home/min/work/skeleton/backend","common":"/home/min/work/skeleton/common","frontend":"/home/min/work/skeleton/frontend"}' --argstr shell ghc

As you can see, there's nothing too crazy going on here. It really is a nix-shell under the hood. Can you also confirm for me that nix-shell -A shells.ghc

is not clobbered?

madeline-os avatar Jul 21 '22 19:07 madeline-os