https://github.com/thenatefisher/smlr Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + GitHub Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions By size + Enterprise + Teams + Startups By industry + Healthcare + Financial services + Manufacturing By use case + CI/CD & Automation + DevOps + DevSecOps * Resources Topics + AI + DevOps + Security + Software Development + View all Explore + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up Reseting focus You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} thenatefisher / smlr Public * Notifications You must be signed in to change notification settings * Fork 0 * Star 5 Makes your stdin smaller (a simple string abbreviation utility). License MIT license 5 stars 0 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 0 * Pull requests 0 * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Projects * Security * Insights thenatefisher/smlr This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master BranchesTags Go to file Code Folders and files Name Name Last commit Last commit message date Latest commit History 11 Commits googletest @ googletest @ 5e7fd50 5e7fd50 src src tests tests .clang-format .clang-format .gitignore .gitignore .gitmodules .gitmodules LICENSE LICENSE Makefile Makefile Readme.md Readme.md View all files Repository files navigation * README * MIT license smlr Truncates stdin to a maximum fixed size, abbreviating the output if over the specified length. For example, make a giant git branch name more manageable for use in PS1. Usage [source] | smlr [-s SIZE] [-a ALIGNMENT] * -s: Size of output. If equal or greater than input, input is relayed to s unchanged"). Default value is 5. * -a: Alignment of output. Can be either middle (if option is omitted), left or right. Default is middle alignment. Examples Bring your git branch down to a fixed-size: > git rev-parse --abbrev-ref HEAD | smlr -s 10 > feat...-13 Deal with too many letters. Sometimes there are too many: > echo "abcdefghijkl" | smlr -s 10 -a right > ...fghijkl > echo "abcdefghijkl" | smlr -s 10 -a left > abcdefg... A date string that's just too long: > date | smlr -s 10 > Thu ...017 Repeat the string if it turns out to be equal, or smaller than, the size given: > echo "abc" | smlr -s 5 > abc Installation MacOS Available via Macports: sudo port install smlr General Clone the repo and run a make to build it. If everything works out, you'll have a binary in build/rel/smlr. Symlink or copy that sucker to a path directory, such as /usr/bin. About Makes your stdin smaller (a simple string abbreviation utility). Topics utilities command-line unix-systems Resources Readme License MIT license Activity Stars 5 stars Watchers 3 watching Forks 0 forks Report repository Releases 3 tags Packages 0 No packages published Languages * C++ 50.3% * C 40.4% * Makefile 9.3% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.