0

.gitconfigには、次のエイリアスがあります。

[alias]
    ...
    ...
    ...
    lg1 = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(bold white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative

だから私は次のように結果を得ました:

$ g gl1 -12

* 1b9f1d0 - (20 hours ago) recreated (again) for pyton 2.7 and some new features in DB. - xiaose (xiaose-site)
* 409f299 - (5 months ago) changed internal structure. Start frontend design. - xiaose
* ff0ede9 - (5 months ago) Trying to implement new design. Everything starts from beginning. - xiaose
| * 97c9f4e - (7 months ago) Changed PNG beam to SVG and added 2 states in "Symbol" as normal & small symbols. - xiaose (xiaose-predator)
| * c97b838 - (7 months ago) Top level QML which send signal about increment value every second. - xiaose
| * d5859ee - (7 months ago) Symbol definition. There is JS file with actions for increasing & set up some number in symbol. That symbol can show numbers from 0 to 511. - xiaose
| * 1e850e7 - (7 months ago) Beam definition. In one symbol used 9 beams. 5 at the top + 4 at the bottom. - xiaose
| * 92cc1d2 - (7 months ago) There will be QML counter in Predator's style. - xiaose
|/  
* fcd26c9 - (7 months ago) Initial commit. There are my own project for future impl. in productin. - xiaose (xiaose)
| * c2561c3 - (5 days ago) GT1. Fixed issue when hash checking got error & totals in order was 0. - xiaose (gt1)
| * 7dab789 - (5 days ago) GT1. Fixing issue in PP responce. - Justin Felisco
| | * d56e7fa - (5 days ago) GT1. Changes in PayPal. - Justin Felisco (grx1)

すべてがOKのように見えますが、小さなターミナルウィンドウの場合、次のような結果が得られました。

$ g gl1 -12

* 1b9f1d0 - (20 hours ago) recreated (again) for pyton 2.7 and some new feat    
* 409f299 - (5 months ago) changed internal structure. Start frontend design    
* ff0ede9 - (5 months ago) Trying to implement new design. Everything starts    
| * 97c9f4e - (7 months ago) Changed PNG beam to SVG and added 2 states in "   
| * c97b838 - (7 months ago) Top level QML which send signal about increment   
| * d5859ee - (7 months ago) Symbol definition. There is JS file with action   
| * 1e850e7 - (7 months ago) Beam definition. In one symbol used 9 beams. 5    
| * 92cc1d2 - (7 months ago) There will be QML counter in Predator's style.    
|/  
* fcd26c9 - (7 months ago) Initial commit. There are my own project for futu   
| * c2561c3 - (5 days ago) GT1. Fixed issue when hash checking got error & t   
| * 7dab789 - (5 days ago) GT1. Fixing issue in PP responce. - Justin Felisc   
| | * d56e7fa - (5 days ago) GT1. Changes in PayPal. - Justin Felisco (grx1)   

だから私の質問は:smthを行うことは可能ですか?文字列がバラバラになり、残りが新しい行に転送されましたか?

文字列を次のようにラップする1つの方法(コメントで述べられているように)が存在します。

$ git lg1 -9 | fold -s -w 70

* 1b9f1d0 - (22 hours ago) recreated (again) 
for pyton 2.7 and some new features. - xiaose 
(xiaose-site)
* 409f299 - (5 months ago) changed internal 
structure. Start frontend design. - xiaose
* ff0ede9 - (5 months ago) Trying to implement new design. 
Everything starts from beginning - xiaose
| * 97c9f4e - (7 months ago) Changed PNG 
beam to SVG and added 2 states in "Symbol" as normal & small 
symbols. - xiaose (xiaose-predator)
| * c97b838 - (7 months ago) Top level QML 
which send signal about increment value every second. - 
xiaose
| * d5859ee - (7 months ago) Symbol 
definition. There is JS file with actions for increasing & set up 
some number in symbol. That symbol can show numbers from 0 to 511. 
- xiaose
| * 1e850e7 - (7 months ago) Beam 
definition. In one symbol used 9 beams. 5 at the top + 4 at the 
bottom. - xiaose
| * 92cc1d2 - (7 months ago) There will be 
QML counter in Predator's style. - xiaose
|/  
* fcd26c9 - (7 months ago) Initial commit. 
there will be all my projects. - xiaose 
(xiaose)

しかし、それはあまり良くないように見えます...それは散らかっているように見えます。

あなたはsmthをすることが可能であるか知っているかもしれません。このような:

* 1b9f1d0 - (22 hours ago) recreated (again) for pyton 2.7 and some 
|           new features. - xiaose (xiaose-site)
* 409f299 - (5 months ago) changed internal structure. Start frontend 
|           design. - xiaose
* ff0ede9 - (5 months ago) Trying to implement new design. 
| |         Everything starts from beginning - xiaose
| * 97c9f4e - (7 months ago) Changed PNG 
| |           beam to SVG and added 2 states in "Symbol" as normal &  
| |           small symbols. - xiaose (xiaose-predator)
| * c97b838 - (7 months ago) Top level QML 
| |           which send signal about increment value every second. - 
| |           xiaose
| * d5859ee - (7 months ago) Symbol 
| |           definition. There is JS file with actions for increasing 
| |           & set up some number in symbol. That symbol can show 
| |           numbers from 0 to 511. - xiaose
| * 1e850e7 - (7 months ago) Beam definition. In one symbol used 9 
| |           beams. 5 at the top + 4 at the bottom. - xiaose
| * 92cc1d2 - (7 months ago) There will be QML counter in Predator's 
| |           style. - xiaose
|/  
* fcd26c9 - (7 months ago) Initial commit. there will be all my 
            projects. - xiaose (xiaose)
4

1 に答える 1

1

foldディストリビューションにそれがあれば、試してみることができます。例えば:

git lg1 | fold -s -w 40

スペース(単語の途中ではない)で壊れ、40文字の幅に調整されます。ただし、すべての色を変更するコードでどれだけうまく機能するかはわかりません。

于 2012-10-02T14:57:52.073 に答える