Skip to content

nixos/fish: remove promptInit in favor of interactiveShellInit#133161

Closed
kidonng wants to merge 1 commit intoNixOS:masterfrom
kidonng:promptInit
Closed

nixos/fish: remove promptInit in favor of interactiveShellInit#133161
kidonng wants to merge 1 commit intoNixOS:masterfrom
kidonng:promptInit

Conversation

@kidonng
Copy link
Copy Markdown
Member

@kidonng kidonng commented Aug 8, 2021

Motivation for this change

Derived from nix-community/home-manager#2231

promptInit does nothing special and can already be implemented via interactiveShellInit, so I suggest just keep the latter.

Things are slightly different in NixOS than Home Manager that both bash and zsh have a meaningful promptInit, so it may also be kept for consistency.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • 21.11 Release Notes (or backporting 21.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Aug 8, 2021
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Aug 8, 2021
@kidonng kidonng changed the title nixos/programs/fish: remove promptInit in favor of interactiveShellInit nixos/fish: remove promptInit in favor of interactiveShellInit Aug 19, 2021
Copy link
Copy Markdown
Member

@Flakebi Flakebi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. It doesn’t make sense to have two options that do exactly the same.

@dasj19
Copy link
Copy Markdown
Contributor

dasj19 commented Jan 13, 2022

I checked NixOS options:
promptInit: https://search.nixos.org/options?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=promptInit
interactiveShellInit: https://search.nixos.org/options?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=interactiveShellInit

As you can see promptInit and interactiveShellInit are present for the 3 popular shells bash zsh and fish and it makes sense to keep those options in sync. Now if promptInit should be removed from fish can the same be done for bash and zsh?

I think that the options should be consistent to not make shell tranzitioning a pain-in-the-ass

@kidonng
Copy link
Copy Markdown
Member Author

kidonng commented Jan 13, 2022

As you can see promptInit and interactiveShellInit are present for the 3 popular shells bash zsh and fish and it makes sense to keep those options in sync. Now if promptInit should be removed from fish can the same be done for bash and zsh?

This is already noted in the PR description. If we want to keep them consistent we probably want to make a custom prompt in fish's promptInit.

I think that the options should be consistent to not make shell tranzitioning a pain-in-the-ass

fish is not POSIX so the transition won't be trivial however. You can't expect to rename config key from bash/zsh to fish and everything just works.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 30, 2022
@bobby285271 bobby285271 added the 12.approvals: 2 This PR was reviewed and approved by two persons. label Aug 14, 2022
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Aug 14, 2022
@drupol
Copy link
Copy Markdown
Contributor

drupol commented Jun 6, 2023

@kidonng,

Could you please give a refresh this PR so we can move forward?

Thanks!

@dasj19
Copy link
Copy Markdown
Contributor

dasj19 commented Oct 25, 2023

will be nice to have this in the near future. please update the PR

@wegank wegank added 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 2.status: merge conflict This PR has merge conflicts with the target branch labels Mar 19, 2024
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 20, 2024
@wegank wegank marked this pull request as draft March 20, 2024 22:58
@drupol drupol closed this Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge conflict This PR has merge conflicts with the target branch 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants