Skip to main content

A better alias for `ls | grep`

Project description

Built with Spacemacs Instagram Twitter Facebook


MIT license forthebadge made-with-python


LSG => ls | grep

Table of contents

Introduction

This project started as a shell script for ls | grep to check if a folder contains the file which I am looking for.

I tried using find and other unix-like tools, but either they were too complicated to use or the results were not what I wanted.

The package doesn't aim to revolutionize the way you do your ls or anything else. Its just a better substitution to bash script.

Back to top

Features

  • Search for multiple files and folders.
  • Specify a path to search or it will search within current directory.
  • Print total number of results.
  • Case insensitive substring search.
  • Results are displayed in separate categories.
  • OS agnostic

Back to top

Getting Started

Installation

pip install lsg

Usage

lsg FILENAME

  • Search for .py files in current directory.

    $ lsg .py
    ----------Total number of entries----------> 1
    ----------Files----------------------------> 1
    setup.py
    
  • Search for .py files in lsg directory.

    $ lsg .py -p lsg
    ----------Total number of entries----------> 2
    ----------Files----------------------------> 2
    __init__.py
    main.py
    

Back to top

Full Documentation

For more help run lsg -h or lsg --help on terminal.

$ lsg -h
usage: lsg [-h] [--path PATH] FILENAME [FILENAME ...]

Check if a specific file or folder exists in current or in a specified
directory

positional arguments:
  FILENAME              name of file or folder to search

optional arguments:
  -h, --help            show this help message and exit
  --path PATH, -p PATH  path to search (default: current directory)

Any feature requests, bugs etc feel free to create an issue on Gitlab.

Read CHANGELOG, CODE OF CONDUCT, CONTRIBUTING guide.

License

MIT License

Copyright (c) 2019 Justine Thomas Kizhakkinedath

Back to top


forthebadge forthebadge forthebadge


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lsg-0.1.0.tar.gz (4.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page