[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Git-style aliases in Guix?
From: |
Alex Griffin |
Subject: |
Git-style aliases in Guix? |
Date: |
Sat, 25 Feb 2017 14:59:26 -0600 |
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