Giter Club home page Giter Club logo

swiftline's Issues

Missing tag for Swift 3

Currently there is no tag for any Swift 3 release.

This makes it impossible to be used in latest SwiftPM

Adding support for Globs and easy dealing with directories

The idea is to add support for globs and quickly iterating a directory. I think it would look very similar to how ruby solves that. Check the documentation for http://ruby-doc.org/core-1.9.3/Dir.html

We can think about translating the following ruby examples to swift

  • Dir["/**"] expand the glob and return all the matching files
  • Dir.chdir change the current directory
  • Dir.foreach(directory) enumerates the files in the directory
  • and so on...

Linux support?

Does Swiftline support Linux? It'd be great if the README noted whether it does or not!

Question - Compile script to executable

Was wondering how I can compile the script to be an executable?

Tried variations on this
swiftc -framework ./Rome/Swiftline.framework Script.swift -o SciptExectutable

Warning with latest tagged version 0.5.0

Do you mind giving the most recent commit a tagged version? When using Swift Package Manager I get a warning in a file that is no longer present since Feb 1, 2017:

Source/RunResults.swift:39:82: Conditional downcast from 'NSString?' to 'String' is a bridging conversion; did you mean to use 'as'?

Unix executable error

Trying to run unix executable, however always come upon the same issue: "Operation not permitted" What I can do about that?)

Using pipeline commands in run

If I try to do the following command:

let gitCommand = "git ls-remote --tags \(gitURL) | awk '{print $2}' | grep -v '{}' | awk -F'/' '{print $3}' | sort -n -t. -k1,1 -k2,2 -k3,3 | tail -n 1"
        let latestVersion = run(gitCommand).stdout

but it fails. it doesn't give any output and I don't know why. If I execute that command in my terminal it works perfectly fine. I'm not sure if it has to do with the pipelines or with the '

Unused default values

I know it is possible to provide default values when prompting the user for input. See below:

let level = ask("Choose level: ", type: Int.self) { settings in
   settings.defaultValue = 1
}

Unfortunately this value is only used in preparedItem() which is not called anywhere. When the user does not provide an input he gets the message to enter a valid integer despite the fact I chose a default value.

public class AskSettings<T: ArgConvertibleType> {
    
    /// Default value to set incase the user entered a blank
    public var defaultValue: T?

    ...

    func preparedItem(originalString string: String) -> T {
        if string.isEmpty && defaultValue != nil {
            return defaultValue!
        }
        
        return T.fromString(string)!
    }
}

dyld: Library not loaded

Hi there,

I'm trying to include swiftline into a fresh Swift command line template Xcode project. I've built swiftline using carthage and included it in the "Link Binaries With Libraries" section to no avail.

dyld: Library not loaded: @rpath/Swiftline.framework/Versions/A/Swiftline
  Referenced from: /Users/cooltrooper/Library/Developer/Xcode/DerivedData/wlV1-fnrxshgimtnooghhhpyaripgrewy/Build/Products/Debug/wlV1
  Reason: image not found

Any tips?

splitCommandToArgs should honor quotes while splitting

If I do a run operation with a directory name with space, operation fails.
For example:
run("open '/Users/myname/path with space'")
or even
run("open \"/Users/myname/path with space\"")

Issue is with the splitCommandToArgs method implemented in RunResults.swift which uses components(separatedBy:) API

Run command stuck

I'm running in it seems to not do anything (it is a long running command but it seems to never finish)

If I run the command from the command line terminal it does complete

Is there a way to continually output the stdout (Not wait for the result)

let archiveCommand = "some command to run"
let res = run(archiveCommand) // never completing through my script

Cocoapods and Rome Issue?

I have the latest cocapods and rome installed

cocoapods (1.1.0.rc.2, 1.0.1)
cocoapods-core (1.1.0.rc.2, 1.0.1)
cocoapods-deintegrate (1.0.1)
cocoapods-downloader (1.1.1)
cocoapods-plugins (1.0.0)
cocoapods-rome (0.7.0)
cocoapods-search (1.0.0)
cocoapods-stats (1.0.0)
cocoapods-trunk (1.0.0)
cocoapods-try (1.1.0)

And I get error:

[!] The dependency `Swiftline (from `../Swiftline.podspec`)` is not used in any concrete target.

I believe Podfile syntax has changed to require a target, but I don't understand how thats supposed to work with these CLI rome framework scripts?

Is there something broken here or am I doing it wrong?

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.