configs  Check-in [6fc784e055]

Overview
Comment:fish: Slight improvement of prompt
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 6fc784e055ec7285e4398af4c2cf6b953a61562af47d616442885ef752962ac9
User & Date: js 2020-02-02 21:18:20
Context
2020-02-08
14:27
make.fish: Use bmake for pkgsrc only if available check-in: 9ed4fcd17e user: js tags: trunk
2020-02-02
21:18
fish: Slight improvement of prompt check-in: 6fc784e055 user: js tags: trunk
2020-01-25
14:14
Fix typo in ixio.fish check-in: 6c2fcad7cc user: js tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to config/fish/functions/fish_right_prompt.fish.

1
2
3

4
5
6
7
8
9
10
11
12
13
14
15
16
function fish_right_prompt
	set -l code $status
	set -l jobs (jobs | wc -l)


	if test $jobs -gt 0
		set_color $fish_color_jobs
		echo "$jobs "
	end

	if test $code -gt 0
		set_color $fish_color_error
		echo "$code "
	end

	set_color normal
end



>

|
|
<
<

|
|
|
|



1
2
3
4
5
6
7


8
9
10
11
12
13
14
15
function fish_right_prompt
	set -l code $status
	set -l jobs (jobs | wc -l)
	set -l prompt

	test $jobs -gt 0
	and set -a prompt (set_color $fish_color_jobs)$jobs



	test $code -gt 0
	and set -a prompt (set_color $fish_color_error)$code

	echo $prompt

	set_color normal
end

Changes to config/fish/functions/make.fish.

1
2
3
4
5

6
7
8
9
10
# Automatically use bmake instead of make when using pkgsrc
function make
	if which bmake >/dev/null ^&1 && \
	    string match -q -r '/pkgsrc$|/pkgsrc/' $PWD
		# pkgsrc does not like MAKEFLAGS including -j

		env MAKEFLAGS= bmake $argv
	else
		command make $argv
	end
end





>
|




1
2
3
4
5
6
7
8
9
10
11
# Automatically use bmake instead of make when using pkgsrc
function make
	if which bmake >/dev/null ^&1 && \
	    string match -q -r '/pkgsrc$|/pkgsrc/' $PWD
		# pkgsrc does not like MAKEFLAGS including -j
		set -lx MAKEFLAGS
		command bmake $argv
	else
		command make $argv
	end
end