Sunday, August 2, 2009

Vesta Beef Risotto, Supplier

Script Tip # 8: Notes for each directory's

What to do with notes and / or errands? If we use to specialized program and collects all notes in a file or simply drop to only text files, and if so where you lay them off? A universal solution, I also do not offer, but for little things that belong in a directory (such as errands for a project) you can tinker with the bash something useful.

Ansi-Farbtalle vor schwarzen Hintergrund First, the variable in the
PROMPT_COMMAND

. Bashrc modified so that whenever the prompt is displayed and the contents of a File is output. Now you can just always if there is something to note with its text editor, create a (hidden) file, for example. Add errands and hieninschreiben in this his notes.

this line in the paste and the bashrc bashrc Rescan... . You are now a file things to do within the current Vezeichnis, whose content is displayed each time the call of the prompt after a command, otherwise, nothing appears:

#: ~> cd Globenautblog / errands to that directory: 1 Script Tip to-do list Leave work on display # 2 Comment: ~> Line numbering is a function of cat, that cat-n. I defniert with me in the bashrc alias, which I always displays when using cat (as in grep) the line numbers:

 alias cat = 'cat-n' alias grep = 'grep-aOn - color' 
.

Who would not have this alias, it must adapt PROMPT_COMMAND containing the line and simply insert cat-n after.

 For my work, it has proven to be practical to use two files. .. A errands and notes: 

export PROMPT_COMMAND = "if [-a errands.] then echo 'errands to this directory:', \\ cat errands; fi; if [-a notes.] then echo 'notes to this directory:';. cat notes, fi, "

 to remember the solution. meant for small things, the list is too large it becomes impractical. It is of course to give you too much larger program flows to the PROMPT_COMMAND, but since the prompt is addressed almost continuously, you should think carefully about how large should be such Prgramm. It makes absolutely no sense at this point an end incorporate, as a result you must wait several seconds every time the appearance of the prompt. 

0 comments:

Post a Comment