Unverified Commit d3112d67 authored by Vyacheslav Scherbinin's avatar Vyacheslav Scherbinin Committed by GitHub

feat(vscode): allow arguments to `vsc` alias (#11903)

parent 96c97663
......@@ -53,6 +53,7 @@ source $ZSH/oh-my-zsh.sh
| Alias | Command | Description |
| ----------------------- | ------------------------------ | ----------------------------------------------------------------------------------------------------------- |
| 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 |
| 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. |
......
......@@ -23,7 +23,14 @@ if [[ -z "$VSCODE" ]]; then
fi
fi
alias vsc="$VSCODE ."
function vsc {
if (( $# )); then
$VSCODE $@
else
$VSCODE .
fi
}
alias vsca="$VSCODE --add"
alias vscd="$VSCODE --diff"
alias vscg="$VSCODE --goto"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment