1
0
Fork 0
mirror of synced 2024-11-14 12:09:03 -05:00
Commit graph

8 commits

Author SHA1 Message Date
Eric Nielsen
5b90c96cd1 Update modules' README.md
Stick with the following style:

* Header 1 with the module name is in `lowercase`.
* Other headers are in `Sentence case`. Common header names that should
  be consistently used are `Aliases`, `Contributing`, `Functions`,
  `Settings`, and `Zsh options`.
* The names `Zim` and `Zsh` always appear capitalized, even in the
  middle of sentences.
* Prefer

      print 'code indented with 4 spaces'

  instead of
  ```zsh
  print 'code fenced by lines with three back-ticks'
  print 'unless you want syntax highlighting'
  ```
2018-12-17 14:11:16 -05:00
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
Matt Hamilton
add7f40799 fix broken variable 2015-12-23 05:13:09 -05:00
matt hamilton
4acb1660f4 fix ssh_{env,agent} vars 2015-12-23 08:57:13 +00:00
Matt Hamilton
9302507257 use sane dir if $TMPDIR is not set 2015-12-21 20:34:55 -05:00
Matt Hamilton
a1a56ac63f use consistent variable style 2015-12-19 09:48:29 -05:00
Matt Hamilton
267940385d add ssh documentation 2015-12-15 18:36:36 -05:00
Matt Hamilton
3a62391e0e initial commit 2015-12-15 00:12:17 -05:00