File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -34,20 +34,21 @@ get_editor_from_the_env_var() {
34
34
fi
35
35
}
36
36
37
- preserve_url_hash () {
38
- echo " sed s/##/####/g"
37
+ escape_and_expand () {
38
+ # the `echo {} | bash` is to perform tilde expansion.
39
+ echo " sed s/##/####/g | xargs -I {} echo 'echo {}' | bash"
39
40
}
40
41
41
42
command_generator () {
42
43
local command_string=" $1 "
43
- echo " $( preserve_url_hash ) | xargs -I {} tmux run-shell -b 'cd #{pane_current_path}; $command_string \" {}\" > /dev/null'"
44
+ echo " $( escape_and_expand ) | xargs -I {} tmux run-shell -b 'cd #{pane_current_path}; $command_string \" {}\" > /dev/null'"
44
45
}
45
46
46
47
search_command_generator () {
47
48
local command_string=" $1 "
48
49
local engine=" $2 "
49
50
50
- echo " $( preserve_url_hash ) | sed 's/\ /+/g' | xargs -I {} tmux run-shell -b 'cd #{pane_current_path}; $command_string $engine \" {}\" > /dev/null'"
51
+ echo " $( escape_and_expand ) | sed 's/\ /+/g' | xargs -I {} tmux run-shell -b 'cd #{pane_current_path}; $command_string $engine \" {}\" > /dev/null'"
51
52
}
52
53
53
54
generate_open_command () {
@@ -84,7 +85,7 @@ generate_editor_command() {
84
85
local editor=$( get_tmux_option " $open_editor_override " " $environment_editor " )
85
86
# vim freezes terminal unless there's the '--' argument. Other editors seem
86
87
# to be fine with it (textmate [mate], light table [table]).
87
- echo " $( preserve_url_hash ) | xargs -I {} tmux send-keys '$editor -- \" {}\" '; tmux send-keys 'C-m'"
88
+ echo " $( escape_and_expand ) | xargs -I {} tmux send-keys '$editor -- \" {}\" '; tmux send-keys 'C-m'"
88
89
}
89
90
90
91
set_copy_mode_open_bindings () {
You can’t perform that action at this time.
0 commit comments