Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cp2code from inside a bash #19

Closed
byman64 opened this issue Sep 6, 2022 · 1 comment
Closed

cp2code from inside a bash #19

byman64 opened this issue Sep 6, 2022 · 1 comment

Comments

@byman64
Copy link

byman64 commented Sep 6, 2022

Maybe it's not a real issue but let me explain.

I created a little bash to show your what I mean:
code test_cp2code.sh

`#!/bin/sh
ps -aux | cp2code

chmod +x
./test_cp2code.sh
line 2: cp2code: command not found
`
How I can use cp2code inside a bash script?

thx

@babakks
Copy link
Owner

babakks commented Sep 11, 2022

The commands of this extension (i.e., cp2code or tee2code) only work when you open a new integrated shell (i.e., within VS Code's "Terminal" panel).

Of course, you can still pipe streams from external shells, with this native VS Code CLI command:

ps -aux | code -r -

or if you're using the Insiders version:

ps -aux | code-insiders -r -

(-r or --resuse-window flag prevents opening new VS Code windows per command execution)

@babakks babakks closed this as completed Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants