Comments (9)
Hmm, I have a program that I created where I paste into prompt-sync almost
daily, so i know it works fine in at least one configuration. Can you add
some detail?
from prompt-sync.
Mac OS X, tmux, iTerm2 (v3), node v4.4.5 and this code:
'use strict'
const prompt = require('prompt-sync')()
const n = prompt('Hello? ')
console.log(n)
from prompt-sync.
yah I'm able to reproduce - OS x, iterm 3 (not using tmux), node 6
from prompt-sync.
this could be tricky - the awesome thing about prompt-sync is no native dependencies, not sure how we fix this without using native deps
from prompt-sync.
I mean - sure you we can tap into pbcopy/pbpaste, xclip etc., and we can detect cmd+v / ctrl + v but not sure how we cover right click & paste (or edit menu -> paste) etc.
from prompt-sync.
Still confused, my pxx program works perfectly, I paste into it every day,
it's worked for over a year, different versions of node and iTerm, are we
talking about different things?
from prompt-sync.
I take that back, pxx isn't using prompt-sync... Hmm, not sure what I'm
using prompt-sync for any more ;)
from prompt-sync.
@davidmarkclements ok, so i just cloned and took a quick look. i copied some text and tried to paste it. What happens is that i get a single character of the text that i copied. For instance if i copy FOO
, it only pastes O
. I think this just needs to detect the paste key combination and then insert that value into the buffer.
from prompt-sync.
ok just looked into real quick and it's totally fixable - it's because we assume one character per stdin buffer - all we have to do is analyse the buffer a little more and do the right thing (it currently already detects a 3 char input for control characters, we just do something similar for paste)
from prompt-sync.
Related Issues (20)
- ANSI escape codes breaks cursor
- UTF8 emoji space issue HOT 1
- Sample code fails if used within a class method, presumably because 'prompt' is a reserved word HOT 2
- Will not work in Bash command when information piped in HOT 1
- Wrong cursor position with history and colored label
- How do I get it to run on codesandbox.io?
- Unable to input non-English letters on Windows HOT 6
- Every time I type a letter, the line repeats itself HOT 11
- ENXIO: no such device or address, open '/dev/tty' - Mac HOT 4
- Index.js is break
- Doesn't work with nodemon HOT 5
- prompt-sync takes a very long time(won't even accept input) to accept inputs HOT 1
- Pressing Tab multiple times does not cycle through the values of the autocomplete function HOT 2
- Add a validation option?
- Copy Paste not working properly
- Marking Repo as Deprecated and Offering Alternatives HOT 3
- Autocomplete error HOT 3
- Submit on first character HOT 1
- Prompt repeating on Input HOT 4
- Cannot access key listeners while prompt is in use
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prompt-sync.