git-bash

How to run jq from gitbash in windows?

半世苍凉 提交于 2020-12-24 08:02:33
问题 I have gitbash in Windows. I am trying to run jq but its giving me error. $ ./jq-win64.exe jq parse error: Invalid numeric literal at line 2, column 0 Intention : I want to use jq to parse json. 回答1: Using jq-win64.exe from github.com/stedolan/jq/releases, I get vonc@voncav MINGW64 /d/prgs/dl $ ./jq-win64.exe --version jq-1.6 vonc@voncav MINGW64 /d/prgs/dl $ echo '{"foo": 0}' | ./jq-win64.exe . { "foo": 0 } So it does work, but it then depends on the json document you are parsing with it. If

How to run jq from gitbash in windows?

久未见 提交于 2020-12-24 08:01:04
问题 I have gitbash in Windows. I am trying to run jq but its giving me error. $ ./jq-win64.exe jq parse error: Invalid numeric literal at line 2, column 0 Intention : I want to use jq to parse json. 回答1: Using jq-win64.exe from github.com/stedolan/jq/releases, I get vonc@voncav MINGW64 /d/prgs/dl $ ./jq-win64.exe --version jq-1.6 vonc@voncav MINGW64 /d/prgs/dl $ echo '{"foo": 0}' | ./jq-win64.exe . { "foo": 0 } So it does work, but it then depends on the json document you are parsing with it. If

Key mappings in a Visual Studio Code git-bash terminal

微笑、不失礼 提交于 2020-12-15 01:52:50
问题 I'm using a git-bash terminal in Visual Studio Code. In a normal git-bash terminal outside Visual Studio code, (Ctrl+k) will clear to end of line. However when I do this in a Visual Studio Code git-bash terminal I get message "Waiting for second key of chord". How can I change behavior to be same as a standard git-bash terminal? Thanks. 回答1: I found it right after posting! Just needed to disable Terminal > Integrated : Allow Chords in the Settings. I didn't see this before & didn't know such

Key mappings in a Visual Studio Code git-bash terminal

余生颓废 提交于 2020-12-15 01:48:50
问题 I'm using a git-bash terminal in Visual Studio Code. In a normal git-bash terminal outside Visual Studio code, (Ctrl+k) will clear to end of line. However when I do this in a Visual Studio Code git-bash terminal I get message "Waiting for second key of chord". How can I change behavior to be same as a standard git-bash terminal? Thanks. 回答1: I found it right after posting! Just needed to disable Terminal > Integrated : Allow Chords in the Settings. I didn't see this before & didn't know such

Key mappings in a Visual Studio Code git-bash terminal

邮差的信 提交于 2020-12-15 01:48:09
问题 I'm using a git-bash terminal in Visual Studio Code. In a normal git-bash terminal outside Visual Studio code, (Ctrl+k) will clear to end of line. However when I do this in a Visual Studio Code git-bash terminal I get message "Waiting for second key of chord". How can I change behavior to be same as a standard git-bash terminal? Thanks. 回答1: I found it right after posting! Just needed to disable Terminal > Integrated : Allow Chords in the Settings. I didn't see this before & didn't know such

Key mappings in a Visual Studio Code git-bash terminal

大憨熊 提交于 2020-12-15 01:47:05
问题 I'm using a git-bash terminal in Visual Studio Code. In a normal git-bash terminal outside Visual Studio code, (Ctrl+k) will clear to end of line. However when I do this in a Visual Studio Code git-bash terminal I get message "Waiting for second key of chord". How can I change behavior to be same as a standard git-bash terminal? Thanks. 回答1: I found it right after posting! Just needed to disable Terminal > Integrated : Allow Chords in the Settings. I didn't see this before & didn't know such

'NODE_OPTIONS' is not recognized as an internal or external command

我的梦境 提交于 2020-12-02 07:07:54
问题 I'm on a windows 10 machine trying to run a build script from the git bash terminal. On my terminal node is recognized just fine, for example I get the version when I run node --version . But running the build script fails with the following error: 'NODE_OPTIONS' is not recognized as an internal or external command, operable program or batch file. I'm guessing I need to add something to my PATH variables to get this to work, but what? 回答1: Use cross-env package which easily sets environment

'NODE_OPTIONS' is not recognized as an internal or external command

故事扮演 提交于 2020-12-02 07:06:25
问题 I'm on a windows 10 machine trying to run a build script from the git bash terminal. On my terminal node is recognized just fine, for example I get the version when I run node --version . But running the build script fails with the following error: 'NODE_OPTIONS' is not recognized as an internal or external command, operable program or batch file. I'm guessing I need to add something to my PATH variables to get this to work, but what? 回答1: Use cross-env package which easily sets environment

'NODE_OPTIONS' is not recognized as an internal or external command

一个人想着一个人 提交于 2020-12-02 07:04:14
问题 I'm on a windows 10 machine trying to run a build script from the git bash terminal. On my terminal node is recognized just fine, for example I get the version when I run node --version . But running the build script fails with the following error: 'NODE_OPTIONS' is not recognized as an internal or external command, operable program or batch file. I'm guessing I need to add something to my PATH variables to get this to work, but what? 回答1: Use cross-env package which easily sets environment

How to Shorten Git Bash Prompt (Windows)

寵の児 提交于 2020-11-27 11:52:20
问题 How do I shorten my git bash prompt from something like this Malik@LAPTOP-7R9912OI MINGW64 ~/Desktop/test $ to something like this Malik@test$ I am using git bash on windows with git version 2.21.0 (26-02-2019) 回答1: In Git Bash: cd ~ notepad .bashrc In notepad, add the line PS1="foobar>" (replace foobar> with whatever text you want) After saving ~/.bashrc , in Git Bash, run the command: source ~/.bashrc You may find this online .bashrc generator useful to experiment with to find a prompt you