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

Shell code works with bash but not sh #331

Closed
fredrik-hammar opened this issue Feb 8, 2024 · 7 comments
Closed

Shell code works with bash but not sh #331

fredrik-hammar opened this issue Feb 8, 2024 · 7 comments

Comments

@fredrik-hammar
Copy link

fredrik-hammar commented Feb 8, 2024

This is not a huge issue but it was surprising to me because Obsidian recognizes the syntax in Edit Mode, but there's no Run button in Read Mode. Also the syntax highlighting disappears, but this seems to be a perhaps related Obsidian problem.

Source mode

```sh
echo hello
```

```bash
echo hello
```

Edit mode

image

Read mode

image

@twibiral
Copy link
Owner

twibiral commented Feb 8, 2024

What exactly do you mean? The syntax highlighting is not done by the extension but by obsidian.

@fredrik-hammar
Copy link
Author

Sorry, forgot to finish the description after adding screenshots. The main problem is that there is no Run button in Read Mode.

I have updated the description.

@fredrik-hammar
Copy link
Author

@twibiral
Copy link
Owner

twibiral commented Feb 9, 2024

Okay, thats really strange... Does this appear to be always the case or only in this note or under specific circumstances?

Can you please share your OS and obsidian version? Are you using any other plugins that might interfere with the execute code plugin?

@fredrik-hammar
Copy link
Author

I reproduced it now in fresh vault with only Execute Code enabled.

Debug Info

SYSTEM INFO:
	Obsidian version: v1.5.3
	Installer version: v1.5.3
	Operating system: #1 SMP PREEMPT_DYNAMIC Thu, 01 Feb 2024 10:30:35 +0000 6.7.3-arch1-1
	Login status: logged in
	Catalyst license: none
	Insider build toggle: off
	Live preview: on
	Base theme: adapt to system
	Community theme: none
	Snippets enabled: 0
	Restricted mode: off
	Plugins installed: 1
	Plugins enabled: 1
		1: Execute Code v1.10.0

RECOMMENDATIONS:
	Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

@twibiral
Copy link
Owner

Okay, it looks like there is a problem with the alias sh (with both Obsidian and the plugin) but it seems to work when you use shell instead. Would that be a problem?

@fredrik-hammar
Copy link
Author

That's fine with me :)

I think this is an issue in Obsidian anyway. So let's close, and I'll reopen if upstream issue gets fixed and problem still remains.

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