# Slash commands plugin feature request

**URL:** <https://forum.obsidian.md/t/slash-commands-plugin-feature-request/42266>\
**Category:** Feature requests\
**Created:** [August 24, 2022, 12:17pm UTC](https://forum.obsidian.md/t/slash-commands-plugin-feature-request/42266 "2022-08-24T12:17:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kraka40](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/k/edb3f5/32.png) [@kraka40](https://forum.obsidian.md/u/kraka40)\
**Post date:** [August 24, 2022, 12:17pm UTC](https://forum.obsidian.md/t/slash-commands-plugin-feature-request/42266/1 "2022-08-24T12:17:17Z")

</div>

Please add a configuration option for slash commands module to trigger only at the beginning of a line.

It seems to me that this would be a simple change to the plugin looking for the start of line regex “^/“ as the trigger for slash commands. This would have the benefit of not triggering a slash pulldown menu in the middle of a sentence.

Thanks!

---

<div class="post-metadata">

**Author:** ![mike555](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/m/b782af/32.png) [@mike555](https://forum.obsidian.md/u/mike555)\
**Post date:** [August 24, 2022, 2:49pm UTC](https://forum.obsidian.md/t/slash-commands-plugin-feature-request/42266/2 "2022-08-24T14:49:51Z")

</div>

+1. I think it’s Logseq that offers an option in the settings to require two consecutive slashes to trigger the command menu - this worked well for me and could be another way to go here.

---

<div class="post-metadata">

**Author:** ![alephpiece](https://forum.obsidian.md/user_avatar/forum.obsidian.md/alephpiece/32/57111_2.png) [@alephpiece](https://forum.obsidian.md/u/alephpiece)\
**Post date:** [November 24, 2023, 7:44am UTC](https://forum.obsidian.md/t/slash-commands-plugin-feature-request/42266/3 "2023-11-24T07:44:57Z")

</div>

It really bothers me too. I don’t know how to hack the core plugin, so I’m trying to make a simple plugin to do this: [obsidian-slash-commander](https://github.com/alephpiece/obsidian-slash-commander)

I’m still working on it. For now, you can

- trigger slash commands only at the beginning of a line or after any whitespace
- add commands to the slash command list

---

<div class="post-metadata">

**Author:** ![ush](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/u/8e7dd6/32.png) [@ush](https://forum.obsidian.md/u/ush)\
**Post date:** [November 24, 2023, 9:06am UTC](https://forum.obsidian.md/t/slash-commands-plugin-feature-request/42266/4 "2023-11-24T09:06:22Z")

</div>

Nice work!

Another (potentially fragile?) approach to address this feature request via a plugin would be to patch `app.internalPlugins.plugins['slash-command'].instance.suggest.constructor.prototype.onTrigger` using a tool like [monkey-around](https://github.com/pjeby/monkey-around).

But your plugin seems to have much more nice features, not limited to fixing this problem!
