A better alias for `ls | grep`
Project description
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.
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
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 inlsg
directory.$ lsg .py -p lsg ----------Total number of entries----------> 2 ----------Files----------------------------> 2 __init__.py main.py
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
Copyright (c) 2019 Justine Thomas Kizhakkinedath
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file lsg-0.1.0.tar.gz
.
File metadata
- Download URL: lsg-0.1.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.5.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29947134052fc682dbd55358a071bc76e85f1acd5b7d6f95740678c2eebedabf |
|
MD5 | bc8712bd1c262c4649449cccf87f4790 |
|
BLAKE2b-256 | 86911359a2e48e17e74b06e74e3ef4709cc1b2d6ddb649afbc3f9063bddcf6da |