File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -16,13 +16,15 @@ def get_string_width(s):
1616 return width
1717
1818def pyshell (cmd ):
19- # Add logging
20- with open (os .path .expanduser ('~/easymotion.log' ), 'a' ) as log :
21- log .write (f"{ cmd } \n " )
22- result = os .popen (cmd ).read ()
23- log .write (f"Result: { result } \n " )
24- log .write ("-" * 40 + "\n " )
25- return result
19+ debug = os .environ .get ('TMUX_EASYMOTION_DEBUG' ) == 'true'
20+ if debug :
21+ with open (os .path .expanduser ('~/easymotion.log' ), 'a' ) as log :
22+ log .write (f"Command: { cmd } \n " )
23+ result = os .popen (cmd ).read ()
24+ log .write (f"Result: { result } \n " )
25+ log .write ("-" * 40 + "\n " )
26+ return result
27+ return os .popen (cmd ).read ()
2628
2729def tmux_pane_id ():
2830 # Get the ID of the pane that launched this script
You can’t perform that action at this time.
0 commit comments