-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use fully qualified paths of cp
, mv
, etc. or command
before invoking them
#79
Comments
Using |
Thanks @daenney, switched to using |
@jab You are absolutely right, so I have added it to the next milestone. I'll patch this ASAP and push after all tests pass and I see things to be working as they should. |
|
Bash seems to have an |
Oh ha, since aliases are just functions we could |
@daenney Yes, we would need to copy the function first, remove it and then define it again later. |
Oh, bummer. I was hoping it could scope that to the script currently being executed. |
That's clever, and I wish it was like that too. But that trick only works for variables in Fish. function foo
set -l x 1
begin
set -l x
end
echo $x # 1
end |
In theory though, |
I think we need to As for other commands like |
I've updated it to call |
+ Add the ability to install plugins from Gists. You can distribute a very simple, one-single function plugin in the form of a Gist. Your users can install it using fisher install url and Fisherman will query the Gist using the GitHub API to get a list of the Gist files and use the name of the first identified *.fish file to name the plugin in your system. Since there is no formal way to name a Gist, and you may prefer to keep the "description" field for the actual description and not a name, Fisherman supports only one fish file per Gist. Closes #75. + Use command(1) when calling non-builtins. Thanks @daenney. Closes #79. + Add __fisher_plugin_can_enable to detect installing a prompt that is not the current one. Closes #78. + Remove the ability to install a plugin in a parent directory using .. or ../ or even worse, ../../ as well as other combinations that navigate to a parent directory. I find the use case odd at best, and more dangerous that useful. If you want to install a local plugin use the full path or a relative path, always top down. fisher install . or fisher install my/plugin or fisher install /Users/$USER/path/to/plugin. Closes #81.
By using `command` we ensure that we always end up calling the external binary and don't get caught by user aliasses, functions or other magic. Closes #79
+ Add the ability to install plugins from Gists. You can distribute a very simple, one-single function plugin in the form of a Gist. Your users can install it using fisher install url and Fisherman will query the Gist using the GitHub API to get a list of the Gist files and use the name of the first identified *.fish file to name the plugin in your system. Since there is no formal way to name a Gist, and you may prefer to keep the "description" field for the actual description and not a name, Fisherman supports only one fish file per Gist. Closes #75. + Use command(1) when calling non-builtins. Thanks @daenney. Closes #79. + Add __fisher_plugin_can_enable to detect installing a prompt that is not the current one. Closes #78. + Remove the ability to install a plugin in a parent directory using .. or ../ or even worse, ../../ as well as other combinations that navigate to a parent directory. I find the use case odd at best, and more dangerous that useful. If you want to install a local plugin use the full path or a relative path, always top down. fisher install . or fisher install my/plugin or fisher install /Users/$USER/path/to/plugin. Closes #81.
By using `command` we ensure that we always end up calling the external binary and don't get caught by user aliasses, functions or other magic. Closes #79
+ Add the ability to install plugins from Gists. You can distribute a very simple, one-single function plugin in the form of a Gist. Your users can install it using fisher install url and Fisherman will query the Gist using the GitHub API to get a list of the Gist files and use the name of the first identified *.fish file to name the plugin in your system. Since there is no formal way to name a Gist, and you may prefer to keep the "description" field for the actual description and not a name, Fisherman supports only one fish file per Gist. Closes #75. + Use command(1) when calling non-builtins. Thanks @daenney. Closes #79. + Add __fisher_plugin_can_enable to detect installing a prompt that is not the current one. Closes #78. + Remove the ability to install a plugin in a parent directory using .. or ../ or even worse, ../../ as well as other combinations that navigate to a parent directory. I find the use case odd at best, and more dangerous that useful. If you want to install a local plugin use the full path or a relative path, always top down. fisher install . or fisher install my/plugin or fisher install /Users/$USER/path/to/plugin. Closes #81.
I have common commands like
cp
,mv
, etc. aliased tocp -i
,mv -i
, etc.When I use fisherman, I see
overwrite /Users/jab/.config/fisherman/fishfile? (y/n [n]) not overwritten
.I assume this is caused by fisherman referring to a command like cp as just
cp
, rather than as/bin/cp
orcommand cp
. This can cause problems if the user has the command aliased to pass other arguments (such as interactive mode, as above), since fisherman is assumingcp
is the same thing as/bin/cp
, it isn't. If so, any interest in fixing this? I think well-behaved shell scripts are supposed to use fully-qualified paths or usecommand
to avoid this problem.The text was updated successfully, but these errors were encountered: