From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Griffin Subject: Git-style aliases in Guix? Date: Sat, 25 Feb 2017 14:59:26 -0600 Message-ID: <1488056366.2392643.892804736.71478AA0@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45393) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1chjRB-0003an-Te for guix-devel@gnu.org; Sat, 25 Feb 2017 15:59:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1chjR8-000730-To for guix-devel@gnu.org; Sat, 25 Feb 2017 15:59:30 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:57515) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1chjR8-00072v-Q5 for guix-devel@gnu.org; Sat, 25 Feb 2017 15:59:26 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 65F7C20892 for ; Sat, 25 Feb 2017 15:59:26 -0500 (EST) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org 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 ` 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