terminal

What does the semicolon do when it is run in a bash command?

不羁岁月 提交于 2020-04-05 05:01:55
问题 For example, when running echo a; echo b in the terminal, its output is: a b It seems to me that the semicolon waits for the first command ( echo a ) to finish, then it starts the second command ( echo b ). Q: Is the semicolon just used for iterating over commands in bash? Q: What does the semicolon do when it is run in a bash command? 回答1: The ; separates the two commands. echo a; echo b It lets the bash know that echo a and echo b are two separate commands and need to be run separately one

(master) at end of terminal prompt

本秂侑毒 提交于 2020-03-25 17:54:50
问题 I am just learning more with git and that type of thing and so I just used init with git. After doing this and doing a commit to a repository. I still have (master) at the end of my terminal prompt. I am using a linux ide. How can I back out of this and get back to a normal terminal prompt? 回答1: There is no problem that needs to be solved. The prompt is just saying that you are on the master branch. It is useful information. However if for aesthetic reasons you wish to restore the standard

Django Start project not working after install

时光怂恿深爱的人放手 提交于 2020-03-23 08:01:13
问题 The django project will not create. I keep getting this same error, please help. I am not sure what else can be done. 回答1: As suggested by @Flux in your comment, use django-admin to start your project. django-admin startproject winsdompets You can refer to this question to ensure your django-admin path is one of your environment variables. By the way, to avoid those environmental issues in Mac or other platform, you can try to use pipenv to manage your Django environment. The following are

How to update ENV variables in a Process without restarting it (NodeJS)?

老子叫甜甜 提交于 2020-03-23 01:15:32
问题 I have a server running on NodeJS. Is there a way to update the environment variables in the process without restarting the server? What I'm looking to do is: Start my server npm start type something into the console to update ENV variable Server restarts with new environment variable 回答1: If you make a change to env variables they will take place immediately only if you make the change via the main Properties dialog for the system which is going to my computer -> Advanced properties ->

How to update ENV variables in a Process without restarting it (NodeJS)?

白昼怎懂夜的黑 提交于 2020-03-23 01:15:25
问题 I have a server running on NodeJS. Is there a way to update the environment variables in the process without restarting the server? What I'm looking to do is: Start my server npm start type something into the console to update ENV variable Server restarts with new environment variable 回答1: If you make a change to env variables they will take place immediately only if you make the change via the main Properties dialog for the system which is going to my computer -> Advanced properties ->

How do I highlight text for copying and pasting in the VS Code terminal?

会有一股神秘感。 提交于 2020-03-22 09:06:46
问题 How do I create shortcuts to highlight Terminal text: Ctrl+Shift+Right/Left, Ctrl+Shift+End, Ctrl+Shift+Home - as it's implemented in PowerShell ISE? How do I create shortcuts to move cursor by words: Ctrl+Right/Left, similar to PowerShell ISE? 回答1: I'm adding a separate answer for users willing to install zsh. This is a partial solution that makes no assumptions: { "key": "ctrl+left", "command": "workbench.action.terminal.sendSequence", "args": { "text": "\u001bb" }, "when": "terminalFocus"

How do I highlight text for copying and pasting in the VS Code terminal?

半城伤御伤魂 提交于 2020-03-22 09:06:43
问题 How do I create shortcuts to highlight Terminal text: Ctrl+Shift+Right/Left, Ctrl+Shift+End, Ctrl+Shift+Home - as it's implemented in PowerShell ISE? How do I create shortcuts to move cursor by words: Ctrl+Right/Left, similar to PowerShell ISE? 回答1: I'm adding a separate answer for users willing to install zsh. This is a partial solution that makes no assumptions: { "key": "ctrl+left", "command": "workbench.action.terminal.sendSequence", "args": { "text": "\u001bb" }, "when": "terminalFocus"

Python & macOS: open new Terminal window from Python, passing command to be executed

。_饼干妹妹 提交于 2020-03-21 20:46:10
问题 I am using the following two lines of Python code to open a new Terminal window from a Python script, and this works fine: import os os.system('open -a Terminal .') Now I would like to pass the new Terminal window a command to be executed, for example ls How can I do that? 回答1: Try this import appscript appscript.app('Terminal').do_script('ls') # or any other command you choose 来源: https://stackoverflow.com/questions/48408278/python-macos-open-new-terminal-window-from-python-passing-command

Python & macOS: open new Terminal window from Python, passing command to be executed

戏子无情 提交于 2020-03-21 20:45:08
问题 I am using the following two lines of Python code to open a new Terminal window from a Python script, and this works fine: import os os.system('open -a Terminal .') Now I would like to pass the new Terminal window a command to be executed, for example ls How can I do that? 回答1: Try this import appscript appscript.app('Terminal').do_script('ls') # or any other command you choose 来源: https://stackoverflow.com/questions/48408278/python-macos-open-new-terminal-window-from-python-passing-command

Homebrew installation on Mac OS X Failed to connect to raw.githubusercontent.com port 443

≡放荡痞女 提交于 2020-03-17 06:00:11
问题 When I try to install Homebrew, I am getting following connection refused error. Please help me to solve this problem. $ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused 回答1: Works for me. Unless its a real problem with github, which it may be but I'm going to guess that its not, its probably a problem with your connection. Can you get to the same URL via a browser?