all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: jgart <jgart@dismail.de>, Guix Devel <guix-devel@gnu.org>
Subject: Re: repl macro (metacommand?) for guix CLI (sub)commands
Date: Mon, 04 Jul 2022 10:29:20 +0200	[thread overview]
Message-ID: <86edz11dsv.fsf@gmail.com> (raw)
In-Reply-To: <20220703131112.GB5967@gac>

Hi,

On Sun, 03 Jul 2022 at 13:11, jgart <jgart@dismail.de> wrote:
> What do guixers think of having a repl macro that allows
> you to run commands like if you were using the CLI?

I am not sure to understand the question.  Well, it is already possible,
no?

--8<---------------cut here---------------start------------->8---
$ guix repl
GNU Guile 3.0.8
Copyright (C) 1995-2021 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guix-user)> ,use(guix scripts show)
scheme@(guix-user)> (guix-show "hello")
name: hello
version: 2.12.1
outputs: out
systems: x86_64-linux i686-linux
dependencies: 
location: gnu/packages/base.scm:86:2
homepage: https://www.gnu.org/software/hello/
license: GPL 3+
synopsis: Hello, GNU world: An example GNU package  
description: GNU Hello prints the message "Hello, world!" and then exits.  It serves as an example of standard GNU
+ coding practices.  As such, it supports command-line arguments, multiple languages, and so on.

$1 = #t
scheme@(guix-user)> ,use(guix scripts package)
scheme@(guix-user)> (guix-package "-s" "hello")
[...]
--8<---------------cut here---------------end--------------->8---

Obviously, using CLI at the REPL is always not handy,

--8<---------------cut here---------------start------------->8---
scheme@(guix-user)> (guix-show "helloo")
guix repl: error: helloo: package not found
$ 
--8<---------------cut here---------------end--------------->8---


Cheers,
simon


  reply	other threads:[~2022-07-04  8:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-03 18:11 repl macro (metacommand?) for guix CLI (sub)commands jgart
2022-07-04  8:29 ` zimoun [this message]
2022-07-04 13:22 ` Ludovic Courtès
2022-07-04 18:21   ` jgart
2022-07-04 20:28     ` Tobias Geerinckx-Rice
2022-07-04 22:47       ` zimoun
2022-07-05 22:27         ` jgart
2022-07-06  6:44           ` zimoun
2022-07-06 12:13             ` bokr
2022-07-06 12:58               ` zimoun
2022-07-16 19:08                 ` Bengt Richter
2022-07-07  7:31     ` Ludovic Courtès
2022-07-07  7:58       ` bokr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86edz11dsv.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=jgart@dismail.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.