Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] git status filter to NOT show files of extension type

Status
Not open for further replies.

wtr

Full Member level 5
Joined
May 1, 2014
Messages
299
Helped
29
Reputation
58
Reaction score
25
Trophy points
1,308
Activity points
4,108
Hello all,

I'm familiar with

Filter to show no untracked files (i.e only tracked)
Code:
git status -uno

Filter to show only tracked files ending with .txt
Code:
git status *.txt -uno

What I want to be able to do is

Filter to NOT show files of type log
I tried using a regexp which did not match log -> ^.*\.(?!log$)[^.]+$

Code:
git status ^.*\.(?!log$)[^.]+$ -uno
However this gave me nothing.

I'd greatly appreciate any advice

FYI.
I know I could git status >> a.txt then vim into a.txt and :g/searchstring/d
But I don't want to be dependant on other tools/applications.

Regards,
 

How about:

Code:
% git status -uno | sed '/\.log/d'

If you are on windows you'll have to get the gnu win version of sed and use the following:
Code:
> git status -uno | sed -e "/\.log/d"
or
> git status -uno | sed -e /\.log/d
works too.
 
  • Like
Reactions: wtr

    wtr

    Points: 2
    Helpful Answer Positive Rating
Imagine I'm not allowed to install anything.

For linux this is a solution, because unless its something like arch i'm almost certain -find/grep/sed are native.

Whereas in the windows land I guess one might be forced to deviate - unless they can get common tools. Like I said earlier, imagine I have no control over installations.
 

Well technically you dont install gnu tool on windows. They are natively compiled for win32 they can be copied to any directory.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top