Changes since 24.04.0:
- Refactor: Do not ignore shellcheck 2207 (#378)
We sometimes capture multiline output in an array. We used to do so
directly, while setting IFS to "\n" to control splitting. This has the
downside that bashs glob expansion will be invoked.
Use read -r in such cases to add each line into the array without glob
expansion. - Fix: Pager variables are not evaluated (#381)
Reintroduces the usage of eval for evaluating pagers. We removed all usage of eval with #326, which broke code defined by users in the $FORGIT_*_PAGER environment variables and git pagers. In this particular case, eval does exactly what we want, since we do want to execute code that is defined by the user outside of forgit. - Fix ga, gsp & gcf with older git versions (#335)
Removes the usage of --pathspec-file-nul (which is not available in older git versions) in favor of storing the file names passed to the git command in an array instead of a string. - Do not disable shellcheck 2206 and 2068 in _forgit_ignore (#382)
Shellcheck 2206 and 2068 have been disabled in _forgit_ignore for a very long time. The code that triggers the shellchecks was added in ce240ac before the shellcheck action had been added. The shellcheck for the lines in question got disabled in c14ce93. Disabling shellcheck does not seem necessary, instead this commit implements the fixes shellcheck suggest. - Move fzf options into $opts variables (#384)
_forgit_stash_push, _forgit_revert_commit and _forgit_blame passed some
fzf options as arguments directly instead of defining them in the $opts
variable, as we do everywhere else. This change makes these functions
consistent with the rest of the code base and additionally allows
overriding said options with the respective $FORGIT_*_FZF_OPTS
environment variables. - Add a preview to _forgit_clean (#383)
- Fix: Early out from _forgit_stash_push when no files can be stashed (#376)
Previously when using _forgit_stash_push without any local changes an empty file picker would open. Exit early and show a message instead. - Fix typos in README.md (#390)
* Fix some typos and wordings
* Fix headers style: no double spaces
* Fix "e.g." usage (Latin) - Fix: --date option in gbl can not be overridden anymore (#385)
The order of the arguments passed to git blame in _forgit_blame_preview
has been changed in bfffda6, putting --date=short as the last argument
instead of the first. This caused it taking precedence of anything
defined in $FORGIT_BLAME_GIT_OPTS.
This commit restores the order of the arguments to what they were before
bfffda6. - Allow disabling --graph with FORGIT_LOG_GRAPH_ENABLE=false in grc (#387)
- Fix: gsp does not work outside the root directory (#386)
- Fix: Opening files from diff line when not in project root (#393)
When trying to open a file from gd in $EDITOR (alt + e) the wrong file
was being opened when the command wasn't executed from the repository's
root directory.