Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added shell aliases patch for v12 #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ devour CMD ...

```sh
cd devour
patch -s < devour-shellalias-10.0.diff # Add the feature
patch -s -R < devour-shellalias-10.0.diff # Remove the feature
patch -s < devour-shellalias-12.diff # Add the feature
patch -s -R < devour-shellalias-12.diff # Remove the feature
sudo make install # Reinstall
```

Use `devour-shellalias-10.0.diff` for previous versions of `devour`.

## Pro Tip

**Devour from your file explorer instead of the shell.**
Expand Down
17 changes: 17 additions & 0 deletions devour-shellalias-12.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
--- devour.c 2020-11-10 11:18:04.550682287 +0200s
@@ -14,6 +14,7 @@
char *arg;
char cmd[1024] = {0};

+ strcat(cmd, "$SHELL -i -c '");
while ((arg = *++argv)) {
while ((arg_char = *arg++)) {
if (strchr(UNSAFE_CHARS, arg_char))
@@ -22,6 +23,7 @@
}
strcat(cmd, " ");
}
+ strcat(cmd, "> /dev/null 2>&1; exit'");
system(cmd);
}