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() {
3434 fi
3535}
3636
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"
3940}
4041
4142command_generator () {
4243 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'"
4445}
4546
4647search_command_generator () {
4748 local command_string=" $1 "
4849 local engine=" $2 "
4950
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'"
5152}
5253
5354generate_open_command () {
@@ -84,7 +85,7 @@ generate_editor_command() {
8485 local editor=$( get_tmux_option " $open_editor_override " " $environment_editor " )
8586 # vim freezes terminal unless there's the '--' argument. Other editors seem
8687 # 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'"
8889}
8990
9091set_copy_mode_open_bindings () {
You can’t perform that action at this time.
0 commit comments