Make sure script doesn't execute if fzf is an alias and the command doesn't actually exist#66
Make sure script doesn't execute if fzf is an alias and the command doesn't actually exist#663ximus wants to merge 3 commits into
fzf is an alias and the command doesn't actually exist#66Conversation
There was a problem hiding this comment.
The change suggested by this PR seems to disable the script under the presence of alias fzf regardless of whether the command actually exists. In particular, the script is canceled when both the alias fzf and the command fzf exist, but this seems slightly different from the PR title. Is this intentional?
Note: The following comments are unrelated to the above discussion but just suggest using idioms to check the existence of aliases.
|
Indeed @akinomyoga, just came here to correct that because I only noticed it today, I though I had tested correctly but must have made a mistake. How about something like this? It should not detect aliases |
akinomyoga
left a comment
There was a problem hiding this comment.
That works and is much clearer! Thank you!
In this case, I think one wants to prefix command to the fzf invocations (e.g. in the following part for Bash) as command fzf so that it doesn't pick the alias if any.
fzf-marks/fzf-marks.plugin.bash
Lines 35 to 43 in 1adfd27
Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
|
I've added those in! |
|
Thank you very much @3ximus for the pull request, and thank you very much @akinomyoga for handling everything! |
This is a very simple fix for the case where you have an alias for fzf but the fzf command doesn't actually exist