filmov
tv
Beginner Boost, Day 38: Code a `snip` Tool in Bash for Vim and More [20210707230837]

Показать описание
1. Create a snippets Directory
2. Set SNIPPETS to Point to snippets Directory in ~/.bashrc
3. Create snippets Alias to cd $SNIPPETS
4. Create a New Bash Script Called snip
1. Check for SNIPPETS Environment Variable or Exit
2. Create a snip Function That Take One Parameter: name
3. Join Argument name with $SNIPPETS for File
4. Load the File Into Variable buf
5. Print buf to Standard Output
5. Add Template Parameters to snip
1. Update snip to Use All Extra Arguments as Values
2. Replace {1},{2}, … with Values for Printing
3. Recursively Call snip Rather than Rewrite
6. Add Template Parameters from Lines of Input
1. Update snip to Assume Arguments are as Input lines
2. Do the Same at Previous
2. Set SNIPPETS to Point to snippets Directory in ~/.bashrc
3. Create snippets Alias to cd $SNIPPETS
4. Create a New Bash Script Called snip
1. Check for SNIPPETS Environment Variable or Exit
2. Create a snip Function That Take One Parameter: name
3. Join Argument name with $SNIPPETS for File
4. Load the File Into Variable buf
5. Print buf to Standard Output
5. Add Template Parameters to snip
1. Update snip to Use All Extra Arguments as Values
2. Replace {1},{2}, … with Values for Printing
3. Recursively Call snip Rather than Rewrite
6. Add Template Parameters from Lines of Input
1. Update snip to Assume Arguments are as Input lines
2. Do the Same at Previous