https://github.com/arshadkazmi42/squash
Squash your commands and give it a name :tada: :tada:
https://github.com/arshadkazmi42/squash
alias bash-comm cli commands linux mac name name-commands shell-command squash
Last synced: about 1 month ago
JSON representation
Squash your commands and give it a name :tada: :tada:
- Host: GitHub
- URL: https://github.com/arshadkazmi42/squash
- Owner: arshadkazmi42
- License: mit
- Created: 2018-12-23T13:56:54.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-10-16T10:31:42.000Z (over 2 years ago)
- Last Synced: 2025-04-09T16:01:31.298Z (about 1 month ago)
- Topics: alias, bash-comm, cli, commands, linux, mac, name, name-commands, shell-command, squash
- Language: JavaScript
- Homepage:
- Size: 18.4 MB
- Stars: 14
- Watchers: 4
- Forks: 7
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Squash :tada:
[](https://github.com/arshadkazmi42/squash/actions/workflows/nodejs.yml)
[](https://www.npmjs.com/package/ak-squash)
[](https://www.npmjs.com/package/ak-squash)
[](https://www.npmjs.com/package/ak-squash)
[](https://github.com/arshadkazmi42/squash/graphs/contributors)
[](https://github.com/arshadkazmi42/squash/commits/master)
[](https://github.com/arshadkazmi42/squash/)
Let's squash your commands.
Squash allows you to give a custom name to your shell commands. These commands can be run using the custom name.
> Give us a :star: if you like our work :heart:
## Install
```
$ npm i -g ak-squash
```## Setup
- **Export the squash path, to make the commands executable.**
`export PATH=$PATH:/usr/local/.squash`
To make this export permanent [read here](https://askubuntu.com/a/500794/579860)
- Now try running `squash --help`. This should display details on using squash
- This completes your setup## Usage
Once you are done with the setup. You can start giving custom names to your commands.
> You can find example usage of all the available features of squash [here](usage)
Syntax for using squash is
`squash {{COMMAND}} --alias={{NAME_FOR_COMMAND}}`
- **COMMAND**: The shell command which will be given a name
- **NAME_FOR_COMMAND**: The custom name**Note**: You can wrap the command between `"COMMAND"` if the command contains any types of quotes or spaces
#### Example
```
$ squash ls /home/squash --alias=list_squash
```Now for using above created command just run
```
$ list_squash
```## Available Flags
#### Flags that require parameters
```
squash {{COMMAND}} --{{FLAG}}={{NAME_FOR_COMMAND}}
```
- **alias**: to give name to a command
- **rm**: removes a previously squashed command
#### Flags without parameters
```
squash --{{FLAG}}
```
- **help**: gets help for squash
- **list**: lists all the created commands
- **system-alias**: lists all the system reserved aliases
- **pass-args**: arguments called on the alias will be passed to the command. Use when creating the alias## Limitations
- It does not work in Windows.
- It does not support the `cd` command
- **Manually exporting the path `/usr/local/.squash` is very important.**## Contributing
We are constantly working on improving squash and we need all the help we can get.
You can contribute to this project by giving [suggestions](https://github.com/arshadkazmi42/squash/issues/new), fixing open [issues](https://github.com/arshadkazmi42/squash/issues) or by implementing a new feature.
Read our contibution guide [here](CONTRIBUTING.md)