# How to omit the default argument name when a custom command has only one argument？

**URL:** <https://resource.dopus.com/t/how-to-omit-the-default-argument-name-when-a-custom-command-has-only-one-argument/56726>\
**Category:** Help & Support\
**Created:** [August 2, 2025, 5:31am UTC](https://resource.dopus.com/t/how-to-omit-the-default-argument-name-when-a-custom-command-has-only-one-argument/56726 "2025-08-02T05:31:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bytim](https://resource.dopus.com/letter_avatar_proxy/v4/letter/b/e480ec/32.png) [@bytim](https://resource.dopus.com/u/bytim)\
**Post date:** [August 2, 2025, 5:31am UTC](https://resource.dopus.com/t/how-to-omit-the-default-argument-name-when-a-custom-command-has-only-one-argument/56726/1 "2025-08-02T05:31:44Z")

</div>

[https://resource.dopus.com/t/everythingopus-a-better-dialog-to-integrate-everything-with-directory-opus/56212](https://resource.dopus.com/t/everythingopus-a-better-dialog-to-integrate-everything-with-directory-opus/56212)  
For example, in this script above, the command "ed" has only one argument:

```auto
	var searchCmd = initData.AddCommand();
	searchCmd.name = "ed";
	searchCmd.method = "OnEverythingOpusSearch";
	searchCmd.desc = DOpus.strings.Get("cmdDesc_ed");
	searchCmd.label = "Everything DOpus Search";
	searchCmd.template = "S/R"; //the only one parameter，type:Raw

```

When I use the command，if the search string contains spaces, the 's' argument name cannot be omitted

> ed s wall paper \*.png

I hope to execute the command like this：

> ed wall paper \*.png

Is it possbile?

---

<div class="post-metadata">

**Author:** ![lxp](https://resource.dopus.com/user_avatar/resource.dopus.com/lxp/32/33734_2.png) [@lxp](https://resource.dopus.com/u/lxp)\
**Post date:** [August 2, 2025, 6:33am UTC](https://resource.dopus.com/t/how-to-omit-the-default-argument-name-when-a-custom-command-has-only-one-argument/56726/2 "2025-08-02T06:33:36Z")

</div>

Use quotes or extract the argument from `scriptCmdData.cmdline`.

---

<div class="post-metadata">

**Author:** ![Leo](https://resource.dopus.com/user_avatar/resource.dopus.com/leo/32/69732_2.png) [@Leo](https://resource.dopus.com/u/Leo)\
**Post date:** [August 2, 2025, 7:06am UTC](https://resource.dopus.com/t/how-to-omit-the-default-argument-name-when-a-custom-command-has-only-one-argument/56726/3 "2025-08-02T07:06:13Z")

</div>

You can also make the argument type “raw” (/R) and it will consume the rest of the command line without needing quotes.

(Unless that stops it being the default argument and forces you to state the argument name at the start if the command line. Not sure about that actually, and not at my PC to test what happens.)

---

<div class="post-metadata">

**Author:** ![bytim](https://resource.dopus.com/letter_avatar_proxy/v4/letter/b/e480ec/32.png) [@bytim](https://resource.dopus.com/u/bytim)\
**Post date:** [August 2, 2025, 7:15am UTC](https://resource.dopus.com/t/how-to-omit-the-default-argument-name-when-a-custom-command-has-only-one-argument/56726/4 "2025-08-02T07:15:16Z")

</div>

I have set the argument type to raw, but the string must be enclosed in double quotation marks when it contains spaces.

It seems that scriptCMDData.cmdline is the only solution.

---

<div class="post-metadata">

**Author:** ![Leo](https://resource.dopus.com/user_avatar/resource.dopus.com/leo/32/69732_2.png) [@Leo](https://resource.dopus.com/u/Leo)\
**Post date:** [August 2, 2025, 11:02am UTC](https://resource.dopus.com/t/how-to-omit-the-default-argument-name-when-a-custom-command-has-only-one-argument/56726/5 "2025-08-02T11:02:16Z")

</div>

Raw args shouldn’t need quotes. That’s the whole reason for them.

---

<div class="post-metadata">

**Author:** ![bytim](https://resource.dopus.com/letter_avatar_proxy/v4/letter/b/e480ec/32.png) [@bytim](https://resource.dopus.com/u/bytim)\
**Post date:** [August 2, 2025, 11:42am UTC](https://resource.dopus.com/t/how-to-omit-the-default-argument-name-when-a-custom-command-has-only-one-argument/56726/6 "2025-08-02T11:42:08Z")

</div>

> [@Leo](#):
>
> That’s the whole reason for them.

If run the command without specifying argument name, the string containing spaces must be enclosed in double quotation. OR, each space separated string will be treated as an argument .

If run the command with specifying argument name(type RAW), args do not need quotes.

This is my test result... 😄

---

<div class="post-metadata">

**Author:** ![Leo](https://resource.dopus.com/user_avatar/resource.dopus.com/leo/32/69732_2.png) [@Leo](https://resource.dopus.com/u/Leo)\
**Post date:** [August 4, 2025, 8:24am UTC](https://resource.dopus.com/t/how-to-omit-the-default-argument-name-when-a-custom-command-has-only-one-argument/56726/7 "2025-08-04T08:24:54Z")

</div>

You're right.

We'll make it possible to have a default raw argument in the next beta.
