guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Git-style aliases in Guix?


From: Mekeor Melire
Subject: Re: Git-style aliases in Guix?
Date: Sun, 26 Feb 2017 22:15:10 +0100
User-agent: mu4e 0.9.18; emacs 25.1.1

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 <address@hidden> 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?


--



reply via email to

[Prev in Thread] Current Thread [Next in Thread]