summaryrefslogtreecommitdiff
path: root/users/seth/shell/bash.nix
blob: 0dfb717975cb0834639b621c8a74b1fbd91dec83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{config, ...}: {
	programs.bash = {
		enable = true;
		bashrcExtra = ''
			if [[ $(ps --no-header --pid=$PPID --format=comm) != "fish" && -z "$BASH_EXECUTION_STRING" ]]
			then
				exec fish
			fi
		'';
		historyFile = "${config.xdg.stateHome}/bash/history";
		historyFileSize = 1000;
		historySize = 100;
		sessionVariables = {
			EDITOR = "nvim";
			VISUAL = "nvim";
			CARGO_HOME = "${config.xdg.dataHome}/cargo";
			RUSTUP_HOME = "${config.xdg.dataHome}/rustup";
			LESSHISTFILE = "${config.xdg.stateHome}/less/history";
			NPM_CONFIG_USERCONFIG = "${config.xdg.configHome}/npm/npmrc";
		};
		shellOptions = [
			"cdspell"
			"checkjobs"
			"checkwinsize"
			"dirspell"
			"globstar"
			"histappend"
			"no_empty_cmd_completion"
		];
	};
}