Skip to content

Using scriptcs as a liveable shell? #583

@nblumhardt

Description

@nblumhardt

I love tinkering away in scriptcs :) Guessing this has been discussed already.... but here goes anyway!

It would be neat if, when working at the command line, a few shell commands were available. They wouldn't need to be super succinct, even just aliasing static methods from System.IO would be fine for many:

> #ls "C:\\Windows"
[
  "addins",
  "AppCompat",
  "...",

(#ls foo where foo is a defined variable might also work this way).

I'd use this when interactively exploring and testing other scripts and C# code.

There are a few quick cheap-ish wins:

  • ls
  • pwd
  • cd
  • rm
  • cp
  • mv

Some form of cat or commands for reading/writing objects to files with ToString() would top it off.

var x = "Hello";
#write "greeting.txt" x
#read x "greeting.txt"

(We support .csx files in Octopus Deploy to perform system management tasks, so these commands seem like they'd be useful in that context, at least when debugging/prototyping.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions