mirror of
https://github.com/m-lamonaca/dev-notes.git
synced 2025-06-07 10:17:12 +00:00
Compare commits
4 commits
1c76c76cb3
...
e40427a9fc
Author | SHA1 | Date | |
---|---|---|---|
e40427a9fc | |||
|
548d21b3a6 | ||
5bf918689d | |||
540e50900d |
5 changed files with 84 additions and 9 deletions
2
.github/workflows/docs.yml
vendored
2
.github/workflows/docs.yml
vendored
|
@ -12,7 +12,7 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v5
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
version: "latest"
|
||||
enable-cache: true
|
||||
|
|
|
@ -102,7 +102,10 @@ The *subexpression* is any valid regular expression pattern. The noncapturing gr
|
|||
(?= subexpression)
|
||||
```
|
||||
|
||||
The *subexpression* is any regular expression pattern. For a match to be successful, the input string must match the regular expression pattern in subexpression, although the matched substring is not included in the match result. A zero-width positive lookahead assertion does not backtrack.
|
||||
The *subexpression* is any regular expression pattern. For a match to be successful, `subexpression` *must occur* in the input string to the **right** of the current position.
|
||||
|
||||
> **Note**: `subexpression` is not included in the match result.
|
||||
> **Note**: A zero-width positive lookahead assertion does not backtrack.
|
||||
|
||||
Typically, a zero-width positive lookahead assertion is found at the end of a regular expression pattern. It defines a substring that must be found at the end of a string for a match to occur but that should not be included in the match. It is also useful for preventing excessive backtracking.
|
||||
|
||||
|
@ -114,7 +117,10 @@ It's possible to use a zero-width positive lookahead assertion to ensure that a
|
|||
(?! subexpression)
|
||||
```
|
||||
|
||||
The *subexpression* is any regular expression pattern. For the match to be successful, the input string must not match the regular expression pattern in subexpression, although the matched string is not included in the match result.
|
||||
The *subexpression* is any regular expression pattern. For a match to be successful, `subexpression` *must not occur* in the input string to the **right** of the current position.
|
||||
|
||||
> **Note**: `subexpression` is not included in the match result.
|
||||
> **Note**: A zero-width negative lookahead assertion does not backtrack.
|
||||
|
||||
A zero-width negative lookahead assertion is typically used either at the beginning or at the end of a regular expression. At the beginning of a regular expression, it can define a specific pattern that should not be matched when the beginning of the regular expression defines a similar but more general pattern to be matched. In this case, it is often used to limit backtracking. At the end of a regular expression, it can define a subexpression that cannot occur at the end of a match.
|
||||
|
||||
|
@ -124,7 +130,10 @@ A zero-width negative lookahead assertion is typically used either at the beginn
|
|||
(?<= subexpression)
|
||||
```
|
||||
|
||||
The *subexpression* is any regular expression pattern. For a match to be successful, subexpression must occur at the input string to the left of the current position, although subexpression is not included in the match result. A zero-width positive lookbehind assertion does not backtrack.
|
||||
The *subexpression* is any regular expression pattern. For a match to be successful, `subexpression` *must occur* in the input string to the **left** of the current position.
|
||||
|
||||
> **Note**: `subexpression` is not included in the match result.
|
||||
> **Note**:A zero-width positive lookbehind assertion does not backtrack.
|
||||
|
||||
Zero-width positive lookbehind assertions are typically used at the beginning of regular expressions. The pattern that they define is a precondition for a match, although it is not a part of the match result.
|
||||
|
||||
|
@ -132,17 +141,19 @@ Zero-width positive lookbehind assertions are typically used at the beginning of
|
|||
|
||||
```regex title="Regex Syntax"
|
||||
(?<! subexpression)
|
||||
(?> subexpression)
|
||||
```
|
||||
|
||||
Hte *subexpression* is any regular expression pattern. For a match to be successful, subexpression must not occur at the input string to the left of the current position. However, any substring that does not match subexpression is not included in the match result.
|
||||
The *subexpression* is any regular expression pattern. For a match to be successful, `subexpression` *must not occur* in the input string to the **left** of the current position.
|
||||
|
||||
> **Note**: `subexpression` is not included in the match result.
|
||||
> **Note**: A zero-width negative lookbehind assertion does not backtrack.
|
||||
|
||||
Zero-width negative lookbehind assertions are typically used at the beginning of regular expressions. The pattern that they define precludes a match in the string that follows. They are also used to limit backtracking when the last character or characters in a captured group must not be one or more of the characters that match that group's regular expression pattern.
|
||||
|
||||
### Atomic groups
|
||||
|
||||
```regex title="Regex Syntax"
|
||||
(?> subexpression )
|
||||
(?> subexpression)
|
||||
```
|
||||
|
||||
The *subexpression* is any regular expression pattern.
|
||||
|
|
|
@ -170,7 +170,7 @@ It's generally recommended creating annotated tags so it's possible to have all
|
|||
|
||||
### Branching And Merging
|
||||
|
||||

|
||||

|
||||
|
||||
`git branch`: shows branches
|
||||
`git branch -vv`: show branch + last commit + remote status
|
62
docs/misc/vcs/jj.md
Normal file
62
docs/misc/vcs/jj.md
Normal file
|
@ -0,0 +1,62 @@
|
|||
# Jujustsu (`jj`)
|
||||
|
||||
## Common Commands
|
||||
|
||||
### Status & Log
|
||||
|
||||
`jj status`: show current status of the working copy
|
||||
`jj log -r|--revisions <revset>`: show commits of a given revset
|
||||
`jj log -r|--revisions ::@`: show all ancestors of the working copy
|
||||
|
||||
### Showing Changes
|
||||
|
||||
`jj show [<revset>]`: show changes in `<revset>`, compared to its parents
|
||||
`jj diff [-f|--from <revset>] [-t|--to <revset>]`: compare file contents between revisions
|
||||
|
||||
### Describing & Creating Commits
|
||||
|
||||
`jj describe -m|--message <message> <revset>`: add a description to the working copy
|
||||
`jj new <revset> -m|--message <message>`: create a new commit after `<revset>` with the given description
|
||||
`jj commit -m|--message <message>`: create and describe a new commit in a single command
|
||||
|
||||
### Deleting Commits
|
||||
|
||||
`jj abandon <revset>`: delete the revision `<revset>`
|
||||
|
||||
### Merging Commits
|
||||
|
||||
`jj new <revset-1> <revset-2> ...`: create a new commit after listed parents
|
||||
|
||||
### Rebasing Commits
|
||||
|
||||
`jj rebase --source <source> --destination <destination>`: rebase `<source>` and descendants onto `<destination>`
|
||||
`jj rebase --source <source> --insert-after|--after <destination>`: insert `<source>` and descendants after `<destination>`
|
||||
`jj rebase --source <source> --insert--before|--before <destination>`: insert `<source>` and descendants before `<destination>`
|
||||
|
||||
### Squashing & Splitting Commits
|
||||
|
||||
`jj squash [-i|--interactive]`: move changes from current revision (`@`) into its parent
|
||||
`jj squash -f|--from <source> --t|--to|--into <destination>`: move changes from `<source>` into `<destination>`
|
||||
|
||||
`jj split [-i|--interactive]`: split a revision in two
|
||||
|
||||
### Signing Commits
|
||||
|
||||
`jj sign --key <signing-key> -r|--revisions <revset>`: cryptographically sign a revision
|
||||
|
||||
### Managing Bookmarks
|
||||
|
||||
`jj bookmark set <bookmark> -r|--revision|--to <revset>`: create or update a bookmark to point to a certain commit
|
||||
`jj bookmark move <bookmark> -r|--revision|--to <revset> [--allow-backwards]`: move bookmark `<bookmark>` to point to `<revset>`
|
||||
`jj bookmark create <bookmark> -r|--revision|--to <revset>`: create `<bookmark>` pointing to `<revset>`
|
||||
|
||||
## Git Commands
|
||||
|
||||
`jj git init --colocate`: init a colocated jj/git repository
|
||||
`jj git fetch`: fetch changes from the remote git repository
|
||||
`jj git push`: push changes to git
|
||||
|
||||
## Operations
|
||||
|
||||
`jj undo [<operation>]`: undo an operation
|
||||
`jj operation log`: show list of operations taken
|
|
@ -184,7 +184,9 @@ nav:
|
|||
- Scripting: languages/bash/scripting.md
|
||||
- Commands: languages/bash/commands.md
|
||||
- Misc:
|
||||
- Git: misc/git.md
|
||||
- VCS:
|
||||
- Git: misc/vcs/git.md
|
||||
- JJ: misc/vcs/jj.md
|
||||
- GraphQL: misc/graph-ql.md
|
||||
- RegEx: misc/regular-expressions.md
|
||||
- SSH: misc/ssh.md
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue