Hyper: Autocomplete using tab not working correctly on Windows

Created on 16 Jun 2017  路  4Comments  路  Source: vercel/hyper

  • [x] I am on the latest Hyper.app version
  • [x] I have searched the issues of this repo and believe that this is not a duplicate
  • OS version and name: Windows 10 64-bit
  • Hyper.app version: 1.3.3
  • Link of a Gist with the contents of your .hyper.js: https://gist.github.com/F21/c07e0604cf5b184f2a36c0def66b0faa
  • Relevant information from devtools _(CMD+ALT+I on Mac OS, CTRL+SHIFT+I elsewhere)_: N/A
  • The issue is reproducible in vanilla Hyper.app: Is Vanilla

Issue

I am trying to use hyper to navigate around folders using the cd command.

Assuming that I am currently in a folder (C:/users/user/Desktop) with the following structure:

  • C:/users/user/Desktop

    • some_folder



      • some_nested_folder



If I type som and press tab, it autocompletes to some_folder. If I then type /som and press tab, it does not autocomplete to some_nested_folder. Instead, it completes to folders inside my current level, which issome_folder.

Most helpful comment

@DuIslingr Thanks, that makes sense!

All 4 comments

This problem isn't the responsibility of hyper, it's Windows Batch's.

All hyper does is "reproduce" what you get when you do:

  • win+r
  • cmd

(one Windows).

So, it runs the cmd prompt which is pretty shit honestly. One of the problems is this one.

So, the solution is to use the Unix's bash. Since you have git installed, it's very easy to get this to work since it comes with git (that's what I do). Here's how:

In your ~/.hyper.js file, set the key shell to C:/Program Files/Git/usr/bin/bash.exe (make sure this file exists. If it doesn't, just look for a file called bash.exe where you installed Git).

So, what happens now is that you run the Unix's bash prompt, which is way cooler than the windows one. You can set options in your ~/.bashrc, access every command like curl, etc...

Note 1

To get ctrl+l to work I think, I had to set the environment variable TERM set to cygwin. So, in your ~/.hyper.js, add this to the env object, like so:

// for environment variables
env: {
  TERM: "cygwin"
},

Note 2

As I said earlier, through this bash, you can access every unix command (at least the one that comes with git). But, for me, it wasn't the case. I needed to add the containing folders to my PATH. Do you know how to do this?

@math2001 Your solution does not solve the issue and I really don't see how most of ur post has anything to do with autocompletion anyways.

@F21 The Issue here is like @math2001 said due to hyper choosing to run cmd. It doesn't run powershell by default. However you can do autocomplete in cmd still.

Start by autocompleting the some_folder then once it finished you can add \ after it then start typing som then press TAB, and it should autocomplete to some_nested_folder.

So basically ur gonna do cd some_folder\som(TAB) and this should autocomplete to the nested folder. You cant use / in cmd prompt. you can however in powershell. However when in powershell it will just autocorrect it to \ but it still works.

You can do this in cmd as well by installing clink( https://github.com/mridgers/clink ) and allowing it to autorun whenever cmd starts and it can do the same thing powershell can that I just mentioned above and some other useful goodies without having to simply use bash as was suggested.

Also if you aren't aware of what folders are inside you can just do "cd folder\(TAB)" and cycle through the folders that are inside it.

@DuIslingr Thanks, that makes sense!

I can confirmed, pressing tab without any text seems to make git bash hang or load excessively.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dbkaplun picture dbkaplun  路  3Comments

rauchg picture rauchg  路  3Comments

yvan-sraka picture yvan-sraka  路  3Comments

stan-stripe picture stan-stripe  路  3Comments

anthonyettinger picture anthonyettinger  路  3Comments