Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to put shortcuts in order? #255

Open
lindseydiloreto opened this issue Mar 8, 2019 · 6 comments
Open

Possible to put shortcuts in order? #255

lindseydiloreto opened this issue Mar 8, 2019 · 6 comments

Comments

@lindseydiloreto
Copy link

lindseydiloreto commented Mar 8, 2019

Is it possible to put the shortcuts in order manually?

It seems they are always shown in alphabetical order, regardless of how they are sorted in the JSON.

@thshdw
Copy link
Collaborator

thshdw commented Mar 8, 2019

Hello,
Yes this is in #234 I need to compile a binary.

@lindseydiloreto
Copy link
Author

Excellent, thank you! Looking forward to this. 🙂

@ryanmasuga
Copy link

Has this been implemented in a version that is available for download? I installed 1.2.8, which I downloaded from https://fitztrev.github.io/shuttle/

@tsimmons
Copy link

tsimmons commented Feb 20, 2020

I've compiled master and it doesn't seem to work. What is the correct way to have entries manually ordered?

I have the following snippet, in the order I want them to appear, the first two followed by a separator:

	"Network": [
		{
			"name": "adevice (1)",
			"cmd": "bla blah;"
		},
		{
			"name": "adevice (2)[---]",
			"cmd": "bla blah;"
		},
		{
			"name": "aaadevice (1)",
			"cmd": "bla blah;"
		},
	]

The separator shows up where I want but the last item always gets sorted to the top. I have tried:

  1. Preceding all of the names with [aaa];
  2. Putting [aaa] and the end of all the names;
  3. Only putting [aaa] in front of the first two;
  4. Only putting [aaa] in front of the last entry;

What am I missing?

EDIT Figured it out:

	"Network": [
		{
			"name": "[aaa]adevice (1)",
			"cmd": "bla blah;"
		},
		{
			"name": "[bbb]adevice (2)[---]",
			"cmd": "bla blah;"
		},
		{
			"name": "[ccc]aaadevice (1)",
			"cmd": "bla blah;"
		},
	]

@eugeniumegherea
Copy link

I've actually managed to sort mine using some invisible character trick

‏‏‎ ‎ <- here is an invisible character that renders as a space in VS Code, but it is invisible in Shuttle. If you prepend this to a name, it will go on top of the list

image

In my example I prepended this character to dev, stage and prod and it seems to work fine
Hope it helps

@ryanmasuga
Copy link

I can't get separators to work, and at this point I've learned to live with whatever order Shuttle wats to put these things in. ¯_(ツ)_/¯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants