summaryrefslogtreecommitdiffstats
path: root/nixos/modules/programs/bash
AgeCommit message (Collapse)Author
2019-04-29treewide: Remove usage of isNullDaniel Schaefer
isNull "is deprecated; just write e == null instead" says the Nix manual
2019-03-20nixos/bash: do not use /var/runBob van der Linden
2019-03-05nixos/bash: fix root promptLinus Heckemann
b4b67177b53c23c6fb77aea7f0bc5c559f8bebe5 introduced a regression of its own: the prompt would end with $ for all users, not with # for root as it should.
2018-12-17nixos/bash: Fix prompt regression in Emacs term modeTad Fisher
2018-12-07nixos/bash: set title in PS1Yegor Timoshenko
2018-11-04nixos: programs.bash: Fix comment about completionRobert Hensing
`XDG_DATA_DIRS` already includes what is typically the `share` directory. Adding an extra `share` breaks it.
2018-10-14nixos/shells: enable to nullify already defined aliasesMitsuhiro Nakamura
2018-10-14nixos/shells: programs.*sh.shellAliases override environment.shellAliasesMitsuhiro Nakamura
2018-10-06nixos/bash: Use `escapeShellArg` for shell aliasesc74d
This patch uses the library function `lib.escapeShellArg` to improve the handling of shell aliases in the NixOS module `bash`, copying the corresponding change made to the `zsh` module in commit 1e211a70cbdaf230a18ea4cb67a959039d5c2ddb (for which GitHub pull request #47471 was filed). This patch resolves GitHub issue #16973. This change presumably also should be copied to the `fish` module, but I don't know `fish` syntax so that won't be done by me. GitHub: Close NixOS/nixpkgs#16973.
2018-08-30nixos/shells: fix indent everywhereJan Malakhovski
to comply with `doc/coding-conventions.xml`
2018-08-30nixos/shells: avoid overriding the environment for child shellsTor Hedin Brønner
A shared exported guard `__NIXOS_SET_ENVIRONMENT_DONE` is introduced that can be used to prevent child shells from sourcing `system.build.setEnvironment` the second time. This fixes e.g. `nix run derivation` when run from e.g. ZSH through the console or ssh. Before this Bash would resource the common environment resetting the `PATH` environment variable. We also export `system.build.setEnvironment` to `/etc/set-environment` making it easy to reset the common environment with `. /etc/set-environment` when needed and to grep for environment variables in `/etc` (which was the motivation of #30418). This reverts changes made in b00a3fc6fd82834114771f2115a2b032f0ebfe29 (the original #30418).
2018-04-13nixos: enable bash command completion by defaultBjørn Forsman
Because it improves out-of-the-box user experience a lot (IMHO). (zsh completion is already on by default.) Remove "programs.bash.enableCompletion = true" from nixos-generate-config.pl, which feels superflous now.
2018-03-08Merge pull request #30418 from LnL7/inline-set-environmentDaiderd Jordan
nixos: inline set-environment for bash and zsh
2018-02-28programs/bash: install nix-bash-completions if completion is enabledTor Hedin Brønner
2017-12-10nixos/programs/bash: document that /etc/bash_completion.d is obsoleteOrivej Desh
https://github.com/scop/bash-completion/blob/fbd52a5e31747beb4974da97b9d3ed4f6ceb7a61/bash_completion#L2070-L2078
2017-12-10nixos/programs/bash: Let bash-completion lazy load scriptsTor Hedin Brønner
As described in detail here: https://github.com/NixOS/nixpkgs/issues/32533 bash will load completion scripts in $p/share/bash-completion/completions/ on startup instead of letting bash-completion do it's lazy loading. Bash startup will then slow down (very noticeable when bash-completion is installed in a profile). This commit leaves loading of scripts in the hands of bash-completion, improving startup time for everyone using `enableCompletion`. fixes #32533
2017-11-20nixos/bash: mark `inputrc` etc file as defaultRobert Helgesson
The bash module currently sets the `/etc/inputrc` unconditionally, which prevents easy user override. This commit lowers the priority of the setting to "option default" level, which allows a user to override the value using either environment.etc."inputrc".text = … or environment.etc."inputrc".source = …
2017-10-14nixos: inline set-environment for bash and zshDaiderd Jordan
2016-09-28bash-completion: change attribute nameRobert Helgesson
This changes the attribute name of bash-completion from `bashCompletion` to `bash-completion`. Keeps `bashCompletion` as an alias for the new name.
2016-07-09nixos/bash: enable colors during completionLuca Bruno
2016-06-12Use shell packages to select the user's shellzimbatm
The string type is still available for backward-compatiblity.
2016-04-18Revert "Revert "Remove which -> type -P alias.""Eelco Dolstra
This reverts commit ddd480ac30579d780c8ffa9c590a8c86bb36d8d2. Gave it some more thought.
2016-03-25Revert "Remove which -> type -P alias."Eelco Dolstra
This reverts commit e8e8164f348a0e8655e1d50a7a404bdc62055f4e. I misread the original commit as adding the "which" package, but it only adds it to base.nix. So then the original motivation (making it work in subshells) doesn't hold. Note that we already have some convenience aliases that don't work in subshells either (such as "ll").
2016-03-03Remove which -> type -P alias.Domen Kožar
Aliases are not the same as programs. They won't work in subshells. It's better to just use which as it's only 88K.
2015-11-18nixos: remove debug code accidentally checked in with ↵Peter Simons
833a5971568f8b5ea189126d61d8461d039bb93c
2015-11-18nixos: configure bash prompt in Emacs' shell-mode, even if TERM=dumbPeter Simons
The idea that the interactive bash prompt isn't set in case of TERM=dumb is intended to fix problems when other machines log remotely into a NixOS installation via Tramp. A side-effect that change was, however, that Emacs' shell-mode no longer had a correct prompt. I suppose the presence of INSIDE_EMACS=24.5.2,comint is a sufficiently unique indication that the current interactive shell is running inside of an Emacs and that the prompt can thus be configured safely.
2015-10-22nixos/bash: use simple prompt for dumb terminalsNikolay Amiantov
2015-01-12command-not-found: Add ZSH SupportSpencer Whitt
2014-12-18Revert "enable bash autocomplete by default"Eelco Dolstra
This reverts commit ee8e15fe76a235ae3583d4e8cb4bb370f28c5eae. See discussion at https://github.com/NixOS/nixpkgs/commit/ee8e15fe76a235ae3583d4e8cb4bb370f28c5eae.
2014-12-08enable bash autocomplete by defaultDomen Kožar
2014-04-29Remove the option ‘programs.bash.enable’Eelco Dolstra
NixOS has a pervasive dependency on bash. For instance, the X11 session script sources /etc/profile to get a reasonable environment. Thus we should not provide an option to disable bash. Also, enabling zsh no longer sets ‘users.defaultUserShell’ to zsh, to prevent a collision with bash's definition of the same option. (Changing the default shell is also something that should be left to the user.)
2014-04-14Rewrite ‘with pkgs.lib’ -> ‘with lib’Eelco Dolstra
Using pkgs.lib on the spine of module evaluation is problematic because the pkgs argument depends on the result of module evaluation. To prevent an infinite recursion, pkgs and some of the modules are evaluated twice, which is inefficient. Using ‘with lib’ prevents this problem.
2013-10-11bash: place interactiveShellInit at the end to be able to override existing ↵Domen Kožar
settings
2013-10-10Move all of NixOS to nixos/ in preparation of the repository mergeEelco Dolstra