Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend fish examples to match other shells #99

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions keychain.1
Original file line number Diff line number Diff line change
Expand Up @@ -375,11 +375,11 @@ key:
\& eval \`keychain \-\-eval id_rsa id_dsa 0123ABCD\`
.Ve
.PP
For the fish shell, use the following format:
For the fish shell, the following snippet can be added to your configuration file:
.PP
.Vb 3
\& if status \-\-is\-interactive
\& keychain \-\-eval \-\-quiet \-Q id_rsa | source
\& keychain \-\-eval \-\-quiet \-Q id_rsa id_dsa 0123ABCD | source
\& end
.Ve
.PP
Expand Down Expand Up @@ -415,6 +415,19 @@ This is equivalent for C shell (including tcsh):
\& endif
.Ve
.PP
Likewise, the following commands can be used in fish:
.PP
.Vb 8
\& keychain id_rsa id_dsa 0123ABCD
\& test \-z "$hostname"; and set hostname (uname \-n)
\& if test \-f "$HOME/.keychain/$hostname\-fish"
\& source $HOME/.keychain/$hostname\-fish
\& end
\& if test \-f "$HOME/.keychain/$hostname\-fish\-gpg"
\& source $HOME/.keychain/$hostname\-fish\-gpg
\& end
.Ve
.PP
To load keychain variables from a script (for example from cron) and
abort unless id_dsa is available:
.PP
Expand Down