forked from AHinMaine/tcshrc.d
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
188 lines (114 loc) · 4.47 KB
/
README
File metadata and controls
188 lines (114 loc) · 4.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
This is a more modular attempt at a tcsh configuration. I've tried to
bundle some good defaults, mechanisms for easy distribution via ssh to
multiple hosts, as well as an easy way to have os-specific configurations.
I've also tried to make sure the environment isn't unnecessarily polluted
after sourcing through all this.
---+ INSTALLATION
Fetch the distribution from: git://github.com/AHinMaine/tcshrc.d.git
From the directory where you downloaded the tcshrc.d distribution, in the
.tcshrc.d directory, issue the following commands:
Install the tcsh config into the current user's
home directory:
$ make install-home
Install the tcsh config into the current system's
/etc/skel directory, as root:
# make install-etcskel
Run the tcshrc distribution script to copy your
tcsh config to remote hosts:
$ make dist
Generate the perldoc list for accurate completions
when using the perldoc command:
$ make perldoc
(By default, $TCSHDIR is $HOME/.tcshrc/)
---+ Directory overview
Config files are sourced as follows:
$TCSHDIR/
+ Env/
+ common/
+ other os/
+ Paths
+ common
+ other os/
+ Set
+ common
+ other os/
+ Alias
+ common
+ other os/
+ Complete
+ common
+ other os/
+ Keys
+ common
+ other os/
+ Prompts
+ common
+ other os/
+ opt
Other supporting directories
$TCSHDIR/
+ bin/
+ etc/
The OS specific configs expect to reside in a directory matching the name
from the output of uname -s.
---+ ENVIRONMENT VARIABLES
To add environment variables, in the $TCSHDIR/Env/ directory, create
files in the common/ directory, or in the directory of your desired OS.
These files will be sourced as normal tcsh.
---+ PATHS
The files in $TCSHDIR/Path/*/ directories are not sourced. Instead, each
file is read for directory paths. Non-directories will not be added to the
path.
The file $TCSHDIR/Path/.source is then sourced for other path related
environment variables like LD_LIBRARY_PATH.
---+ SET
The $TCSHDIR/Set/*/ directories are not always sourced. Touching files
will set the corresponding option. If the file $TCSHDIR/Set/*/autologout
exists, the autologout option will be set. However, if the file is
non-zero in size, it will be sourced as normal tcsh.
---+ ALIAS
To add aliases, the files in the $TCSHDIR/Alias/*/ directories will be
sourced as normal tcsh. Aliases are skipped for non-interactive shells.
---+ COMPLETE
To add commandline completions, the files in the $TCSHDIR/Complete/*/
directories will be sourced as normal tcsh. Completions are skipped for
non-interactive shells.
---+ KEYS
To add key bindings, the files in the $TCSHDIR/Keys/*/ directories will
be sourced as normal tcsh. Key bindings are skipped for non-interactive
shells.
---+ PROMPTS
To configure the tcsh prompts, the files in the $TCSHDIR/Prompts/*/
directories will be sourced as normal tcsh. Prompt configs are skipped for
non-interactive shells.
---+ OPT
The files in $TCSHDIR/opt/ will be sourced as normal tcsh.
---+ DISTRIBUTION
To add to the list of distribution hosts, just touch files with names
corresponding to the hostnames of servers in the $TCSHDIR/etc/.disthosts/
directory.
The simplist way to distribute files to your hosts:
$ cd ~/.tcshrc.d
$ make dist
To more selectively distribute to a specific host:
$ tcshrc.dist.sh -H user@otherhost.example.com
(The tcshrc.dist.sh script is a bit over-engineered. Use -h to read the help.)
If you want to distribute files by tunneling through an intermediary host,
one way is to put an entry like the following in your ~/.ssh/config file.
Host server1.example.com server2.example.com
ProxyCommand ssh server3.example.com /usr/bin/nc -w 999 %h 22
User <your username>
Compression yes
CompressionLevel 6
PubkeyAuthentication yes
PasswordAuthentication yes
AddressFamily inet
IdentityFile ~/.ssh/id_rsa
Port 22
Protocol 2
EscapeChar none
ServerAliveInterval 590
This will make it so when you try to distribute files to server1.example.com or
server2.example.com, the connection will be proxied through server3 by using a bit
of netcat creativity. See the ssh_config(5) man page for more ssh options that
can be used.