From: Mekeor Melire <mekeor.melire@gmail.com>
To: Alex Griffin <a@ajgrf.com>
Cc: guix-devel@gnu.org
Subject: Re: Git-style aliases in Guix?
Date: Sun, 26 Feb 2017 22:15:10 +0100 [thread overview]
Message-ID: <877f4c1wo1.fsf@gmail.com> (raw)
In-Reply-To: <1488056366.2392643.892804736.71478AA0@webmail.messagingengine.com>
I'd also like to have some Guix aliases. In Git, you can define aliases
like so:
# define new alias
$ git config --global alias.i init
# use new alias
$ git i
Personally, I'd prefer to type `guix p -i` for `guix package -i`.
Anyway.
Concerning how to implement this alias feature within Guix, I'd first
like to pose a much broader question. So, on GuixSD you have a
configuration, written in Scheme, for your operating system. Couldn't we
make Guix have a scheme-configuration file for itself, as well?
Alex Griffin <a@ajgrf.com> writes:
> 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?
--
next prev parent reply other threads:[~2017-02-26 21:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-25 20:59 Git-style aliases in Guix? Alex Griffin
2017-02-26 21:15 ` Mekeor Melire [this message]
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
-- strict thread matches above, loose matches on Subject: below --
2017-02-25 20:58 Alex Griffin
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=877f4c1wo1.fsf@gmail.com \
--to=mekeor.melire@gmail.com \
--cc=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).