Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
d3112d67
Unverified
Commit
d3112d67
authored
Oct 18, 2023
by
Vyacheslav Scherbinin
Committed by
GitHub
Oct 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(vscode): allow arguments to `vsc` alias (#11903)
Co-authored-by:
Carlo Sala
<
carlosalag@protonmail.com
>
parent
96c97663
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
README.md
plugins/vscode/README.md
+1
-0
vscode.plugin.zsh
plugins/vscode/vscode.plugin.zsh
+8
-1
No files found.
plugins/vscode/README.md
View file @
d3112d67
...
@@ -53,6 +53,7 @@ source $ZSH/oh-my-zsh.sh
...
@@ -53,6 +53,7 @@ source $ZSH/oh-my-zsh.sh
| Alias | Command | Description |
| Alias | Command | Description |
| ----------------------- | ------------------------------ | ----------------------------------------------------------------------------------------------------------- |
| ----------------------- | ------------------------------ | ----------------------------------------------------------------------------------------------------------- |
| vsc | code . | Open the current folder in VS code |
| vsc | code . | Open the current folder in VS code |
| vsc
`dir`
| code
`dir`
| Open passed folder in VS code |
| vsca
`dir`
| code --add
`dir`
| Add folder(s) to the last active window |
| vsca
`dir`
| code --add
`dir`
| Add folder(s) to the last active window |
| vscd
`file`
`file`
| code --diff
`file`
`file`
| Compare two files with each other. |
| vscd
`file`
`file`
| code --diff
`file`
`file`
| Compare two files with each other. |
| vscg
`file:line[:char]`
| code --goto
`file:line[:char]`
| Open a file at the path on the specified line and character position. |
| vscg
`file:line[:char]`
| code --goto
`file:line[:char]`
| Open a file at the path on the specified line and character position. |
...
...
plugins/vscode/vscode.plugin.zsh
View file @
d3112d67
...
@@ -23,7 +23,14 @@ if [[ -z "$VSCODE" ]]; then
...
@@ -23,7 +23,14 @@ if [[ -z "$VSCODE" ]]; then
fi
fi
fi
fi
alias
vsc
=
"
$VSCODE
."
function
vsc
{
if
((
$#
))
;
then
$VSCODE
$@
else
$VSCODE
.
fi
}
alias
vsca
=
"
$VSCODE
--add"
alias
vsca
=
"
$VSCODE
--add"
alias
vscd
=
"
$VSCODE
--diff"
alias
vscd
=
"
$VSCODE
--diff"
alias
vscg
=
"
$VSCODE
--goto"
alias
vscg
=
"
$VSCODE
--goto"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment