configs  Check-in [c4bb3283fb]

Overview
Comment:Update fish config for 3.1.0
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: c4bb3283fb7eecbfb255d9267e0609f347cf639dbd509d1a9b13235f5d4b8a25
User & Date: js on 2020-02-15 22:44:12
Other Links: manifest | tags
Context
2020-02-16
13:32
Add cross, to set up cross-compilation environment check-in: 7666b7ca75 user: js tags: trunk
2020-02-15
22:44
Update fish config for 3.1.0 check-in: c4bb3283fb user: js tags: trunk
15:45
zshrc: Add an option to get the old simple prompt check-in: a3bceca4d2 user: js tags: trunk
Changes

Modified config/fish/fish_variables from [20d69b9087] to [65933eb79f].

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
32
33
34
35
36
37
38
39
40
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR EDITOR:vim
SETUVAR --export LS_COLORS:di\x3d34\x3aow\x3d44\x3b37\x3atw\x3d44\x3b37\x3ast\x3d44\x3b37\x3aex\x3d31\x3asu\x3d7\x3b31\x3asg\x3d7\x3b31\x3aln\x3d33\x3aor\x3d7\x3b33\x3api\x3d32\x3ado\x3d32\x3abd\x3d35\x3acd\x3d35\x3aso\x3d32\x3a\x2a\x2ebz2\x3d36\x3a\x2a\x2edmg\x3d36\x3a\x2a\x2egz\x3d36\x3a\x2a\x2egpg\x3d36\x3a\x2a\x2erar\x3d36\x3a\x2a\x2etar\x3d36\x3a\x2a\x2etbz2\x3d36\x3a\x2a\x2etgz\x3d36\x3a\x2a\x2exz\x3d36\x3a\x2a\x2ezip\x3d36\x3a\x2a\x2eorig\x3d90\x3a\x2a\x7e\x3d90
SETUVAR --export MAKEFLAGS:\x2dj\x2016
SETUVAR __fish_init_2_39_8:\x1d
SETUVAR __fish_init_2_3_0:\x1d
SETUVAR __fish_init_3_x:\x1d

SETUVAR _fish_abbr_gpg:gpg2
SETUVAR _fish_abbr_vi:vim
SETUVAR fish_color_autosuggestion:303030
SETUVAR fish_color_cancel:normal
SETUVAR fish_color_command:205cb3
SETUVAR fish_color_comment:6600cc
SETUVAR fish_color_cwd:209060

SETUVAR fish_color_end:730099
SETUVAR fish_color_error:ff0000
SETUVAR fish_color_escape:00a6b2
SETUVAR fish_color_history_current:normal
SETUVAR fish_color_host:176945

SETUVAR fish_color_jobs:ffff00
SETUVAR fish_color_match:normal
SETUVAR fish_color_normal:normal
SETUVAR fish_color_operator:cc6fdf
SETUVAR fish_color_param:3377cf
SETUVAR fish_color_quote:ff751a
SETUVAR fish_color_redirection:bf4080
SETUVAR fish_color_search_match:ffff00
SETUVAR fish_color_selection:c0c0c0

SETUVAR fish_color_suffix:29bc7d
SETUVAR fish_color_user:00ff00
SETUVAR fish_color_valid_path:normal
SETUVAR fish_color_vcs:43d696
SETUVAR fish_color_vcs_braces:29bc7d
SETUVAR fish_greeting:
SETUVAR fish_key_bindings:fish_default_key_bindings
SETUVAR fish_pager_color_completion:normal
SETUVAR fish_pager_color_description:B3A06D\x1eyellow
SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan








>







>





>
|








>











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
32
33
34
35
36
37
38
39
40
41
42
43
44
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR EDITOR:vim
SETUVAR --export LS_COLORS:di\x3d34\x3aow\x3d44\x3b37\x3atw\x3d44\x3b37\x3ast\x3d44\x3b37\x3aex\x3d31\x3asu\x3d7\x3b31\x3asg\x3d7\x3b31\x3aln\x3d33\x3aor\x3d7\x3b33\x3api\x3d32\x3ado\x3d32\x3abd\x3d35\x3acd\x3d35\x3aso\x3d32\x3a\x2a\x2ebz2\x3d36\x3a\x2a\x2edmg\x3d36\x3a\x2a\x2egz\x3d36\x3a\x2a\x2egpg\x3d36\x3a\x2a\x2erar\x3d36\x3a\x2a\x2etar\x3d36\x3a\x2a\x2etbz2\x3d36\x3a\x2a\x2etgz\x3d36\x3a\x2a\x2exz\x3d36\x3a\x2a\x2ezip\x3d36\x3a\x2a\x2eorig\x3d90\x3a\x2a\x7e\x3d90
SETUVAR --export MAKEFLAGS:\x2dj\x2016
SETUVAR __fish_init_2_39_8:\x1d
SETUVAR __fish_init_2_3_0:\x1d
SETUVAR __fish_init_3_x:\x1d
SETUVAR __fish_initialized:3100
SETUVAR _fish_abbr_gpg:gpg2
SETUVAR _fish_abbr_vi:vim
SETUVAR fish_color_autosuggestion:303030
SETUVAR fish_color_cancel:normal
SETUVAR fish_color_command:205cb3
SETUVAR fish_color_comment:6600cc
SETUVAR fish_color_cwd:209060
SETUVAR fish_color_cwd_root:red
SETUVAR fish_color_end:730099
SETUVAR fish_color_error:ff0000
SETUVAR fish_color_escape:00a6b2
SETUVAR fish_color_history_current:normal
SETUVAR fish_color_host:176945
SETUVAR fish_color_host_remote:yellow
SETUVAR fish_color_jobs:yellow
SETUVAR fish_color_match:normal
SETUVAR fish_color_normal:normal
SETUVAR fish_color_operator:cc6fdf
SETUVAR fish_color_param:3377cf
SETUVAR fish_color_quote:ff751a
SETUVAR fish_color_redirection:bf4080
SETUVAR fish_color_search_match:ffff00
SETUVAR fish_color_selection:c0c0c0
SETUVAR fish_color_status:red
SETUVAR fish_color_suffix:29bc7d
SETUVAR fish_color_user:00ff00
SETUVAR fish_color_valid_path:normal
SETUVAR fish_color_vcs:43d696
SETUVAR fish_color_vcs_braces:29bc7d
SETUVAR fish_greeting:
SETUVAR fish_key_bindings:fish_default_key_bindings
SETUVAR fish_pager_color_completion:normal
SETUVAR fish_pager_color_description:B3A06D\x1eyellow
SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan

Modified config/fish/functions/cd.fish from [2053c70544] to [a09e77c998].




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
32
33
34
35
36
37
38
39
40






41



42



43
44
45
46
47
48
49
50
51



function cd --description 'Change directory'
	set -l MAX_DIR_HIST 25

	if test (count $argv) -gt 1
		printf "%s\n" (_ "Too many args for cd command")
		return 1
	end

	# Skip history in subshells.
	if status --is-command-substitution
		builtin cd $argv
		return $status
	end

	# Avoid set completions.
	set -l previous $PWD

	if test "$argv" = "-"
		if test "$__fish_cd_direction" = "next"
			nextd
		else
			prevd
		end
		return $status
	end

	# allow explicit "cd ." if the mount-point became stale in the meantime
	if test "$argv" = "."
		cd "$PWD"
		return $status
	end

	builtin cd $argv
	set -l cd_status $status

	if test $cd_status -eq 0 -a "$PWD" != "$previous"
		set -q dirprev
		or set -l dirprev
		set -q dirprev[$MAX_DIR_HIST]
		and set -e dirprev[1]






		set -g -a dirprev $previous



		set -e dirnext



		set -g __fish_cd_direction prev
	end

	if test $cd_status -eq 0
		ls
	end

	return $cd_status
end
>
>
>
|
|

|
|
|
|

|
|
|
|
|

|
|

|
|
|
|
|
|
|
|

|
|
|
|
|

|
|

|
|
|
|
|
>
>
>
>
>
>
|
>
>
>
|
>
>
>
|
|

|
|
|

|

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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#
# Wrap the builtin cd command to maintain directory history.
#
function cd --description "Change directory"
    set -l MAX_DIR_HIST 25

    if test (count $argv) -gt (test "$argv[1]" = "--" && echo 2 || echo 1)
        printf "%s\n" (_ "Too many args for cd command")
        return 1
    end

    # Skip history in subshells.
    if status --is-command-substitution
        builtin cd $argv
        return $status
    end

    # Avoid set completions.
    set -l previous $PWD

    if test "$argv" = "-"
        if test "$__fish_cd_direction" = "next"
            nextd
        else
            prevd
        end
        return $status
    end

    # allow explicit "cd ." if the mount-point became stale in the meantime
    if test "$argv" = "."
        cd "$PWD"
        return $status
    end

    builtin cd $argv
    set -l cd_status $status

    if test $cd_status -eq 0 -a "$PWD" != "$previous"
        set -q dirprev
        or set -l dirprev
        set -q dirprev[$MAX_DIR_HIST]
        and set -e dirprev[1]

        # If dirprev, dirnext, __fish_cd_direction
        # are set as universal variables, honor their scope.

        set -U -q dirprev
        and set -U -a dirprev $previous
        or set -g -a dirprev $previous

        set -U -q dirnext
        and set -U -e dirnext
        or set -e dirnext

        set -U -q __fish_cd_direction
        and set -U __fish_cd_direction prev
        or set -g __fish_cd_direction prev
    end

    if test $cd_status -eq 0
        ls
    end

    return $cd_status
end

Modified config/fish/functions/fgrep.fish from [ffd6c6c5b2] to [f114a20ecb].

1
2
3
4
5
6
7
function fgrep
	if which ggrep >/dev/null ^&1
		command ggrep -F --color=auto $argv
	else
		command fgrep --color=auto $argv
	end
end

|





1
2
3
4
5
6
7
function fgrep
	if type -q ggrep
		command ggrep -F --color=auto $argv
	else
		command fgrep --color=auto $argv
	end
end

Modified config/fish/functions/fish_prompt.fish from [ec0f8ebd8c] to [9d2d156587].

1
2
3
4
5
6
7
8
9
10
11
12
function fish_prompt --description 'Write out the prompt'
	set -l suffix
	switch "$USER"
		case root toor
			set suffix (set_color ff0000)'#'
		case '*'
			set suffix '>'
	end

	set -l branch (git symbolic-ref HEAD 2>/dev/null)
	set branch (string replace -r "^refs/heads/" "" $branch)
	set -l vcs




|







1
2
3
4
5
6
7
8
9
10
11
12
function fish_prompt --description 'Write out the prompt'
	set -l suffix
	switch "$USER"
		case root toor
			set suffix (set_color $fish_color_cwd_root)'#'
		case '*'
			set suffix '>'
	end

	set -l branch (git symbolic-ref HEAD 2>/dev/null)
	set branch (string replace -r "^refs/heads/" "" $branch)
	set -l vcs

Modified config/fish/functions/fish_right_prompt.fish from [856b4e0c5f] to [b9d40de7cb].

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









|





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_status)$code

	echo $prompt

	set_color normal
end

Modified config/fish/functions/grep.fish from [8d66115170] to [2009a4dbf8].

1
2
3
4
5
6
7
function grep
	if which ggrep >/dev/null ^&1
		command ggrep --color=auto $argv
	else
		command grep --color=auto $argv
	end
end

|





1
2
3
4
5
6
7
function grep
	if type -q ggrep
		command ggrep --color=auto $argv
	else
		command grep --color=auto $argv
	end
end

Modified config/fish/functions/ls.fish from [27c83c809a] to [98d8040878].

1
2
3
4
5
6
7
function ls --description 'List contents of directory'
	if which gls >/dev/null ^&1
		command gls --color=auto $argv
	else
		command ls --color=auto $argv
	end
end

|





1
2
3
4
5
6
7
function ls --description 'List contents of directory'
	if type -q gls
		command gls --color=auto $argv
	else
		command ls --color=auto $argv
	end
end

Modified config/fish/functions/make.fish from [185d351193] to [eff67be8e7].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Automatically use bmake instead of make when using pkgsrc, if necessary
function make
	if string match -q -r '/pkgsrc$|/pkgsrc/' $PWD
		# pkgsrc does not like MAKEFLAGS including -j
		set -lx MAKEFLAGS

		if which bmake >/dev/null ^&1 && \
			command bmake $argv
		else
			command make $argv
		end
	else
		command make $argv
	end
end






|








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Automatically use bmake instead of make when using pkgsrc, if necessary
function make
	if string match -q -r '/pkgsrc$|/pkgsrc/' $PWD
		# pkgsrc does not like MAKEFLAGS including -j
		set -lx MAKEFLAGS

		if type -q bmake
			command bmake $argv
		else
			command make $argv
		end
	else
		command make $argv
	end
end

Modified config/fish/functions/pw.fish from [86acf42758] to [8140148617].

1
2
3
4
5
6
7
8
9
10
11
12
13
function pw
	set -l clipboard
	if which pbcopy >/dev/null ^&1
		set clipboard pbcopy
	else if which xclip >/dev/null ^&1
		set clipboard xclip
	else
		echo "No clipboard handler found!"
		return 1
	end

	cryptopassphrase -k ~/.scrypt-pwgen.key $argv | tr -d '\n' | $clipboard
end


|

|








1
2
3
4
5
6
7
8
9
10
11
12
13
function pw
	set -l clipboard
	if type -q pbcopy
		set clipboard pbcopy
	else if type -q xclip
		set clipboard xclip
	else
		echo "No clipboard handler found!"
		return 1
	end

	cryptopassphrase -k ~/.scrypt-pwgen.key $argv | tr -d '\n' | $clipboard
end