* Added edit/remove functionality to git-ignore.
* Minor change to array-string assignment.
* Fixes array handling for remove.
* Suggested fixes (iteration over arguments, pattern removal, editor handling, tmp file location, symlinked gitignore handling).
* Changed pure bash editing of files to an awk script. Some other minor cosmetic changes.
* Updated docs.
* Modified autocomplete to work with new git-ignore
* Added help message to git-ignore.
* Added help flags to git-ignore's man.
* Made $file in eval safe. Should not do the same for editor since then all of the GIT_EDITOR will be treated as command (flags included).
* Typo fixes.
Did a rebase merge from the old pull request #46 which we may close now.
Yet it wasn't as simple as that in the end but all things have a resolve:
Added 2 context type arguments to specify --local or --global.
Refactored usage into functions te prevent duplication.
Capable to view and append to both global gitignore as well as the .gitignore from the working folder.
Supports all types of ignore patters including ! negated, comments as well as blank lines.
Complete documentation including several examples.
As per the bug identified in #127 git-ignore would add duplicate entries in .gitignore which is redundant and should not happen.
grep will suitably verify that the entry doesn't exit but only if the file actually exists or we will get an error on stderr. check if the
file exists with test -f and that the new entry is present or alternatively just go ahead and add the new value which will create the file if it didn't exist.
Running the same command again does not add the duplicate.