I am currently looking for a way to easily store and run commands, usually syncing files between two deeply nested directories whenever I want.

So far I found these projects:

Other solutions:

  • Bash history using ^+r
  • Bash aliases
  • Bash functions

What do you guys use?

3 points

Fish shell. Out of the box it autocompletes taking into account in which directory you are. It’s like bash Ctrl+r but without actually invoking it before. Really ergonomic.

permalink
report
reply
14 points

aliases in .bashrc

permalink
report
reply
2 points

I have a file in my ~ called .alias and it is sourced by any shell I might use (currently just zsh) in it are common aliases like s => sudo and “sudo” => "sudo " (just put this as an alias if you use them a lot, you’ll thank me when you’re trying to use them with sudo)

permalink
report
reply
1 point

I vi as the command line editor, so fetching history commands is quick:

ESC /searchstring

But if it’s something really frequent or may benefit from parameters, I usually throw a perl or bash script in /usr/local/bin.

permalink
report
parent
reply
1 point

I use vi as the command line editor, so fetching history commands is quick:

ESC /searchstring

But if it’s something really frequent or may benefit from parameters, I usually throw a perl or bash script in /usr/local/bin.

permalink
report
reply
7 points

If you use fish you can use abbreviations

permalink
report
reply

Linux

!linux@lemmy.ml

Create post

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

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

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

Community stats

  • 9.6K

    Monthly active users

  • 5.8K

    Posts

  • 162K

    Comments