Ptyxis | edit profile | custom command, how to join or pipe commands

I would like to create a profile, which by opening, displays a color-coded document.

The exact string would be:

dircolors --print-ls-colors | column

Unfortunately this gives me a error message like:

Error & Help Message
/usr/bin/dircolors: extra operand ‘column’
Try '/usr/bin/dircolors --help' for more information.

$ /usr/bin/dircolors --help
Usage: /usr/bin/dircolors [OPTION]... [FILE]
Output commands to set the LS_COLORS environment variable.

Determine format of output:
  -b, --sh, --bourne-shell    output Bourne shell code to set LS_COLORS
  -c, --csh, --c-shell        output C shell code to set LS_COLORS
  -p, --print-database        output defaults
      --print-ls-colors       output fully escaped colors for display
      --help        display this help and exit
      --version     output version information and exit

If FILE is specified, read it to determine which colors to use for which
file types and extensions.  Otherwise, a precompiled database is used.
For details on the format of these files, run 'dircolors --print-database'.

GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
Full documentation <https://www.gnu.org/software/coreutils/dircolors>
or available locally via: info '(coreutils) dircolors invocation'

Without | column it works. But this way I scroll as a fool, to check every colorprofile in Ptyxis.

I checked the rpm & flatpak version on F41 Workstation.

Would be glad to get some assistance, to find out, a how to join or pipe commands in “custom commands” in a ptyxis profile.

If my guess it right, pipes between processes is provided by a shell. But by setting a custom command, you’re skipping the initialization of the shell in this profile, so no pipe.

You could launch an shell which in turn launches the command you wish to run, using the appropriate argument.
For example, sh -c "dircolors --print-ls-colors | column" would first launch an instance of sh, which then would run your command with the pipe.

2 Likes

Thanks @CodedOre , It works perfect. I could even test it in the old gnome-terminal. There it just needs to be clicked the option, “Hold the Terminal Open”.