Commit graph

12 commits

Author SHA1 Message Date
Wenxuan 80fe6ac4a6 Refactor & Share code between zsh & sh.
Former-commit-id: 268c6282cb
2019-01-17 19:20:03 +08:00
Laggard Kernel 48ddadd782 Fix: use case-insensitive find to get local templates
forgit::ignore::get should work on case-sensitive filesystems now

Former-commit-id: cf4c45547c
2019-01-17 17:20:59 +08:00
Laggard Kernel 28c4bf41e1 Feature: use gitignore templates from local repo directly
The gitignore templates used here is from dvcs/gitignore, which is
the same one used by gitignore.io.

Environment variable `FORGIT_GI_USE_LOCAL` is used as a switch to
enable this feature, or the original method is used by default.

`forgit::ignore::update` and `forgit::ignore::get` are rewritten
to download the repo, to get templates from the local repo.
local variable `preview` in `forgit:ignore` is also rewritten to
get the preview from there.


Former-commit-id: c1a8bd71dc
2019-01-17 14:56:01 +08:00
laggardkernel f648d171cc Fix: change replstr into variable in forgit::ignore::get
Former-commit-id: b3b5110723
2019-01-11 16:45:02 +08:00
laggardkernel c9869c2167 Fix multi selection in gitignore generation
Choose for loop as the solution cause:
- `xargs -d` is not available in BSD xargs
- `echo $@ |tr ' ' '\n'` is slower that for loop in this case


Former-commit-id: 51961b763f
2019-01-11 16:27:16 +08:00
Wenxuan bd2974e397 Preview only show specified files.
Former-commit-id: 737e573032
2018-11-26 17:52:46 +08:00
Doron Behar 219364d571 Check $FORGIT_NO_ALIASES in bash script as well
Former-commit-id: cc269c82fa
2018-10-30 18:35:27 +02:00
marspeng 92dbea3c9d Add git stash viewer for bash
Former-commit-id: 7461d58662
2018-10-12 15:12:16 +08:00
Ido Abramovich 0d728706b6 return 1 when return like in zsh
Former-commit-id: 9d4e17e7b4
2018-08-02 14:47:30 +03:00
Ido Abramovich 44bfa7dcfe simplify return check
Former-commit-id: e6e88991b4
2018-08-02 14:45:29 +03:00
Ido Abramovich 2d37bf1993 reset IFS
Former-commit-id: ebeae219bc
2018-08-02 14:25:19 +03:00
Ido Abramovich b36aaa5cb0 rename to use .sh
Former-commit-id: 742d930363
2018-08-02 14:13:23 +03:00
Renamed from forgit.plugin.bash (Browse further)