cmd icon indicating copy to clipboard operation
cmd copied to clipboard

Unable to delete command which name contains '/'

Open kgyrtkirk opened this issue 8 years ago • 3 comments

I was experimenting with commands which were prefixes of eachother...

$ cat some.cmd | ssh alpha.cmd.io  :create u/a/b/c
Command u/a/b/c already exists
$ ssh alpha.cmd.io  :delete u/a/b/c
Command not found: u/a/b/c

altough these can be created...they are not callable currently. It would be either good to:

  • prevent the creation of command which contains '/'
  • or support them...

I think it would be practical to not support commands which contains '/' in their name.

kgyrtkirk avatar Aug 02 '17 18:08 kgyrtkirk

I agree it would be better to prevent creating them. Thanks for catching this!

progrium avatar Aug 02 '17 21:08 progrium

@progrium should we have a whitelist of allowed characters, or just specifically block "/"?

Omeryl avatar Aug 27 '17 18:08 Omeryl

I'm thinking a regex of allowed characters. Prob alpha numeric plus dash and underscore.

On Sun, Aug 27, 2017 at 1:11 PM Elizabeth [email protected] wrote:

@progrium https://github.com/progrium should we have a whitelist of allowed characters, or just specifically block "/"?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/gliderlabs/cmd/issues/198#issuecomment-325214800, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAChx-d8cQKDcOOTyesqaVvbBTUa4wOks5scbFggaJpZM4OrdbE .

-- Jeff Lindsay http://progrium.com

progrium avatar Aug 27 '17 18:08 progrium