1
0
Fork 0
mirror of synced 2024-11-22 15:25:34 -05:00
zimfw/modules
Eric Nielsen edd4e82d8a
[ssh] Update init.zsh
based on https://stackoverflow.com/a/48509425/2654518, which is based on
http://rabexc.org/posts/pitfalls-of-ssh-agents

Current code has a few issues: depends on `SSH_AUTH_SOCK` and
`SSH_AGENT_PID` env variables, which might not be available in every
shell session; and tries to create a new socket for agent-forwarding by
checking `SSH_AUTH_SOCKET` instead of `SSH_AUTH_SOCK`.

Also, it's safer to create the env file with 066 mode and in the user
home directory.

About not using `$` inside `(( ))`, this is what the the section
ARITHMETIC EVALUATION in zshmisc(1) says:

> Named parameters and subscripted arrays can be referenced by name
> within an arithmetic expression without using the parameter expansion
> syntax.

And according to http://www.bash2zsh.com/zsh_refcard/refcard.pdf:

> `var` (does not require `$` in front unless some substitution e.g.
> `${#var}` is needed, `$` is error if `var` is to be modified)

Closes #292
2018-09-17 15:38:48 -05:00
..
archive [archive] Fix lzma typo 2018-02-08 11:03:30 -05:00
autosuggestions [autosuggestions] Update submodule to version v0.4.2 2018-01-05 12:30:56 -05:00
completion [completion] Update init.zsh and README.md 2018-05-24 20:37:16 -05:00
custom Allow arbitrary ZIM location with ZIM_HOME 2017-09-04 17:25:01 -05:00
debug Allow arbitrary ZIM location with ZIM_HOME 2017-09-04 17:25:01 -05:00
directory [directory] Update README.md 2018-05-16 14:21:37 -05:00
environment [environment] Use setopt NO_FOO instead of unsetopt FOO 2018-05-18 13:54:48 -05:00
fasd remove broken quote in fasd function 2017-05-30 06:30:30 -07:00
git Update module README.md 2018-05-14 19:09:11 -05:00
git-info Update module README.md 2018-05-14 19:09:11 -05:00
history use consistent variable style 2015-12-19 09:48:29 -05:00
history-substring-search [history-substring-search] Fix bindkey back to what works 2018-09-17 15:32:44 -05:00
input [input] Update README.md 2018-05-17 09:01:04 -05:00
pacman [pacman] add yay to SUID handling AUR helpers 2018-08-21 02:02:46 -04:00
prompt [prompt] Simplify short_pwd function 2018-09-13 10:10:49 -05:00
ssh [ssh] Update init.zsh 2018-09-17 15:38:48 -05:00
syntax-highlighting Update to new repo URL 2018-01-03 10:30:12 -05:00
utility [utility] Move GNU-only code down 2018-06-16 21:49:20 -05:00