1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-27 20:29:47 +01:00
home-manager/modules
Daniel Nagy 3071ea205d
starship: skip one program invocation on each shell init (#2862)
The code that is being evaled without the `--print-full-init` flag is
this:

```sh
__main() {
    local major="${BASH_VERSINFO[0]}"
    local minor="${BASH_VERSINFO[1]}"

    if ((major > 4)) || { ((major == 4)) && ((minor >= 1)); }; then
        source <(/nix/store/...-starship-1.3.0/bin/starship init bash --print-full-init)
    else
        source /dev/stdin <<<"$(/nix/store/...-starship-1.3.0/bin/starship init bash --print-full-init)"
    fi
}
__main
unset -f __main
```

This code checks for bash version >= 4.1 , which has been released in
2009. Since this version is widely unavailable in nixpkgs, we can skip
one program invocation and directly call `starship init bash
--print-full-init`.
2022-04-07 13:36:34 -04:00
..
accounts email: add fastmail.com email flavor (#2457) 2021-11-14 00:07:23 +01:00
config Replace pkgs.hostPlatform by pkgs.stdenv.hostPlatform 2021-12-03 23:36:50 +01:00
i18n/input-method kime: Fix kime systemd service broken (#2621) 2022-01-17 13:53:42 -05:00
launchd launchd: fix multiple agents 2022-02-27 14:58:54 +01:00
lib screen-locker: Add option to configure x screensaver cycle (#2853) 2022-04-04 23:32:27 -04:00
lib-bash nix: add support for nix profile 2022-03-26 15:11:28 +01:00
misc xdg-user-dirs: allow paths and define sessionVariables (#2757) 2022-04-04 23:32:03 -04:00
po Translate using Weblate (Turkish) 2022-03-27 09:44:00 +02:00
programs starship: skip one program invocation on each shell init (#2862) 2022-04-07 13:36:34 -04:00
services mpd-discord-rpc: init service (#2728) 2022-04-04 23:48:13 -04:00
targets Replace pkgs.hostPlatform by pkgs.stdenv.hostPlatform 2021-12-03 23:36:50 +01:00
default.nix modules: don't reference deprecated stdenv.lib (#1770) 2021-02-01 09:52:05 -05:00
files.nix nix: add support for nix profile 2022-03-26 15:11:28 +01:00
home-environment.nix nix: add support for nix profile 2022-03-26 15:11:28 +01:00
manual.nix docs: rename "doc" directory to "docs" 2021-08-17 19:35:11 +02:00
modules.nix mpd-discord-rpc: init service (#2728) 2022-04-04 23:48:13 -04:00
systemd-activate.rb Revert "systemd: use sd-switch" 2020-08-04 19:38:14 +02:00
systemd-activate.sh Revert "systemd: use sd-switch" 2020-08-04 19:38:14 +02:00
systemd.nix systemd: fix creation of user service unit files (#2867) 2022-04-07 02:38:20 -04:00
xcursor.nix xsession.pointerCursor: escape special characters in the cursor path (#2805) 2022-03-20 18:12:03 -06:00
xresources.nix Replace usage of literalExample 2021-10-13 00:16:10 +02:00
xsession.nix xsession: add xplugd service to accompany setxkbmap (#2450) 2021-12-23 15:38:44 -05:00