d371d80af2
For short single commands, prefer a one-liner `for` with the zsh syntax: ``` for x (foo bar) print ${x} ``` Otherwise just place `; do` on the same line as the POSIX `for ... in`: ``` for x in foo bar; do print ${x} done ``` Closes #268
6 lines
194 B
Bash
6 lines
194 B
Bash
# vim:et sts=2 sw=2 ft=zsh
|
|
local git_root
|
|
git_root=$(git-root) || return 1
|
|
|
|
# we are in a git repository. add parameters to .gitignore
|
|
for file (${@}) print ${file} >>! "${git_root}/.gitignore"
|