Skip to content

Commit

Permalink
Release after some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
editicalu committed May 5, 2021
1 parent 67a37ca commit e70cbbf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
8 changes: 3 additions & 5 deletions $.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
#!/bin/bash
VERSION=1
#!/bin/sh
VERSION=2

if [[ $@ < 2 ]]
then
echo "$ version ${VERSION}"
echo ""
echo "Usage: $ COMMAND [ARGS..]"
else
command=$1
shift
$command $*
exec "$@"
fi
3 changes: 2 additions & 1 deletion PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Maintainer: Ward Segers <w@rdsegers.be>

pkgname=dollar
pkgver=1
pkgver=2
pkgrel=1
pkgdesc="Omit the $ from commands"
arch=('any')
Expand All @@ -11,4 +11,5 @@ conflicts=('dollar-sign')

package() {
install -Dm755 "../$.sh" "$pkgdir/usr/bin/$"
install -Dm644 "../LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# $

A lot of tutorial websites use `$` to indicate that a line of code should be executed at the terminal. However, the lazy folks just copy the whole line, only to be greeted with `$: command not found`.
A lot of tutorial websites use `$` to indicate that a line of code should be executed at the terminal as a normal user. However, the lazy folks just copy the whole line, only to be greeted with `$: command not found`. While you could just delete the dollar symbol and run the command again, that's sooooo inefficient.

This script is a simple hack to allow this dollar to be ignored.
This script is a simple hack to ignore the dollar symbol and run the rest of the command as usual.

# Installation

Expand All @@ -15,14 +15,13 @@ Use the included PKGBUILD or install [`dollar`](https://aur.archlinux.org/packag
To install, run the following command:

```bash
# Or /sbin or /usr/bin
cp \$.sh /bin/\$
cp \$.sh /usr/bin/\$
```

To uninstall the program:

```bash
rm `whereis \$`
rm /usr/bin/\$
```

Both command might require root access.
Expand Down

0 comments on commit e70cbbf

Please sign in to comment.