unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alex Griffin <a@ajgrf.com>
To: guix-devel@gnu.org
Subject: Git-style aliases in Guix?
Date: Sat, 25 Feb 2017 14:58:46 -0600	[thread overview]
Message-ID: <1488056326.2392632.892804504.7C0F47B9@webmail.messagingengine.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1594 bytes --]

I think it would be cool and useful if Guix had some kind of config file
where users could define new commands or aliases, as in git. I'm sure
many people here already have their own helper code to work witk Guix,
whether that's in shell scripts, bashrc, guile, elisp, etc. And it would
make it easier to experiment with changing the command line syntax
without committing to any change too soon.

I've attached my own Guix wrapper function to show some use cases, like:

# New features
* automatically invoke `./pre-inst-env` when ~/.config/guix/latest
points to a git repo
* `guix make` builds Guix in your git checkout directory
* `guix clean` cleans out your Guix git checkout
* `guix visit <package>` opens a package's homepage in a browser
* `guix ls` lists the files in a Guix package (must be present or built
on your machine)

# Convenience Commands
* `guix search` wraps `guix package -s` with a recutils template
* `guix manifest` -> guix package --manifest=~/.config/guix/profile.scm
* `guix reconfigure` -> sudo guix system reconfigure
~/.config/guix/system.scm
* `guix repl` just invokes `./pre-inst-env guile`, but it should
probably also load some Guix modules.

# Simple Aliases
* `guix add` or `guix install` -> guix package --install
* `guix env` -> guix environment
* `guix try` -> guix environment --ad-hoc
* `guix profile` -> guix package
* `guix show` or `guix info` -> guix package --show=
* `guix remove` or `guix uninstall` -> guix package --remove

What does everyone think? If you like the idea, what would the
implementation/config file look like?
-- 
Alex Griffin

[-- Attachment #2: guix-wrapper.sh --]
[-- Type: application/x-shellscript, Size: 1677 bytes --]

             reply	other threads:[~2017-02-25 20:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-25 20:58 Alex Griffin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-02-25 20:59 Git-style aliases in Guix? Alex Griffin
2017-02-26 21:15 ` Mekeor Melire
2017-02-27  5:54   ` John Darrington
2017-02-27  8:30     ` Mekeor Melire
2017-02-27 15:15       ` John Darrington
2017-02-27 19:01         ` Mekeor Melire
2017-03-08  8:53           ` Ludovic Courtès
2017-03-09  3:27             ` Mekeor Melire
2017-03-09 10:53               ` Ludovic Courtès

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=1488056326.2392632.892804504.7C0F47B9@webmail.messagingengine.com \
    --to=a@ajgrf.com \
    --cc=guix-devel@gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).