Skip to content
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

run_cmd in __go_to_window_or_session_path() is trampling over command given to new_window #81

Open
ZeroKnight opened this issue Jan 28, 2018 · 1 comment

Comments

@ZeroKnight
Copy link

ZeroKnight commented Jan 28, 2018

__go_to_window_or_session_path() is clobbering the command supplied to new_window. The cd and clear commands being run in this function are run after the window command.

For example, consider the following line in mysession.session.sh, which creates a window that runs re.pl, a Perl REPL:

new_window "repl" re.pl

And the resultant window:

cd "/home/zeroknight/Projects/blah"                     
clear                                                      
$ String found where operator expected at (eval 324) line 5, near "cd "/home/zeroknight/Projects/blah""             
        (Do you need to predeclare cd?)                    
Compile error: syntax error at (eval 324) line 5, near "cd "/home/zeroknight/Projects/blah""                        
BEGIN not safe after errors--compilation aborted at (eval 324) line 5, <FIN> line 1.                                   
$ Compile error: Bareword "clear" not allowed while "strict subs" in use at (eval 325) line 5, <FIN> line 2.           
$   

As you can see, the two run_cmd bits are being run inside the REPL, rather than in the shell before the REPL is launched. Perhaps this is related to #80?

@jimeh
Copy link
Owner

jimeh commented Jan 28, 2018

Hmm, this doesn't seem right indeed. Off the top of my head the command is supposed to run after the window had been created and changed into the correct folder. But seems like I've screwed that up.

I'll have a poke around see what I find.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants