You are not logged in.

#1 2019-09-06 21:00:58

keltek
Member
Registered: 2017-01-08
Posts: 53

[SOLVED] zsh =() not working in xinitrc file

I'm trying to use the

=(...)

zsh builtin within my

~/.xinitrc

but it isn't being recognized. Below is the relevant snippet from my xinitrc that fails.

#!/usr/bin/zsh

xrdb -load =(gen-xresources)

where

gen-xresources

is a command that dynamically generates an Xresoureces file. The command itself has been tested in a regular shell and is confirmed to be working just fine. Is there special behavior within an xinitrc file that disallows this?

EDIT: I'm not sure how to do in-place code with this formatting.

Last edited by keltek (2019-09-08 23:05:21)

Offline

#2 2019-09-06 21:22:24

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,382

Re: [SOLVED] zsh =() not working in xinitrc file

xinitrc isn't interpreted by zsh, no matter what you put in the shebang.
You'll have to force it, https://coderwall.com/p/v4dora/execute- … under-bash

Edit: this might have unforseen side-effects, but idk at all.

Last edited by seth (2019-09-06 21:22:52)

Offline

#3 2019-09-06 23:02:24

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,529
Website

Re: [SOLVED] zsh =() not working in xinitrc file

Ah ... why not do the far far far simpler solution of using POSIX shell syntax rather some zsh quirk that replicates the behavior already covered by POSIX shell mechanisms:

xrdb -load $(gen-xresources)

EDIT: perhaps I misunderstood the = ( syntax as I've never used Zsh.  I just looked it up, and it may instead be replaced by <() in bash, or just piping in sh:

gen-xresources | xrdb -load -

And for what it's worth, my xinitrc (when I used one) started with this line:

#!hsab/nib/

It need not be executable, and is not executed.  It is sourced.  So that first line is not a shebang, it's just a comment.

Last edited by Trilby (2019-09-06 23:11:02)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB