Skip to content

[QUESTION] How do I escape asterisk (*) when typing a command or creating a keybinding #744

@Yutsuten

Description

@Yutsuten

Greetings.

I'm trying to set my wallpaper in sway using the image I'm currently viewing in vimiv. The command is !swaymsg output * bg % fill, but I noticed that the * is being expanded to all files in the current directory.

I tried:

  • !swaymsg output '*' bg % fill
  • !swaymsg output "*" bg % fill
  • !swaymsg output \* bg % fill

I have no idea what else I could try. In fish I can just use single quotations and it works.

I also tried using spawn, but it always say something on the lines /usr/bin/fish: option '--command' requires an argument.
Here some of my attempts:

  • spawn swaymsg output '*' bg % fill
  • spawn --shell=fish --shellarg=--command swaymsg output '*' bg % fill
  • spawn swaymsg output '*' bg % fill --shell=fish --shellarg=--command

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions