Update bash.md

This commit is contained in:
Rico Sta. Cruz 2020-06-14 23:54:47 +10:00 committed by GitHub
parent ef9f00aa5c
commit d5683a9ddf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 10 deletions

View File

@ -564,6 +564,8 @@ History
### Operations ### Operations
| Code | Description |
| -------------------- | --------------------------------------------------------------------- |
| `!!` | Execute last command again | | `!!` | Execute last command again |
| `!!:s/<FROM>/<TO>/` | Replace first occurrence of `<FROM>` to `<TO>` in most recent command | | `!!:s/<FROM>/<TO>/` | Replace first occurrence of `<FROM>` to `<TO>` in most recent command |
| `!!:gs/<FROM>/<TO>/` | Replace all occurrences of `<FROM>` to `<TO>` in most recent command | | `!!:gs/<FROM>/<TO>/` | Replace all occurrences of `<FROM>` to `<TO>` in most recent command |
@ -574,6 +576,8 @@ History
### Slices ### Slices
| Code | Description |
| -------- | ---------------------------------------------------------------------------------------- |
| `!!:n` | Expand only `n`th token from most recent command (command is `0`; first argument is `1`) | | `!!:n` | Expand only `n`th token from most recent command (command is `0`; first argument is `1`) |
| `!^` | Expand first argument from most recent command | | `!^` | Expand first argument from most recent command |
| `!$` | Expand last token from most recent command | | `!$` | Expand last token from most recent command |