nixos/shell: provide prompt information when SSH_AUTH_SOCK exists
This commit is contained in:
parent
2f88baa90f
commit
be46e02c61
1 changed files with 7 additions and 0 deletions
|
@ -133,6 +133,7 @@ in
|
||||||
settings = {
|
settings = {
|
||||||
format = lib.concatStrings [
|
format = lib.concatStrings [
|
||||||
"$all"
|
"$all"
|
||||||
|
"\${custom.sshAuthSocket}"
|
||||||
"$line_break"
|
"$line_break"
|
||||||
"\${custom.ranger}"
|
"\${custom.ranger}"
|
||||||
"$jobs"
|
"$jobs"
|
||||||
|
@ -160,6 +161,12 @@ in
|
||||||
command = "echo \"✦\"";
|
command = "echo \"✦\"";
|
||||||
style = "bold 208";
|
style = "bold 208";
|
||||||
};
|
};
|
||||||
|
custom.sshAuthSocket = {
|
||||||
|
when = "test -S \"$SSH_AUTH_SOCK\"";
|
||||||
|
command = "echo -e \"SSH Auth Agent\"";
|
||||||
|
style = "124";
|
||||||
|
format = "with [$output]($style) ";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue