Git Product home page Git Product logo

Comments (8)

LnL7 avatar LnL7 commented on August 17, 2024 1

I recall something about this related to the fact that the default version of bash on macOS is really old. Using the nix version of bash as your login shell might resolve this if that's the case.

from nix-darwin.

ElvishJerricco avatar ElvishJerricco commented on August 17, 2024

@LnL7 I have:

{ pkgs, ... }: {
  users.users.will = {
    description = "Will Fancher";
    home = "/Users/will";
    shell = "/run/current-system/sw/bin/bash";
  };
  environment.shells = [ pkgs.bashInteractive ];
}

So I thought I had that set up right. And in fact:

$ echo $BASH
/run/current-system/sw/bin/bash
$ echo $BASH_VERSION
4.4.12(1)-release

However, oddly enough, if I do these things directly from SSH then I get different results:

$ ssh hostname 'echo $BASH'
/bin/bash
$ ssh hostname 'echo $BASH_VERSION'
4.4.12(1)-release

It's using /bin/bash, though it does appear to be a recent version.

EDIT: Weird:

$ ssh hostname /bin/bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin16)
Copyright (C) 2007 Free Software Foundation, Inc.

from nix-darwin.

LnL7 avatar LnL7 commented on August 17, 2024

With #109 non-interactive cases shouldn't suffer from this anymore, but unless that was the cause somehow there's not much that can be done about it I think.

from nix-darwin.

ElvishJerricco avatar ElvishJerricco commented on August 17, 2024

@LnL7 though it's definitely less of a problem for only interactive logins to be slow, I think it's still a problem. The issue should probably remain open and be renamed.

from nix-darwin.

LnL7 avatar LnL7 commented on August 17, 2024

Oh, I confused this with #98.

from nix-darwin.

ElvishJerricco avatar ElvishJerricco commented on August 17, 2024

but unless that was the cause somehow there's not much that can be done about it I think.

@LnL7 How does NixOS avoid this problem? I remember reading somewhere that Bash can lazily load completions. Maybe we need to do that?

from nix-darwin.

LnL7 avatar LnL7 commented on August 17, 2024

Not sure, that's why my initial suspicion was the default bash 3.2.

from nix-darwin.

Kaali avatar Kaali commented on August 17, 2024

Pushed a fix for this which speeds up the interactive bash startup time significantly. Bash loads the completions from /share/ on demand, so they don't have to be preloaded. NixOS also fixed this in the same way in NixOS/nixpkgs#32534

from nix-darwin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.