40
submitted 2 days ago by thingsiplay@lemmy.ml to c/linux@lemmy.ml

It can't hurt to share some of you current helpers. Either someone else might get inspired by or in some cases you get suggestions how to make it better. Bash, Zsh, Fish or whatever shell script, command or alias (or abbreviation) you have, share here. Always fun to do so! I share mine in the comments, just like everybody else.

you are viewing a single comment's thread
view the rest of the comments
[-] thingsiplay@lemmy.ml 13 points 2 days ago

I stopped using search tools with file indexing, and needed an alternative. The classic find command does a decent job and it has lot of options. But the regular usage is always a little bit awkward to me. So an alias is needed. However I like the abbreviations from Fish more, and installed zsh-abbr for Zsh for two reasons: a) I can edit the line before executing the abbr command, unlike with aliases or scripts, as it expands on typing, b) I can specify where the cursor lands after expansion.

abbr "search"="find . -type d,f,l -iname '*#*'"

The # symbol is where the cursor lands and is used as search term. This command will simply search the current working directory. search expands to find . -type d,f,l -iname '**' .

The zsh-abbr plugin: https://zsh-abbr.olets.dev/ and my settings for it:

# zsh-abbr settings
export ABBR_SET_EXPANSION_CURSOR=1
export ABBR_EXPANSION_CURSOR_MARKER='#'
export ABBR_EXPERIMENTAL_COMMAND_POSITION_REGULAR_ABBREVIATIONS=2

Thanks fot the # "trick", I've totally missed it

[-] thingsiplay@lemmy.ml 3 points 1 day ago

Your welcome. Note that the # is my personal configuration. The default character for this is different. This functionality is disabled by default too. So make sure to set the options.

Thank you! So kind of you to point this out ❤️

this post was submitted on 02 Dec 2026
40 points (97.6% liked)

Linux

69006 readers
446 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 7 years ago
MODERATORS