intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [maintainer-tools PATCH] dim.rst: Document aliases extension on dimrc.
@ 2017-08-17 17:15 Rodrigo Vivi
  2017-08-17 17:33 ` Jani Nikula
  0 siblings, 1 reply; 10+ messages in thread
From: Rodrigo Vivi @ 2017-08-17 17:15 UTC (permalink / raw)
  To: intel-gfx; +Cc: Jani Nikula, Daniel Vetter, Rodrigo Vivi

On my own workflow I was missing a way to download mboxes
directly from patchwork with the patchwork id. So my first
reflex was to modify dim to fulfil my needs. However that
was increasing dim in complexity and dependencies and leaving
that messy.

That was when Jani suggested me the dimrc extension with the
example that is now part of this spec.

That was clean and simple enough to understand, so Daniel
suggested me to add it to the spec.

For record let's put my final local solution that lays now on
my own ~/.dimrc

dim_pwaq()
{
	if [ -n "$1" ]; then
		curl https://patchwork.freedesktop.org/patch/$1/mbox/ | dim_apply_queued
	else
	echo "Give me a patchwork id"
	fi
}

Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 dim.rst | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/dim.rst b/dim.rst
index 802c776e03f9..c6728d186554 100644
--- a/dim.rst
+++ b/dim.rst
@@ -441,6 +441,22 @@ usage
 Short form usage help listing all subcommands. Run by default or if an unknown
 subcommand was passed on the cmdline.
 
+ALIASES
+=======
+
+Extending **dim** functionalities
+---------------------------------
+
+It is possible to create your own dim helper and aliases by adding them to \$HOME/.dimrc
+
+dim_my_fancy_list_aliases()
+{
+	echo "Hello world!"
+	dim_list_aliases
+}
+
+dim_alias_list_aliases=my-fancy-list-aliases
+
 ENVIRONMENT
 ===========
 
-- 
2.13.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-08-23  8:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-17 17:15 [maintainer-tools PATCH] dim.rst: Document aliases extension on dimrc Rodrigo Vivi
2017-08-17 17:33 ` Jani Nikula
2017-08-17 18:12   ` Rodrigo Vivi
2017-08-18  7:09     ` Jani Nikula
2017-08-18 23:44       ` Rodrigo Vivi
2017-08-21  8:39         ` Jani Nikula
2017-08-21 20:23           ` Rodrigo Vivi
2017-08-22  7:12             ` Jani Nikula
2017-08-22 16:30               ` Rodrigo Vivi
2017-08-23  8:43                 ` Jani Nikula

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 NNTP newsgroup(s).