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

Fix inheritance problems in gnome-terminal #49

Merged
merged 2 commits into from
Apr 24, 2019

Conversation

fmoralesc
Copy link
Contributor

Also, use the --working-directory flag instead of executing cd.

Fixes #45.

Tested with gnome-terminal 3.28, 3.30 and 3.32.

Also, use the `--working-directory` flag instead of executing `cd`.

Fixes justinmk#45.
@@ -179,7 +179,7 @@ func! gtfo#open#term(dir, cmd) abort "{{{
if !s:empty(s:termpath)
silent call system(s:termpath." ".shellescape(l:dir))
elseif executable('gnome-terminal')
silent call system('gnome-terminal --window -e "$SHELL -c \"cd '''.l:dir.''' ; exec $SHELL\""')
silent call system('gnome-terminal --app-id=org.gnome.Terminal --window --working-directory "'. l:dir . '"')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would prefer to keep '''.l:dir.''' to avoid edge cases with $ or other weird directory names.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK.

@justinmk justinmk merged commit d89d333 into justinmk:master Apr 24, 2019
@justinmk
Copy link
Owner

Thanks! I guess --working-directory wasn't available years ago...

@fmoralesc
Copy link
Contributor Author

Yeah, despite rumors to the contrary, sometimes the GNOME people add features! Thanks for receiving this patch, I got bitten by #45 again this week because I reinstalled my plugins, and lost the patches I had for this. Luckily my old self had mentioned the solution in the issue tracker...

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

Successfully merging this pull request may close these issues.

spawned terminals inherit desktop class if launched from gnome-terminal wrapper
2 participants