-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTODO
248 lines (233 loc) · 9.01 KB
/
TODO
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
DB
19-Oct-09
- cj, ej, ij
Jump to another sif file in SIFS_DIR.
When you're finished, type i to get back.
Similar to cl, el, il
cj twit # loads SIFS_DIR/twitter.sif
...tweet...
i # reload previous sif file
il # or load local sif
12-Oct-09
- bookmark todo pattern
provide a generalised version of the sifs histfile that
records last 20 things done or accessed.
A good example is recording your todo's or readme's or
other working files.
You can see which ones were last used and quickly jump
to them - maybe using a todo.sil file.
6-Oct-09
- We should put in a default sif file; or use sif <file>
in .bashrc if we want to load up a particular sif file.
4-Oct-09
-
Sourcing file type operations:
1) sif files
- c,i,e
2) local sif files
- cl,il,el
3) sil files
- these are intended as libraries, helper routines
not fully-fledged sif files
- up to you to namespace them so they don't clash
with your sif files
-
These are all the different forms:
c <name> (SIFS_DIR and sif extension required)
c <> (interactive)
sif <name*>
- uses c <name> after trying out all variations of name
and finding one
c.include <name> (without SIFS_DIR or .sif extension)
- had to create this when setting up subdirectories in
SIFS_DIR.
local forms:
cl
I have to resolve this mess.
- make 'sif' interactive
Typing sif <pattern>
will get sif to look for all possible files in SIFS_DIR
and its subdirs.
Maybe it should be the 'c <pattern>'.
But up to now, 'c' has been very precise when used with
an argument.
- SIFS_ROOT_DIR
To be setup at the beginning of the shell session.
sifs.conf should store this.
When performing operations against the whole sif
repo, we use this rather than SIFS_DIR.
We might also stop '..' from taking use above
SIFS_ROOT_DIR when using 'c' interactively.
- I'm beginning to think that sifs should just assume you
are interactive.
If you want to use a sif file in a cron or automated script
you should test that the sif file will work in isolation
from the sifs system
or create a new script which the sif file can reference.
Or write your sif file so that when you source it it
won't cause an error trying to load a sif-related utility
such as the 'sil' command.
eg use the 'which' command to test if 'sil' is available
before running it.
3-Oct-09
- I want my HOME.sif to load up automatically when I log in
with an optional help message.
- When we c/i a file, touch it so that we can record when it
was last changed to via the filesystem.
Have a routine that lists the last x recently used sifs.
On a shared repository, this won't be so useful; the whole
point is to help you remember where you were; the 'j' command
does this within a given shell session.
- Might be better just to have a history file stored in ~/.sif_history
- A section on how I use sif
Less clutter
- only have a few terminals up on my desktop instead of lots
- I bring up a terminal and quickly jump to the sif file
I want. When I'm finished I shut down the terminal.
- Sometimes I'm doing one thing but quickly want to add something
for another project. So I quickly open up a new terminal
(ctrl-alt+t), jump to the sif, do the work and close; resume
work in previous terminal.
- Sometimes I need to do something on the same project before
continuing. I create a new terminal window, jump to the same
sif file, do the work. Hop back to the original and continue.
Maybe there are 2 things. In which case I create 2 extra terminals.
Often I'll arrange these spatiallyl starting from the top left.
Do the work in one and then the other. Go back to the original
terminal.
- Being able alt-tab or alt-w between windows is good (for me)
- spatially arranging secondary windows with sif sessions is good
- less use of tabbing; gnome-terminal tabbing is ok for some
situations but I find it hard to handle in general
- less screen; screen is really cool and I have some screen
scripts in some of my sif files and I have remote screen
sessions that stay up for a long time between ssh sessions.
But
- faster the better;
Anything that speeds up your ability to access the thing you
just thought about is a big deal.
Some simple things:
In your go() function, use globbing
go() {
l*|lang|language-tests) cd ... ;;
}
Here I only have to type 'go l' to get to my language tests.
27-Sep-09
- cl:
Do 'find' on pwd down; results should go in a select.
Do we really need LOCAL_SIF_ROOT??
- tracking
- track when you last used a sif file
- need to be able to remove deleted sif files from history
- proxy/piggyback sif
- the sif in SIFS_DIR merely loads up a sif located with
the project.
20-Sep-09
- get rid of 'd' and sifs.conf; instead, use symlinking
to add other repos.
I like the idea of having less moving parts.
- FIXME: can we handle symlink files? at the moment we can handle
symlink directories.
- sil and possibly sif command should search from the top
level SIFS_DIR for the sif file.
If more than one is found, haven't decided is a select should
be done or the first one picked.
example: I'm root, I'm starting a server via a an admin sif,
but I want to check netstat using a net.ls script in another
sif file (root.sif). I type 'sil root' and it should find it
and source it.
17-Sep-09
- cl uses find to locate sif files in LOCAL_SIRS_ROOT
This would be set by a normal sif file.
If not set, cl does the 'find' in '.'.
You might use a local sif file if it is closely tied
to a project and its code rather than have it centralised
in a SIFS_DIR.
15-Sep-09
- a default sif file cf DEFAULT_SIFS_DIR
- 'sif' command doesn't seem to update the 'j' command
- sifs.lib.glob
Create a lib area for useful routines that I migth want to
use in shell scripts and sif files.
- local sif files
we could temporarily attach them to the current sifs_dir
via a symbolic link.
SIFS_ATTACH_DIR=$SIFS_DIR/attach
How do we know about these local sif files if they're not
permanently in a SIFS_DIR? Answer: because they are probably
referenced and set up via a sif in SIFS_DIR.
- cl | c.local | clocal | sifs.local
- just . the file, but don't change SIFS_*
- type 'i' to get back to previous sif
- sifs.attach
- sifs.detach
14-Sep-09
- anonymous sif files
- create /tmp/$$.sif
- switch to it
- option to safe as a sif in SIFS_DIR
- sil redux
- store sils anywhere within SIFS_DIR
- sil to load them
- sil.ls to list them
9-Sep-09
- Add SIFS_DIR_ROOT
This is the top level SIFS_DIR.
I found myself wanting to reference a library sif file
from within a nested SIFS_DIR but all I had was $SIFS_DIR
which was nested. I could have said $SIFS_DIR/.. but that is ugly.
If we have a root, then we can specify a path to any nested
SIFS_DIR we choose.
- .sil
Simple include library file.
Convention would be to namespace your vars and functions.
Classic example would be postgres (PG_, pg_, pg.) and mysql
(MY_, my_, my.)
Also, you generally don't set a home directory for a sil file
and it won't show up when you type c. Because it is assumed
that it gets included via a sif file.
We should have a routine for find sil's so we can see them.
'l' ?
Another example besides pg and mysql is my rails helper functions
rfind, rgrep etc
DB
3-Sep-09
- Tidy up the reference.txt; 'c' is badly written
- DEFAULT_SIFS_DIR so that when I first log in it automatically
selects the one I normally use when I type 'c'.
- Get rid of r and rc??
See 28-Aug and conventions for referencing sifs files in general.
Should we just be able to . a sif and expect it to work?
Commands like 'sif' won't work in this instance.
But it would be easy to source in sifs.sh so that they do.
- Treat symbolic links in SIFS_DIR like directories.
- c "path/to/file.sif" doesn't use 'd'.
This also relates to the way c.include works and the r/rc debate.
- Looks like we source sifs.sh every time we change a sif file.
Is that desirable?
- glob the 'g' command?
g <pattern>
will try to match an existing mark (m <pattern>).
If not, it globs.
30-Aug-09
- BUG: we don't popd when we change to a sif file.
DONE 30-Aug-09
- Set up DEFAULT_SIFS_DIR which will get used with
SIFS_DIR is blank/not set.
28-Aug-09
- Add '..' on 'c' command to pop up a level.
DONE 29-Aug-09
- Add sif history and 'j' command
Sif history keeps track of previous sif files included
into shell; j allows you to jump between them without
updating this history
DONE 29-Aug-09
- Decide on convention for sif files in general: do we
require that you can just . sif file? Or do we require that
you load the sif machinery first like with an interactive
session?
Are there any instances where we need a full sifs environment
when running stuff in one sif file in batch mode?
- the 'sif <name>' command can use a shorthand that relies
on SIFS_DIR. 'c <name>' requires a full name (but for
some reason sets SIFS_DIR anyway).