Skip to content

Lateralus138/lolcat_bash_completion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lolcat Bash Completion

  1. About
    1. Description
      1. What Is Bash Completion
    2. Motivation
    3. File
      1. File Information
      2. Current lolcat Bash Completion File MD5
  2. Usage
    1. Obtaining
    2. Installation
    3. Use
  3. LICENSE
  4. Support Me If You Like

Twitter URL


About

Description

Under Construction This README is not finished, but the the script/release should work just fine.

Very basic Bash completion file for the program 'lolcat' found here (and other forks):

https://github.com/busyloop/lolcat

This simply provides a basic word list of the switches provided in the program; the script verbatim:

# Very basic Bash completion for 'lolcat'.
# Filenames can be implemented if ever a
# -P, --path, or --file switch is ever
# added to the program. There are ways
# this can be achieved without a switch
# but not always reliable.

lolcat_opts=(
  -h --help
  -p --spread
  -F --freq
  -S --seed
  -a --animate
  -d --duration
  -s --speed
  -f --force
  -v --version
)
complete -W "$(printf '%s\n' "${lolcat_opts[@]}")" lolcat
unset lolcat_opts

What Is Bash Completion

Bash completion allows one to list or auto-complete a program's options/switches by pressing the [Tab] key ([Tab][Tab]... to circulate through them).

Various web searches on "what is Bash Completion" (Google is blocked on anything I own, of course, you're free to do your own search):

Duck Duck Go: https://duckduckgo.com/?q=What+is+Bash+completion&ia=web

Ecosia (Bing): https://www.ecosia.org/search?method=index&q=what%20is%20Bash%20Completion

Bing: https://www.bing.com/search?q=What+is+Bash+Completion&ghsh=0&ghacc=0&ghpl

Motivation

Some (at least the APT/Debian version for all I know) versions of lolcat don't come with Bash Completion and I wanted it. Plain and simple.

File

File Information

COMPLETE FILE SIZE

Current lolcat Bash Completion File MD5

This information is generated in a GitHub Action immediately after the successful build of this project.

Linux MD5


Usage

Obtaining

You can either download it from the Releases page, the file itself directly from the source directory, or copy and paste it from the script displayed above into your own file (but it must be named 'lolcat').

Installation

Bash Completion files in Linux are located (from my experience) in the directory /usr/share/bash-completion/completions and as such this file must be placed there.

Since it is in a system directory it must be installed with root priveldges (assuming sudo isn't disabled (or for some reason? if a user is root)).

You can copy the file from wherever you downloaded it to either by using a file manager as root (not necessarily recommended) or from the command line (recommended):

sudo cp /path/to/the/downloaded/file /usr/share/bash-completion/completions

# more than likely:

sudo cp ~/Downloads/lolcat /usr/share/bash-completion/completions

# you can also download and install with curl (or wget or axel) (don't have to remove (rm), that's your preference):

curl -O "https://raw.githubusercontent.com/Lateralus138/lolcat_bash_completion/master/usr/share/bash-completion/completions/lolcat" &&
sudo cp lolcat  /usr/share/bash-completion/completions/lolcat &&
rm lolcat

Removal:

Simlply delete the completion file with a file manager as root (NOT recommended) or from the command line (recommended):

sudo rm /usr/share/bash-completion/completions/lolcat

and reload your shell.

Use

Bash Comletion is usually enabled for most Bash shells and as long as the completion file is in the correct directory it should load when you start a Bash shell. If you want to enable it directly after installation from the command line:

. /usr/share/bash-completion/completions/lolcat

# or

source /usr/share/bash-completion/completions/lolcat

Once loaded you can use the lolcat's completion the same way as any other with [Tab] as stated above.


License Info

License Excerpt
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Support Me If You Like

If you like this project and care to donate to my PayPal:

PayPal Donation

Or Buy Me A Coffee if your prefer:

Buy Me A Coffee

About

Very basic Bash completion for 'lolcat'.

Resources

License

Stars

Watchers

Forks

Packages

No packages published