ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
* [sisyphus] git и alias'ы
@ 2009-06-26 14:50 Alexey I. Froloff
  2009-06-26 14:54 ` Ivan Fedorov
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Alexey I. Froloff @ 2009-06-26 14:50 UTC (permalink / raw)
  To: ALT Linux Sisyphus discussion list

[-- Attachment #1: Type: text/plain, Size: 645 bytes --]

Очень привык к комплишну, уже на автомате набираю две-три буквы
команды и жмакаю Tab, а git checkout начал конкретно доставать:

$ git che<Tab>
---- git command ----
...
(материмся)
$ git check<Tab>
---- git command ----
...
(материмся)

И в итоге completion оказывается бесполезен.

Делаем вид, что бранч это такой специального вида каталог:

$ alias gcd='git checkout'

Как раз три буквы, и комплитить не надо.  И чтобы работал
комплишн аргументов (zsh only):

$ compdef _git-checkout gcd

Ура!

$ gcd <Tab>
---- branch-name ----
...
---- tag-name ----
...
---- index file ----
...

-- 
Regards,
Sir Raorn.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: [sisyphus] git и alias'ы
  2009-06-26 14:50 [sisyphus] git и alias'ы Alexey I. Froloff
@ 2009-06-26 14:54 ` Ivan Fedorov
  2009-06-26 14:55   ` Led
                     ` (2 more replies)
  2009-06-26 17:38 ` Slava Semushin
  2009-07-19 21:29 ` Alexey I. Froloff
  2 siblings, 3 replies; 16+ messages in thread
From: Ivan Fedorov @ 2009-06-26 14:54 UTC (permalink / raw)
  To: sisyphus

[-- Attachment #1: Type: text/plain, Size: 435 bytes --]

"Alexey I. Froloff" <raorn-u2l5PoMzF/Vg9hUCZPvPmw@public.gmane.org>
writes:

> Очень привык к комплишну, уже на автомате набираю две-три буквы
> команды и жмакаю Tab, а git checkout начал конкретно доставать:

Если чё вдруг, то:

$ cat ~/.gitconfig 
[alias]
	ci = commit
	st = status
	co = checkout
	br = branch

:)

[-- Attachment #2: Type: application/pgp-signature, Size: 196 bytes --]

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

* Re: [sisyphus] git и alias'ы
  2009-06-26 14:54 ` Ivan Fedorov
@ 2009-06-26 14:55   ` Led
  2009-06-26 15:21     ` Ivan Fedorov
  2009-06-26 15:14   ` Alexey I. Froloff
  2009-06-26 16:34   ` Andrey Rahmatullin
  2 siblings, 1 reply; 16+ messages in thread
From: Led @ 2009-06-26 14:55 UTC (permalink / raw)
  To: ALT Linux Sisyphus discussions

On Friday 26 June 2009 17:54:24 Ivan Fedorov wrote:
> "Alexey I. Froloff" <raorn-u2l5PoMzF/Vg9hUCZPvPmw@public.gmane.org>
>
> writes:
> > Очень привык к комплишну, уже на автомате набираю две-три буквы
> > команды и жмакаю Tab, а git checkout начал конкретно доставать:
>
> Если чё вдруг, то:
>
> $ cat ~/.gitconfig
> [alias]
> 	ci = commit
> 	st = status
> 	co = checkout
> 	br = branch


Или так:

[alias]
        a = add
        aa = add .
        br = branch
        b = branch
        bs = bisect
        bi = bisect
        ch = checkout
        cl = clone
        co = commit
        c = commit
        cam = commit -am
        cp = cherry-pick
        di = diff
        d = diff
        f = fetch
        g = grep
        i = init
        l = log
        me = merge
        m = merge
        fm = merge -s ours
        mf = merge -s ours
        pl = pull
        ps = push
        pa = push --all
        rb = rebase
        re = reset
        r = reset
        rh = reset --hard
        rs = reset --soft
        sh = show
        st = status
        s = status
        t = tag

И зачем комплишены для комманд  в таком случае вообще?

-- 
Led

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

* Re: [sisyphus] git и alias'ы
  2009-06-26 14:54 ` Ivan Fedorov
  2009-06-26 14:55   ` Led
@ 2009-06-26 15:14   ` Alexey I. Froloff
  2009-06-26 16:34   ` Andrey Rahmatullin
  2 siblings, 0 replies; 16+ messages in thread
From: Alexey I. Froloff @ 2009-06-26 15:14 UTC (permalink / raw)
  To: ALT Linux Sisyphus discussion list

[-- Attachment #1: Type: text/plain, Size: 255 bytes --]

On Fri, Jun 26, 2009 at 06:54:24PM +0400, Ivan Fedorov wrote:
> Если чё вдруг, то:
> 	ci = commit
Тогда придётся рисовать такое:

_git-ci() { _git-commit "$@" }

Конфигурится в двух разных местах, что не очень удобно.

-- 
Regards,
Sir Raorn.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: [sisyphus] git и alias'ы
  2009-06-26 14:55   ` Led
@ 2009-06-26 15:21     ` Ivan Fedorov
  2009-06-26 15:25       ` Alexey I. Froloff
  0 siblings, 1 reply; 16+ messages in thread
From: Ivan Fedorov @ 2009-06-26 15:21 UTC (permalink / raw)
  To: sisyphus

[-- Attachment #1: Type: text/plain, Size: 811 bytes --]

Led <ledest-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> On Friday 26 June 2009 17:54:24 Ivan Fedorov wrote:
>> "Alexey I. Froloff" <raorn-u2l5PoMzF/Vg9hUCZPvPmw@public.gmane.org>
>>
>> writes:
>> > Очень привык к комплишну, уже на автомате набираю две-три буквы
>> > команды и жмакаю Tab, а git checkout начал конкретно доставать:
>>
>> Если чё вдруг, то:
>>
>> $ cat ~/.gitconfig
>> [alias]
>> 	ci = commit
>> 	st = status
>> 	co = checkout
>> 	br = branch
>
>
> Или так:
>
> [alias]
>         a = add
жЮть скиппед! :)
>         t = tag
>
> И зачем комплишены для комманд  в таком случае вообще?
во-во! :)

[-- Attachment #2: Type: application/pgp-signature, Size: 196 bytes --]

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

* Re: [sisyphus] git и alias'ы
  2009-06-26 15:21     ` Ivan Fedorov
@ 2009-06-26 15:25       ` Alexey I. Froloff
  0 siblings, 0 replies; 16+ messages in thread
From: Alexey I. Froloff @ 2009-06-26 15:25 UTC (permalink / raw)
  To: ALT Linux Sisyphus discussion list

[-- Attachment #1: Type: text/plain, Size: 221 bytes --]

On Fri, Jun 26, 2009 at 07:21:22PM +0400, Ivan Fedorov wrote:
> > И зачем комплишены для комманд  в таком случае вообще?
> во-во! :)
Дык, комплишены-то не для команд, а для аргументов ;-)

-- 
Regards,
Sir Raorn.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: [sisyphus] git и alias'ы
  2009-06-26 14:54 ` Ivan Fedorov
  2009-06-26 14:55   ` Led
  2009-06-26 15:14   ` Alexey I. Froloff
@ 2009-06-26 16:34   ` Andrey Rahmatullin
  2009-06-26 16:43     ` Ivan Fedorov
  2 siblings, 1 reply; 16+ messages in thread
From: Andrey Rahmatullin @ 2009-06-26 16:34 UTC (permalink / raw)
  To: sisyphus

[-- Attachment #1: Type: text/plain, Size: 423 bytes --]

On Fri, Jun 26, 2009 at 06:54:24PM +0400, Ivan Fedorov wrote:
> Если чё вдруг, то:
> $ cat ~/.gitconfig 
> [alias]
> 	ci = commit
> 	st = status
> 	co = checkout
> 	br = branch
Тогда уж
[alias]
        st = -p status

-- 
WBR, wRAR (ALT Linux Team)
Powered by the ALT Linux fortune(8):

Есть мнение, что за разломать по личным нуждам, а потом орать
"дайте денег, починю" надо кунать.
		-- mike in devel@

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 489 bytes --]

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

* Re: [sisyphus] git и alias'ы
  2009-06-26 16:34   ` Andrey Rahmatullin
@ 2009-06-26 16:43     ` Ivan Fedorov
  2009-06-26 16:56       ` Andrey Rahmatullin
  0 siblings, 1 reply; 16+ messages in thread
From: Ivan Fedorov @ 2009-06-26 16:43 UTC (permalink / raw)
  To: sisyphus

[-- Attachment #1: Type: text/plain, Size: 408 bytes --]

Andrey Rahmatullin <wrar-u2l5PoMzF/Uox3rIn2DAYQ@public.gmane.org>
writes:

> On Fri, Jun 26, 2009 at 06:54:24PM +0400, Ivan Fedorov wrote:
>> Если чё вдруг, то:
>> $ cat ~/.gitconfig 
>> [alias]
>> 	ci = commit
>> 	st = status
>> 	co = checkout
>> 	br = branch
> Тогда уж
> [alias]
>         st = -p status

У меня оно по дефолту с пейджером...

[-- Attachment #2: Type: application/pgp-signature, Size: 196 bytes --]

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

* Re: [sisyphus] git и alias'ы
  2009-06-26 16:43     ` Ivan Fedorov
@ 2009-06-26 16:56       ` Andrey Rahmatullin
  2009-06-26 17:08         ` Ivan Fedorov
  0 siblings, 1 reply; 16+ messages in thread
From: Andrey Rahmatullin @ 2009-06-26 16:56 UTC (permalink / raw)
  To: sisyphus

[-- Attachment #1: Type: text/plain, Size: 671 bytes --]

On Fri, Jun 26, 2009 at 08:43:26PM +0400, Ivan Fedorov wrote:
> >> Если чё вдруг, то:
> >> $ cat ~/.gitconfig 
> >> [alias]
> >> 	ci = commit
> >> 	st = status
> >> 	co = checkout
> >> 	br = branch
> > Тогда уж
> > [alias]
> >         st = -p status
> 
> У меня оно по дефолту с пейджером...
А, ну я про сизиф.

-- 
WBR, wRAR (ALT Linux Team)
Powered by the ALT Linux fortune(8):

> Что-то тут все речь видут про глюки S3Trio64+ наверное правда,
> но у меня с Мастером 2.0 работала как миленькая.
Ещё бы она не работала на XFree 3.x. "Мы идём в светлое будущее
семимильными шагами, и коровы не успевают" - где-то так :-)
		-- abulava in hardware@

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 489 bytes --]

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

* Re: [sisyphus] git и alias'ы
  2009-06-26 16:56       ` Andrey Rahmatullin
@ 2009-06-26 17:08         ` Ivan Fedorov
  2009-06-26 17:11           ` Andrey Rahmatullin
  0 siblings, 1 reply; 16+ messages in thread
From: Ivan Fedorov @ 2009-06-26 17:08 UTC (permalink / raw)
  To: sisyphus

[-- Attachment #1: Type: text/plain, Size: 588 bytes --]

Andrey Rahmatullin <wrar-u2l5PoMzF/Uox3rIn2DAYQ@public.gmane.org>
writes:

> On Fri, Jun 26, 2009 at 08:43:26PM +0400, Ivan Fedorov wrote:
>> >> Если чё вдруг, то:
>> >> $ cat ~/.gitconfig 
>> >> [alias]
>> >> 	ci = commit
>> >> 	st = status
>> >> 	co = checkout
>> >> 	br = branch
>> > Тогда уж
>> > [alias]
>> >         st = -p status
>> 
>> У меня оно по дефолту с пейджером...
> А, ну я про сизиф.

У меня сизиф... :)

Может у тебя $TERM не нравится автоматике?..

[-- Attachment #2: Type: application/pgp-signature, Size: 196 bytes --]

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

* Re: [sisyphus] git и alias'ы
  2009-06-26 17:08         ` Ivan Fedorov
@ 2009-06-26 17:11           ` Andrey Rahmatullin
  2009-06-26 17:26             ` Ivan Fedorov
  0 siblings, 1 reply; 16+ messages in thread
From: Andrey Rahmatullin @ 2009-06-26 17:11 UTC (permalink / raw)
  To: sisyphus

[-- Attachment #1: Type: text/plain, Size: 695 bytes --]

On Fri, Jun 26, 2009 at 09:08:06PM +0400, Ivan Fedorov wrote:
> >> > [alias]
> >> >         st = -p status
> >> 
> >> У меня оно по дефолту с пейджером...
> > А, ну я про сизиф.
> У меня сизиф... :)
> Может у тебя $TERM не нравится автоматике?..
/usr/share/doc/git-1.6.3.3/RelNotes-1.6.0.txt
An earlier change to page "git status" output was overwhelmingly unpopular
and has been reverted.
* pager.<cmd> configuration variable can be used to enable/disable the
  default paging behaviour per command.

-- 
WBR, wRAR (ALT Linux Team)
Powered by the ALT Linux fortune(8):

rsync пока жив, но в наших интересах использовать зеркала,
предоставляющие rsync.
		-- rider in devel@

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 489 bytes --]

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

* Re: [sisyphus] git и alias'ы
  2009-06-26 17:11           ` Andrey Rahmatullin
@ 2009-06-26 17:26             ` Ivan Fedorov
  0 siblings, 0 replies; 16+ messages in thread
From: Ivan Fedorov @ 2009-06-26 17:26 UTC (permalink / raw)
  To: sisyphus

[-- Attachment #1: Type: text/plain, Size: 1067 bytes --]

Andrey Rahmatullin <wrar-u2l5PoMzF/Uox3rIn2DAYQ@public.gmane.org>
writes:

> On Fri, Jun 26, 2009 at 09:08:06PM +0400, Ivan Fedorov wrote:
>> >> > [alias]
>> >> >         st = -p status
>> >> 
>> >> У меня оно по дефолту с пейджером...
>> > А, ну я про сизиф.
>> У меня сизиф... :)
>> Может у тебя $TERM не нравится автоматике?..
> /usr/share/doc/git-1.6.3.3/RelNotes-1.6.0.txt
> An earlier change to page "git status" output was overwhelmingly unpopular
> and has been reverted.
> * pager.<cmd> configuration variable can be used to enable/disable the
>   default paging behaviour per command.

хм... ну а я думал, это у меня он на короткий вывод без less
отдаётся... но вообще мне и так нормально. Я git по большей части из
emacs гоняю :)

Так что мне наверно "-p" и вовсе не надо... главное, что логи с
пейджером! :)

[-- Attachment #2: Type: application/pgp-signature, Size: 196 bytes --]

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

* Re: [sisyphus] git и alias'ы
  2009-06-26 14:50 [sisyphus] git и alias'ы Alexey I. Froloff
  2009-06-26 14:54 ` Ivan Fedorov
@ 2009-06-26 17:38 ` Slava Semushin
  2009-06-26 17:47   ` Alexey I. Froloff
  2009-07-19 21:29 ` Alexey I. Froloff
  2 siblings, 1 reply; 16+ messages in thread
From: Slava Semushin @ 2009-06-26 17:38 UTC (permalink / raw)
  To: ALT Linux Sisyphus discussions

26 июня 2009 г. 21:50 пользователь Alexey I. Froloff
(raorn@altlinux.org) написал:
> Очень привык к комплишну, уже на автомате набираю две-три буквы
> команды и жмакаю Tab, а git checkout начал конкретно доставать:

А я вот так выкрутился:

[c0der@rock ~]$ fgrep switch .zsh/.zshrc                                   0:38
alias git-switch='git checkout'


-- 
+ Slava Semushin | slava.semushin @ gmail.com
+ ALT Linux Team | php-coder @ altlinux.ru

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

* Re: [sisyphus] git и alias'ы
  2009-06-26 17:38 ` Slava Semushin
@ 2009-06-26 17:47   ` Alexey I. Froloff
  2009-06-26 17:50     ` Slava Semushin
  0 siblings, 1 reply; 16+ messages in thread
From: Alexey I. Froloff @ 2009-06-26 17:47 UTC (permalink / raw)
  To: ALT Linux Sisyphus discussion list

[-- Attachment #1: Type: text/plain, Size: 365 bytes --]

On Sat, Jun 27, 2009 at 12:38:56AM +0700, Slava Semushin wrote:
> > Очень привык к комплишну, уже на автомате набираю две-три буквы
> > команды и жмакаю Tab, а git checkout начал конкретно доставать:
> А я вот так выкрутился:
> alias git-switch='git checkout'
Ну и какой в этом смысл, если после "git" пальцы сами жмут
пробел?


-- 
Regards,
Sir Raorn.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: [sisyphus] git и alias'ы
  2009-06-26 17:47   ` Alexey I. Froloff
@ 2009-06-26 17:50     ` Slava Semushin
  0 siblings, 0 replies; 16+ messages in thread
From: Slava Semushin @ 2009-06-26 17:50 UTC (permalink / raw)
  To: ALT Linux Sisyphus discussions

27 июня 2009 г. 0:47 пользователь Alexey I. Froloff
(raorn@altlinux.org) написал:
> On Sat, Jun 27, 2009 at 12:38:56AM +0700, Slava Semushin wrote:
>> > Очень привык к комплишну, уже на автомате набираю две-три буквы
>> > команды и жмакаю Tab, а git checkout начал конкретно доставать:
>> А я вот так выкрутился:
>> alias git-switch='git checkout'
> Ну и какой в этом смысл, если после "git" пальцы сами жмут
> пробел?

У меня не жмут :)

(Это я потому что "и лучше выдумать не мог", но только что заменил это
на alias в .gitconfig, по примеру ns@)


-- 
+ Slava Semushin | slava.semushin @ gmail.com
+ ALT Linux Team | php-coder @ altlinux.ru

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

* Re: [sisyphus] git и alias'ы
  2009-06-26 14:50 [sisyphus] git и alias'ы Alexey I. Froloff
  2009-06-26 14:54 ` Ivan Fedorov
  2009-06-26 17:38 ` Slava Semushin
@ 2009-07-19 21:29 ` Alexey I. Froloff
  2 siblings, 0 replies; 16+ messages in thread
From: Alexey I. Froloff @ 2009-07-19 21:29 UTC (permalink / raw)
  To: ALT Linux Sisyphus discussion list

[-- Attachment #1: Type: text/plain, Size: 372 bytes --]

On Fri, Jun 26, 2009 at 06:50:34PM +0400, Alexey I. Froloff wrote:
> $ alias gcd='git checkout'
> Как раз три буквы, и комплитить не надо.  И чтобы работал
> комплишн аргументов (zsh only):
> $ compdef _git-checkout gcd
А всего-то надо было сделать setopt nocompletealiases, тогда
alias'ы будут раскрываться перед обработкой комплишна.

-- 
Regards,
Sir Raorn.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

end of thread, other threads:[~2009-07-19 21:29 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-26 14:50 [sisyphus] git и alias'ы Alexey I. Froloff
2009-06-26 14:54 ` Ivan Fedorov
2009-06-26 14:55   ` Led
2009-06-26 15:21     ` Ivan Fedorov
2009-06-26 15:25       ` Alexey I. Froloff
2009-06-26 15:14   ` Alexey I. Froloff
2009-06-26 16:34   ` Andrey Rahmatullin
2009-06-26 16:43     ` Ivan Fedorov
2009-06-26 16:56       ` Andrey Rahmatullin
2009-06-26 17:08         ` Ivan Fedorov
2009-06-26 17:11           ` Andrey Rahmatullin
2009-06-26 17:26             ` Ivan Fedorov
2009-06-26 17:38 ` Slava Semushin
2009-06-26 17:47   ` Alexey I. Froloff
2009-06-26 17:50     ` Slava Semushin
2009-07-19 21:29 ` Alexey I. Froloff

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git