You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
workbench.action.terminal.rename should accept name as an argument #82105
feature-requestRequest for new features or functionalitygood first issueIssues identified as good for first-time contributorshelp wantedIssues identified as good community contribution opportunitiesterminalGeneral terminal issues that don't fall under another label
Currently, workbench.action.terminal.rename command doesn't accept any argument. I wanted to make macros that renames current terminal after performing some other actions.
At the moment, it requires user prompt interaction.
Fortunatelly, it solves issues with providing some dynamic input at right time like passphrase (because I couldn't establish SSH without passphrase prompt, unluckily, so I have to use bad technique atm), running console program on remote computer after SSH login, REPL commands to 3DX MQL.
Thank you for advising fabiospampinato.vscode-terminals extension! I will try it tomorrow on the subject of having right delay between sequences (to replicate macros I've made).
publicstaticreadonlyLABEL=nls.localize('workbench.action.terminal.newWithCwd',"Create New Integrated Terminal Starting in a Custom Working Directory");
publicstaticreadonlyCWD_ARG_LABEL=nls.localize('workbench.action.terminal.newWithCwd.cwd',"The directory to start the terminal at");
@perceptron007 Sorry for late response. I made some changes to code, please review it and cover with some test if needed. I'm not ready to make pull request yet, so I derive it to you, guys.
Daniel Imms (@Tyriar)
Oh, didn't think about that. How do I deal with entry?: TerminalEntry though?
Made another commit for review that excludes possibly ambiguous argument entry.
Vint Prox (@vintprox) hmm, we may just need to make a new command just like newWithCwd I guess renameActiveTerminal? You're pretty close, you can put a PR out as it will be easier to give feedback there.
feature-requestRequest for new features or functionalitygood first issueIssues identified as good for first-time contributorshelp wantedIssues identified as good community contribution opportunitiesterminalGeneral terminal issues that don't fall under another label
Activity
vscodebot commentedon Oct 8, 2019
(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:
workbench.action.terminal.renamedoes not return focus to element that was focused when command was issued (#53294)Tyriar commentedon Oct 8, 2019
Have you considered using an extension like https://marketplace.visualstudio.com/items?itemName=fabiospampinato.vscode-terminals for this?
vintprox commentedon Oct 8, 2019
Daniel Imms (@Tyriar) no, I am using custom fork of
macros, which is addressed here. I needed some delays between sending terminal sequences, as provided in this example: geddski/macros#9 (comment)Fortunatelly, it solves issues with providing some dynamic input at right time like passphrase (because I couldn't establish SSH without passphrase prompt, unluckily, so I have to use bad technique atm), running console program on remote computer after SSH login, REPL commands to 3DX MQL.
Thank you for advising
fabiospampinato.vscode-terminalsextension! I will try it tomorrow on the subject of having right delay between sequences (to replicate macros I've made).vintprox commentedon Oct 8, 2019
I think I know how to make rename command have simple
titleargument, but it takes a time to contribute here, hehe.vijayksingh commentedon Oct 16, 2019
Vint Prox (@vintprox) Daniel Imms (@Tyriar) I would like to help you guys out, can you explain me a little bit, what changes exactly needs to be done.
Tyriar commentedon Oct 16, 2019
@perceptron007 right now the rename command is defined here:
vscode/src/vs/workbench/contrib/terminal/browser/terminalActions.ts
Lines 1039 to 1067 in 8a80677
I think we need to convert it into a
Commandto accept an arg like this one:vscode/src/vs/workbench/contrib/terminal/browser/terminalActions.ts
Lines 301 to 325 in 8a80677
Pass `title` argument to RenameTerminalAction
vintprox commentedon Oct 18, 2019
@perceptron007 Sorry for late response. I made some changes to code, please review it and cover with some test if needed. I'm not ready to make pull request yet, so I derive it to you, guys.
Tyriar commentedon Oct 18, 2019
Vint Prox (@vintprox) I would have thought you'd need to convert it to a
Command, does passing in the arg in a keybinding work there?We want this keybinding to be able to rename the terminal by executing it:
{ "key": "cmd+shift+h", "command": "workbench.action.terminal.rename", "args": { "title": "My term" } }Also you can get intellisense for
title, see theworkbench.action.terminal.newWithCwdcommand for how to do this:RenameTerminalCommand: intellisense for `title`
vintprox commentedon Oct 18, 2019
Daniel Imms (@Tyriar)
Oh, didn't think about that. How do I deal with
entry?: TerminalEntrythough?Made another commit for review that excludes possibly ambiguous argument
entry.Tyriar commentedon Oct 18, 2019
Vint Prox (@vintprox) hmm, we may just need to make a new command just like
newWithCwdI guessrenameActiveTerminal? You're pretty close, you can put a PR out as it will be easier to give feedback there.vintprox commentedon Oct 18, 2019
You are right! I completely forgot what pull requests are for here.
sksaifuddin commentedon Oct 30, 2019
Hello Vint Prox (@vintprox) did you create the PR ? is this issue resolved ?
vintprox commentedon Oct 30, 2019
Uh-oh, I'm kind of busy right now and cannot find a right time. You can make it, if you want to solve the issue!
pjvan commentedon Nov 10, 2019
Hey, if this issue is open I'd like to pick it up!
vintprox commentedon Nov 10, 2019
Of course, why not, proceed! @petevdp
You can look into my diffs for clues.
Merge pull request #84429 from petevdp/petevdp/add-terminal-rename-co…