Coder Social home page Coder Social logo

Comments (4)

jmattheis avatar jmattheis commented on July 30, 2024 1

Your aliases are probably configured inside your .zshrc, zsh -c doesn't source that, because the shell isn't interactive:

$HOME/.zshrc Used for setting user's interactive shell configuration and executing commands, will be read when starting as an interactive shell.

https://wiki.archlinux.org/title/zsh

add -i to the zsh command:

$ gotify watch -o short -x '/bin/zsh -ic' 'echo $ZSH $RANDOM'

from cli.

jmattheis avatar jmattheis commented on July 30, 2024

You can specify the shell that is used to execute the command with --exec or -x.

$ gotify watch -o short -x '/bin/zsh -c' 'echo $ZSH $RANDOM'
/usr/share/oh-my-zsh 14408

from cli.

melo0187 avatar melo0187 commented on July 30, 2024

@jmattheis thank you for your quick reply.

I can confirm that your command works on my side, too.
However all the oh-my-zsh stuff and whatever I defined in zshrc does not get picked up by the shell used for gotify watch.
So this here e.g. does not work:

$ gotify watch -o short -x '/bin/zsh -c' 'omz'
first run failed command failed to invoke: exit status 127

from cli.

melo0187 avatar melo0187 commented on July 30, 2024

Ah, I didn't read the zsh documentation... my bad.
Thank you @jmattheis for explaining. Works like a charm =)

from cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.