warpdotdev / Warp

Warp is a modern, Rust-based terminal with AI built in so you and your team can build great software, faster.
https://warp.dev
Other
23.77k stars 472 forks source link

bash: -H: command not found #6213

Open bling-yshs opened 2 months ago

bling-yshs commented 2 months ago

Pre-submit Checks

Describe the bug

I copied an HTTP request as a cURL (bash) command from Chrome DevTools and pasted it into Warp's Git Bash.

curl 'https://docs.warp.dev/appearance/input-position?_rsc=1fkyr' \
  -H 'authority: docs.warp.dev' \
  -H 'accept: */*' \
  -H 'accept-language: zh-CN,zh;q=0.9,en;q=0.8' \
  -H 'cookie: _vwo_uuid_v2=DCBA0983B026A1738FE3A87D3427D4EFA|1f635b2cafabd56ee06b1ce4d4df6067; _vwo_uuid=DCBA0983B026A1738FE3A87D3427D4EFA; rl_anonymous_id=RS_ENC_v3_IjQ5MWMwMTZjLTEyYWYtNDFiMS05OGU5LTdjMjY3MGVmZjJhMyI%3D; rl_page_init_referrer=RS_ENC_v3_Imh0dHBzOi8vZG9jcy53YXJwLmRldi9nZXR0aW5nLXN0YXJ0ZWQvZ2V0dGluZy1zdGFydGVkLXdpdGgtd2FycCI%3D; rl_page_init_referring_domain=RS_ENC_v3_ImRvY3Mud2FycC5kZXYi; _vis_opt_s=2%7C; _vwo_ds=3%3Aa_0%2Ct_0%3A0%241743129236%3A98.18737981%3A%3A%3A%3A0; _gcl_au=1.1.939506131.1743129239; _ga=GA1.1.1988410272.1743129239; _rdt_uuid=1739500762249.74d062d5-d97a-41e0-af4d-0cd0c6a3066a; rl_session=RS_ENC_v3_eyJpZCI6MTc0MzEyOTIzODMzNSwiZXhwaXJlc0F0IjoxNzQzMTMxNjU4NDE2LCJ0aW1lb3V0IjoxODAwMDAwLCJhdXRvVHJhY2siOnRydWUsInNlc3Npb25TdGFydCI6ZmFsc2V9; _ga_5NBFZJQ82M=GS1.1.1743129239.1.1.1743130777.0.0.0' \
  -H 'next-router-prefetch: 1' \
  -H 'next-router-state-tree: %5B%22%22%2C%7B%22children%22%3A%5B%22middleware%22%2C%7B%22children%22%3A%5B%22(site)%22%2C%7B%22children%22%3A%5B%22(content)%22%2C%7B%22children%22%3A%5B%5B%22pathname%22%2C%22getting-started%2Fusing-warp-with-shells%22%2C%22oc%22%5D%2C%7B%22children%22%3A%5B%22__PAGE__%3F%7B%5C%22pathname%5C%22%3A%5B%5C%22getting-started%5C%22%2C%5C%22using-warp-with-shells%5C%22%5D%7D%22%2C%7B%7D%2C%22%2Fgetting-started%2Fusing-warp-with-shells%23using-warp-with-shells-on-windows%22%2C%22refresh%22%5D%7D%5D%7D%5D%7D%2Cnull%2Cnull%2Ctrue%5D%7D%5D%7D%5D' \
  -H 'next-url: /middleware/getting-started/using-warp-with-shells' \
  -H 'referer: https://docs.warp.dev/getting-started/using-warp-with-shells' \
  -H 'rsc: 1' \
  -H 'sec-ch-ua: "Not=A?Brand";v="99", "Chromium";v="118"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "Windows"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: same-origin' \
  -H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36' \
  --compressed

However, I got the following errors:

bash: -H: command not found  
bash: --compressed: command not found  

This command runs fine in other terminals.

To reproduce

Steps to Reproduce:

  1. Open Chrome DevTools (Press F12 or Ctrl + Shift + I).
  2. Go to the Network tab and capture an HTTP request.
  3. Right-click the request and select Copy > Copy as cURL (bash).
  4. Open Warp and launch Git Bash inside it.
  5. Paste the copied cURL command and press Enter.
  6. Observe the error messages:
    bash: -H: command not found  
    bash: --compressed: command not found  

Expected behavior

No response

Screenshots, videos, and logs

Image

Operating system (OS)

Windows

Operating system and version

win11

Shell Version

GNU bash, version 5.2.37(1)-release (x86_64-pc-msys)

Current Warp version

v0.2025.03.26.08.10.stable_02

Regression

No, this bug or issue has existed throughout my experience using Warp

Recent working Warp date

No response

Additional context

No response

Does this block you from using Warp daily?

No

Is this an issue only in Warp?

Yes, I confirmed that this only happens in Warp, not other terminals.

Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e

None

binbjz commented 2 months ago

✅ Works fine on my side

Please check if your environment is configured correctly.

curl 'https://docs.warp.dev/appearance/input-position?_rsc=1fkyr' \
  -H 'authority: docs.warp.dev' \
  -H 'accept: */*' \
  -H 'accept-language: zh-CN,zh;q=0.9,en;q=0.8' \
  -H 'cookie: _vwo_uuid_v2=DCBA0983B026A1738FE3A87D3427D4EFA|1f635b2cafabd56ee06b1ce4d4df6067; _vwo_uuid=DCBA0983B026A1738FE3A87D3427D4EFA; rl_anonymous_id=RS_ENC_v3_IjQ5MWMwMTZjLTEyYWYtNDFiMS05OGU5LTdjMjY3MGVmZjJhMyI%3D; rl_page_init_referrer=RS_ENC_v3_Imh0dHBzOi8vZG9jcy53YXJwLmRldi9nZXR0aW5nLXN0YXJ0ZWQvZ2V0dGluZy1zdGFydGVkLXdpdGgtd2FycCI%3D; rl_page_init_referring_domain=RS_ENC_v3_ImRvY3Mud2FycC5kZXYi; _vis_opt_s=2%7C; _vwo_ds=3%3Aa_0%2Ct_0%3A0%241743129236%3A98.18737981%3A%3A%3A%3A0; _gcl_au=1.1.939506131.1743129239; _ga=GA1.1.1988410272.1743129239; _rdt_uuid=1739500762249.74d062d5-d97a-41e0-af4d-0cd0c6a3066a; rl_session=RS_ENC_v3_eyJpZCI6MTc0MzEyOTIzODMzNSwiZXhwaXJlc0F0IjoxNzQzMTMxNjU4NDE2LCJ0aW1lb3V0IjoxODAwMDAwLCJhdXRvVHJhY2siOnRydWUsInNlc3Npb25TdGFydCI6ZmFsc2V9; _ga_5NBFZJQ82M=GS1.1.1743129239.1.1.1743130777.0.0.0' \
  -H 'next-router-prefetch: 1' \
  -H 'next-router-state-tree: %5B%22%22%2C%7B%22children%22%3A%5B%22middleware%22%2C%7B%22children%22%>   -H 'accept-language: zh-CN,zh;q=0.9,en;q=0.8' \
  -H 'cookie: _vwo_uuid_v2=DCBA0983B026A1738FE3A87D3427D4EFA|1f635b2cafabd56ee06b1ce4d4df6067; _vwo_uuid=DCBA0983B026A1738FE3A87D3427D4EFA; rl_anonymous_id=RS_ENC_v3_IjQ5MWMwMTZjLTEyYWYtNDFiMS05OGU5LTdjMjY3MGVmZjJhMyI%3D; rl_page_init_referrer=RS_ENC_v3_Imh0dHBzOi8vZG9jcy53YXJwLmRldi9nZXR0aW5nLXN0YXJ0ZWQvZ2V0dGluZy1zdGFydGVkLXdpdGgtd2FycCI%3D; rl_page_init_referring_domain=RS_ENC_v3_ImRvY3Mud2FycC5kZXYi; _vis_opt_s=2%7C; _vwo_ds=3%3Aa_0%2Ct_0%3A0%241743129236%3A98.18737981%3A%3A%3A%3A0; _gcl_au=1.1.939506131.1743129239; _ga=GA1.1.1988410272.1743129239; _rdt_uuid=1739500762249.74d062d5-d97a-41e0-af4d-0cd0c6a3066a; rl_session=RS_ENC_v3_eyJpZCI6MTc0MzEyOTIzODMzNSwiZXhwaXJlc0F0IjoxNzQzMTMxNjU4NDE2LCJ0aW1lb3V0IjoxODAwMDAwLCJhdXRvVHJhY2siOnRydWUsInNlc3Npb25TdGFydCI6ZmFsc2V9; _ga_5NBFZJQ82M=GS1.1.1743129239.1.1.1743130777.0.0.0' \
  -H 'next-router-prefetch: 1' \
  -H 'next-router-state-tree: %5B%22%22%2C%7B%22children%22%3A%5B%22middleware%22%2C%7B%22children%22%3A%5B%22(site)%22%2C%7B%22children%22%3A%5B%22(content)%22%2C%7B%22children%22%3A%5B%5B%22pathname%22%2C%22getting-started%2Fusing-warp-with-shells%22%2C%22oc%22%5D%2C%7B%22children%22%3A%5B%22__PAGE__%3F%7B%5C%22pathname%5C%22%3A%5B%5C%22getting-started%5C%22%2C%5C%22using-warp-with-shells%5C%22%5D%7D%22%2C%7B%7D%2C%22%2Fgetting-started%2Fusing-warp-with-shells%23using-warp-with-shells-on-windows%22%2C%22refresh%22%5D%7D%5D%7D%5D%7D%2Cnull%2Cnull%2Ctrue%5D%7D%5D%7D%5D' \
  -H 'next-url: /middleware/getting-started/using-warp-with-shells' \
  -H 'referer: https://docs.warp.dev/getting-started/using-warp-with-shells' \
  -H 'rsc: 1' \
  -H 'sec-ch-ua: "Not=A?Brand";v="99", "Chromium";v="118"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "Windows"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: same-origin' \
  -H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36' \
  --compressed

Output result:

1:I[55092,[],"default"]
3:I[82023,[],"default"]
2:["pathname","appearance/input-position","oc"]
0:["61-dz_3SGyaM929a0kDqg",[["children","middleware","children","(site)","children","(content)","children",["pathname","appearance/input-position","oc"],[["pathname","appearance/input-position","oc"],{"children":["__PAGE__?{\"pathname\":[\"appearance\",\"input-position\"]}",{}]}],[["pathname","appearance/input-position","oc"],{"children":null},[null,["$","$L1",null,{"parallelRouterKey":"children","segmentPath":["children","middleware","children","(site)","children","(content)","children","$2","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$L4","notFoundStyles":[["$","link","0",{"rel":"stylesheet","href":"https://static.gitbook.com/_next/static/css/e1c64f6ae2213816.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"https://static.gitbook.com/_next/static/css/89f0191abc1ad313.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","2",{"rel":"stylesheet","href":"https://static.gitbook.com/_next/static/css/442a0afb56948a32.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","3",{"rel":"stylesheet","href":"https://static.gitbook.com/_next/static/css/b322ae72ca7529fb.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","4",{"rel":"stylesheet","href":"https://static.gitbook.com/_next/static/css/d84ff5063c61c5c2.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","5",{"rel":"stylesheet","href":"https://static.gitbook.com/_next/static/css/ee3396defbfa8d21.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","6",{"rel":"stylesheet","href":"https://static.gitbook.com/_next/static/css/4af9aafd612346fe.css","precedence":"next","crossOrigin":"$undefined"}]]}]],[["$","div",null,{"className":"flex flex-row flex-1 relative py-8 lg:px-16 xl:mr-56 items-center lg:items-start","children":["$","div",null,{"className":"flex-1 max-w-3xl mx-auto page-full-width:mx-0","children":[["$","div",null,{"id":"$undefined","role":"status","aria-busy":true,"className":"mb-8","children":["$","div",null,{"className":"ring-1 ring-tint-subtle overflow-hidden relative grid rounded-md h-[47px] [max-width:calc(48rem-1px)]","children":["$","div",null,{"className":"w-full bg-tint grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]","children":["$","div",null,{"className":"aspect-square from-tint-solid to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)]"}]}]}]}],["$","div",null,{"id":"$undefined","role":"status","aria-busy":true,"className":"skeleton-paragraph","children":["$","div",null,{"className":"ring-1 ring-tint-subtle overflow-hidden relative grid rounded-md [height:calc(15rem-1px)] [max-width:calc(48rem-1px)] mb-4","children":["$","div",null,{"className":"w-full bg-tint grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_48px_48px]","children":["$","div",null,{"className":"aspect-square from-tint-solid to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)]"}]}]}]}]]}]}],[["$","link","0",{"rel":"stylesheet","href":"https://static.gitbook.com/_next/static/css/e1c64f6ae2213816.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"https://static.gitbook.com/_next/static/css/89f0191abc1ad313.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","2",{"rel":"stylesheet","href":"https://static.gitbook.com/_next/static/css/442a0afb56948a32.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","3",{"rel":"stylesheet","href":"https://static.gitbook.com/_next/static/css/b322ae72ca7529fb.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","4",{"rel":"stylesheet","href":"https://static.gitbook.com/_next/static/css/d84ff5063c61c5c2.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","5",{"rel":"stylesheet","href":"https://static.gitbook.com/_next/static/css/ee3396defbfa8d21.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","6",{"rel":"stylesheet","href":"https://static.gitbook.com/_next/static/css/4af9aafd612346fe.css","precedence":"next","crossOrigin":"$undefined"}]],[]]],["$L5",null]]]]
6:I[80942,["7842","static/chunks/7842-785434c6c9469d80.js","8452","static/chunks/8452-67e2363edee12bcd.js","7993","static/chunks/7993-8d8ddfe95fd100ea.js","8581","static/chunks/8581-a982d98f56c384e1.js","5890","static/chunks/5890-04b4600f719d7465.js","983","static/chunks/983-b8c447ba525bab23.js","2237","static/chunks/2237-1c7f968e2a6261b5.js","7160","static/chunks/7160-b22e8e1026cf2076.js","1590","static/chunks/1590-9632e074a0dfd545.js","813","static/chunks/app/middleware/(site)/(content)/%5B%5B...pathname%5D%5D/not-found-9063db22299cbd6b.js"],"SitePageNotFound"]
4:["$","$L6",null,{}]
5:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"name":"color-scheme","content":"dark light"}],["$","meta","2",{"charSet":"utf-8"}],["$","title","3",{"children":"Input Position | Warp documentation"}],["$","meta","4",{"name":"description","content":"Warp gives you the ability to configure the position of your input, which includes both the prompt and the command line."}],["$","meta","5",{"name":"generator","content":"GitBook (fa91eb7)"}],["$","meta","6",{"name":"robots","content":"index, follow"}],["$","link","7",{"rel":"canonical","href":"https://docs.warp.dev/appearance/input-position"}],["$","meta","8",{"property":"og:title","content":"Input Position | Warp documentation"}],["$","meta","9",{"property":"og:description","content":"Warp gives you the ability to configure the position of your input, which includes both the prompt and the command line."}],["$","meta","10",{"property":"og:image","content":"https://docs.warp.dev/~gitbook/image?url=https%3A%2F%2F2669883504-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Forganizations%252F-MbqIZLCtzerswjFm7mh%252Fsites%252Fsite_FKhQ8%252Fsocialpreview%252FaUFeOtx0ANG7Iy8t4QfI%252Fwarp-youtube-banner-preview.png%3Falt%3Dmedia%26token%3D38530b11-f2a7-40ad-9354-a0c36b87bc2e&width=1200&height=630&sign=23dcf7a1&sv=2"}],["$","meta","11",{"name":"twitter:card","content":"summary_large_image"}],["$","meta","12",{"name":"twitter:title","content":"Input Position | Warp documentation"}],["$","meta","13",{"name":"twitter:description","content":"Warp gives you the ability to configure the position of your input, which includes both the prompt and the command line."}],["$","meta","14",{"name":"twitter:image","content":"https://docs.warp.dev/~gitbook/image?url=https%3A%2F%2F2669883504-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Forganizations%252F-MbqIZLCtzerswjFm7mh%252Fsites%252Fsite_FKhQ8%252Fsocialpreview%252FaUFeOtx0ANG7Iy8t4QfI%252Fwarp-youtube-banner-preview.png%3Falt%3Dmedia%26token%3D38530b11-f2a7-40ad-9354-a0c36b87bc2e&width=1200&height=630&sign=23dcf7a1&sv=2"}],["$","link","15",{"rel":"icon","href":"https://docs.warp.dev/~gitbook/image?url=https%3A%2F%2F2669883504-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Forganizations%252F-MbqIZLCtzerswjFm7mh%252Fsites%252Fsite_FKhQ8%252Ficon%252FDVgdOr0D0RoJbNfnRMiy%252Fwarp-avatar-white-on-black.png%3Falt%3Dmedia%26token%3Dca5f848d-74bd-4b2e-9af3-574c62bb61b9&width=48&height=48&sign=d8de33a4&sv=2","type":"image/png","media":"(prefers-color-scheme: light)"}],["$","link","16",{"rel":"icon","href":"https://docs.warp.dev/~gitbook/image?url=https%3A%2F%2F2669883504-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Forganizations%252F-MbqIZLCtzerswjFm7mh%252Fsites%252Fsite_FKhQ8%252Ficon%252FDVgdOr0D0RoJbNfnRMiy%252Fwarp-avatar-white-on-black.png%3Falt%3Dmedia%26token%3Dca5f848d-74bd-4b2e-9af3-574c62bb61b9&width=48&height=48&sign=d8de33a4&sv=2","type":"image/png","media":"(prefers-color-scheme: dark)"}],["$","link","17",{"rel":"icon","href":"https://docs.warp.dev/~gitbook/image?url=https%3A%2F%2F2669883504-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Forganizations%252F-MbqIZLCtzerswjFm7mh%252Fsites%252Fsite_FKhQ8%252Ficon%252FDVgdOr0D0RoJbNfnRMiy%252Fwarp-avatar-white-on-black.png%3Falt%3Dmedia%26token%3Dca5f848d-74bd-4b2e-9af3-574c62bb61b9&width=48&height=48&sign=d8de33a4&sv=2","type":"image/png","media":"(prefers-color-scheme: light)"}],["$","link","18",{"rel":"icon","href":"https://docs.warp.dev/~gitbook/image?url=https%3A%2F%2F2669883504-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Forganizations%252F-MbqIZLCtzerswjFm7mh%252Fsites%252Fsite_FKhQ8%252Ficon%252FDVgdOr0D0RoJbNfnRMiy%252Fwarp-avatar-white-on-black.png%3Falt%3Dmedia%26token%3Dca5f848d-74bd-4b2e-9af3-574c62bb61b9&width=48&height=48&sign=d8de33a4&sv=2","type":"image/png","media":"(prefers-color-scheme: dark)"}],["$","meta","19",{"name":"next-size-adjust"}]]
bling-yshs commented 2 months ago

I think this issue should only occur on Git bash on Windows