From: Ian Kelling Date: Tue, 4 Aug 2020 21:28:59 +0000 (-0400) Subject: sl better docs X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=31ef575aeaf24f75709b7f049d60023f7df38343;p=distro-setup sl better docs --- diff --git a/brc b/brc index fc0a683..c2cac5b 100644 --- a/brc +++ b/brc @@ -1115,15 +1115,14 @@ sk() { # ~/.bashrc. You dont want this. .bashrc is meant for interactive shells # and if you customize it, probably has bugs from time to time. This is # bad. Here's how I fix it. I have a special condition to "return" in my -# .bashrc for noninteractive ssh shells (you can copy this). To make -# this work, you need to alter AcceptEnv in /etc/ssh/sshd_config, adding -# the var BRC to it. And in ~/.ssh/config or equivalent, add SendEnv -# BRC, plus any other environment vars you want to send. This function -# uses the BRC environment variable to enable that. Also, I don't keep -# most of my bashrc in .bashrc, because even though I return, the whole -# file gets parsed which can fail if there is a syntax error (plus, -# faster bash startup when we are just going to return). -# +# .bashrc for noninteractive ssh shells (copy that code). Then alter +# AcceptEnv in /etc/ssh/sshd_config, adding the var BRC to it. And in +# ~/.ssh/config or equivalent, add SendEnv BRC, plus any other +# environment vars you want to send. Just that var should be fine. Then +# use this function or similar that passes BRC=t when sshing. Also, I +# don't keep most of my bashrc in .bashrc, i source a separate file +# because even though I return, the whole file gets parsed which can +# fail if there is a syntax error. sl() { # Background on BRC var (no need to read if you just want to use this # function): bash builtin vars and env show no difference in ssh vs