-
-
Notifications
You must be signed in to change notification settings - Fork 220
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
br shell function does not escape file path #820
Comments
What wrapping are you referring to ? Anything specific ? Can you please describe a complete failing case ? |
Ah, sorry for being a bit ambiguous. By wrapping function I mean mkdir \'
br in shell, and
in broot. |
br
shell function does not escape file path
br
shell function does not escape file path
What shell are you using ? bash ? |
I've tested fish and bash. |
Oh, sorry again, that's not the case, the failed case should be |
This problem can now ( {
key: alt-enter
invocation: cd
cmd: ":write_output {directory};:quit"
} with the following launcher function (Bash) (only slightly tested): function br {
local path path_file code
path_file=$(mktemp)
if broot --verb-output "$path_file" "$@"; then
path=$(<"$path_file")
command rm -f "$path_file"
if [[ -d "$path" ]]; then
cd "$path"
fi
else
code=$?
command rm -f "$path_file"
return "$code"
fi
} |
Broot's wrapping shell function does not escape file path, e.g.
test'"$(
, the shell will be crazy.In regard to how to escape, a stackoverflow post says:
That is,
test'"
as'test'\''" '
The text was updated successfully, but these errors were encountered: