adds helpers and packages for pinentry
This commit is contained in:
parent
3d0fd6065a
commit
6607c27f9c
2 changed files with 27 additions and 0 deletions
|
|
@ -52,6 +52,29 @@
|
|||
vterm_printf = ''
|
||||
printf "\e]%s\e\\" "$argv"
|
||||
'';
|
||||
setup_gpg = ''
|
||||
set -x GPG_TTY (tty)
|
||||
|
||||
if not test -d $HOME/.gnupg
|
||||
mkdir -p $HOME/.gnupg
|
||||
chmod 700 $HOME/.gnupg
|
||||
end
|
||||
|
||||
set pinentry_line "pinentry-program "(which pinentry-mac)
|
||||
if test -f $HOME/.gnupg/gpg-agent.conf
|
||||
if not grep -Fxq $pinentry_line $HOME/.gnupg/gpg-agent.conf
|
||||
echo $pinentry_line >> $HOME/.gnupg/gpg-agent.conf
|
||||
end
|
||||
else
|
||||
echo $pinentry_line > $HOME/.gnupg/gpg-agent.conf
|
||||
end
|
||||
|
||||
if pgrep gpg-agent > /dev/null
|
||||
killall gpg-agent
|
||||
end
|
||||
|
||||
echo "gpg + pinentry-mac installed and configured."
|
||||
'';
|
||||
};
|
||||
|
||||
interactiveShellInit = ''
|
||||
|
|
@ -60,6 +83,8 @@
|
|||
set hn (prompt_hostname)
|
||||
set fish_cursor_default block blink
|
||||
|
||||
set -x GPG_TTY (tty)
|
||||
|
||||
if test "$INSIDE_EMACS" != "vterm"
|
||||
set fish_cursor_insert line blink
|
||||
set fish_cursor_replace_one underscore blink
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue