Giter Site home page Giter Site logo

hyperterm-paste's Introduction

hyperterm-paste

Makes pasting into hyperterm safe and easy

Not maintained anymore, might not work correctly

npm js-standard-style

Pasting into hyperterm

hpm install hyperterm-paste

Description

Now pasting from browser into terminal will never run shell command by itself!

Transformations applied to input:

  • remove leading $
  • remove leading whitespaces
  • multiline input will be concatenated to one line by adding &&
  • trailing newline will be removed which prevents from execution

Custom separators

By default plugin will use && for new lines which is fine for bash and zsh shells. If you use something more exotic you can specify custom separator as env in your config .hyper.js file:

env: {
  "HYPER_PASTE_SEPARATOR": " & "
},

Escape hatch

You can still make "raw" paste by using ctrl + shift + v

hyperterm-paste's People

Contributors

danieldelcore avatar krzkaczor avatar qaraluch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hyperterm-paste's Issues

Powershell pasting almost there

Adding the option to specify your separator was great. Now I'm getting an issue where things are pasted twice. I think that the underlying Powershell session is still hearing ctrl + v.

screenshot 27

Copied links paste twice

How to reproduce:
Copy any text from the link from web => paste into the terminal

Result:
Text concatenates twice. For example: hyperterm-pastehyperterm-paste

Detecting paste on middle click

From my understanding, paste detection is done via capturing the CTRL-V keycode in javascript. For linux users, it's common to use middle click on the mouse to paste. Could you consider adding support for capturing middle click to trigger the script?

Thanks.

paste ssh password fails

When pasting my password during a ssh login, it always says wrong password. If I just paste the password in plaintext into my terminal, it is copied the right way. If I type in this pasted password manually, I can login.

Looks like something is happening to my password, when pasting into a stdin read from ssh login (or other read inputs). The password contains [a-z][A-Z][0-9] and the exclamation mark !

Configure Escape Hatch

Docs says we can use shift + ctrl + v but this is not working for me on a mac. shift + cmd + v is not working either. But that combination is also mapped to my flycut app. So it would be nice if I could set key escape hatch keyboard combination to past items in hyperterm - like when I'm pasting code into vim.

Should concat mulitlne commands

docker run --detach \ --env 'RIAK_CS_BUCKETS=foo,bar,baz' \ --publish '8080:8080' \ --name 'riak-cs' \ ianbytchek/riak-cs

Remove 'sudo' when root

For the folks who like to live dangerously and are therefore logged in as root, it would be convenient if this plugin removes sudo when the current user is the root user.

Using plugin on WSL issue

On "Windows Subsystem for Linux" (WSL) sometime you pasting text with FN end line which is not properly sanitize by plugin's function and therefore executes the line.

hyperterm-paste is not working in hyper 3.0.2

Is this project still under development?
I am using the hyper version 3.0.2 and hyperterm-paste don't seem to work here. Leading whitespaces will not be removed, also leading $, etc. Hyperterm-paste is in my plugins-section under .hyper.js and also the node-module are in place:

~/.hyper_plugins/node_modules/hyperterm-paste   
❯ ls
LICENSE  package.json  README.md  src

Doesn't work on Windows

@krzkaczor, Hyper 1.0.0 was released with Windows support.

This attractive plugin doesn't seem to work. It doesn't throw any errors to the console.

Let's try and work it out together?

Error when using with WSL

Hi,

Off a fresh install of Windows 10, Hyper terminal and WSL (Windows Subsystem for Linux) I receive the following error when I try to paste something into the terminal (Hyper and it's plugins are saved in Windows-side while it emulates the bash from Ubuntu):

xsel: Can't open display: (null)
: Inappropriate ioctl for device

Any ideas would be welcome

Would really like Powershell pasting.

Instead of concatenating multiline commands with &&, when using Powershell, it should be with semicolons. This would be awesome. If I have time, I might do a pull request.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.