mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +03:00
c2cf2592b2
This patch adds git-style "shell aliases" to Mercurial. Any alias with a definition beginning with a '!' will be treated as a shell alias. For example: [alias] echo = !echo qempty = !hg qrefresh -X "`hg root`" ; echo Emptied patch "`hg qtop`" $ hg echo foo foo $ hg qempty Emptied patch foo $
48 lines
1.3 KiB
Plaintext
48 lines
1.3 KiB
Plaintext
% basic
|
|
% unknown
|
|
alias 'unknown' resolves to unknown command 'bargle'
|
|
alias 'unknown' resolves to unknown command 'bargle'
|
|
% ambiguous
|
|
alias 'ambiguous' resolves to ambiguous command 's'
|
|
alias 'ambiguous' resolves to ambiguous command 's'
|
|
% recursive
|
|
alias 'recursive' resolves to unknown command 'recursive'
|
|
alias 'recursive' resolves to unknown command 'recursive'
|
|
% no definition
|
|
no definition for alias 'nodefinition'
|
|
no definition for alias 'nodefinition'
|
|
% no usage
|
|
no rollback information available
|
|
adding foo
|
|
% with opts
|
|
C foo
|
|
% with opts and whitespace
|
|
0 e63c23eaa88a | 1970-01-01 00:00 +0000
|
|
% interaction with defaults
|
|
0:e63c23eaa88a
|
|
-1:000000000000
|
|
% properly recursive
|
|
changeset: -1:0000000000000000000000000000000000000000
|
|
parent: -1:0000000000000000000000000000000000000000
|
|
parent: -1:0000000000000000000000000000000000000000
|
|
manifest: -1:0000000000000000000000000000000000000000
|
|
user:
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
extra: branch=default
|
|
|
|
% path expanding
|
|
# HG changeset patch
|
|
# User test
|
|
# Date 0 0
|
|
# Node ID e63c23eaa88ae77967edcf4ea194d31167c478b0
|
|
# Parent 0000000000000000000000000000000000000000
|
|
foo
|
|
|
|
diff -r 000000000000 -r e63c23eaa88a foo
|
|
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
|
|
+++ b/foo Thu Jan 01 00:00:00 1970 +0000
|
|
@@ -0,0 +1,1 @@
|
|
+foo
|
|
% shell aliases
|
|
foo
|