Created
June 25, 2022 01:40
-
-
Save zdyxry/4faa8e3658a1454f04619a103dd24b78 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function rcode() { | |
local target_path="$1" | |
VSCODE_SERVER_PATH="${HOME}/.vscode-server" | |
VSCODE_SERVER_BIN_PATH="${VSCODE_SERVER_PATH}/bin" | |
VSCODE_SERVER_BIN_CURRENT_PATH="${VSCODE_SERVER_BIN_PATH}/$(ls -t ${VSCODE_SERVER_BIN_PATH} | head -n 1)" | |
VSCODE_IPC_HOOK_CLI=$(ss -l |grep vscode-ipc |tail -n 1 | awk '{print $5}') | |
VSCODE_IPC_HOOK_CLI=$VSCODE_IPC_HOOK_CLI ${VSCODE_SERVER_BIN_CURRENT_PATH}/bin/remote-cli/code ${target_path} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment