File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,6 +50,13 @@ impl Launcher {
5050 . collect ( ) ,
5151 )
5252 }
53+
54+ fn filter_params < F > ( self , f : F ) -> Self
55+ where
56+ F : Fn ( & String ) -> bool ,
57+ {
58+ Self ( self . 0 , self . 1 . into_iter ( ) . filter ( |s| f ( s) ) . collect ( ) )
59+ }
5360}
5461
5562const DEFAULT_TERMINALS : [ ( & str , & str , & str ) ; 5 ] = [
@@ -417,7 +424,7 @@ pub fn run(
417424 let launcher = if let Some ( line) = line {
418425 launcher. apply_var ( VAR_LINE , & format ! ( "+{line}" ) )
419426 } else {
420- launcher
427+ launcher. filter_params ( |s| s != VAR_LINE )
421428 } ;
422429
423430 let launcher = launcher. apply_var ( VAR_FILE , file_str) ;
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
2- {BRIDGE_PATH} {DEBUG_FLAG} launch-neovim {LAUNCH_PRE_ARGS} " $( realpath .) " " $1 " $2 {LAUNCH_POST_ARGS}
2+ " {BRIDGE_PATH}" {DEBUG_FLAG} launch-neovim {LAUNCH_PRE_ARGS} " $( realpath .) " " $1 " $2 {LAUNCH_POST_ARGS}
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22export PATH=" /usr/bin:/usr/local/bin:$PATH "
3- {BRIDGE_PATH} {DEBUG_FLAG} launch-neovim {LAUNCH_PRE_ARGS} " $( realpath .) " " $1 " $2 {LAUNCH_POST_ARGS}
3+ " {BRIDGE_PATH}" {DEBUG_FLAG} launch-neovim {LAUNCH_PRE_ARGS} " $( realpath .) " " $1 " $2 {LAUNCH_POST_ARGS}
Original file line number Diff line number Diff line change 11@ echo off
2- {BRIDGE_PATH} {DEBUG_FLAG} launch-neovim {LAUNCH_PRE_ARGS} " %CD% " " %~1 " %2 {LAUNCH_POST_ARGS}
2+ " {BRIDGE_PATH}" {DEBUG_FLAG} launch-neovim {LAUNCH_PRE_ARGS} " %CD% " " %~1 " %2 {LAUNCH_POST_ARGS}
You can’t perform that action at this time.
0 commit comments