https://github.com/xyproto/workingdir
:rowboat: Package for running quick commands and simple interaction with directories
https://github.com/xyproto/workingdir
commands execute shell
Last synced: 3 months ago
JSON representation
:rowboat: Package for running quick commands and simple interaction with directories
- Host: GitHub
- URL: https://github.com/xyproto/workingdir
- Owner: xyproto
- License: mit
- Created: 2013-10-08T16:34:40.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2018-06-28T12:39:00.000Z (over 7 years ago)
- Last Synced: 2025-03-27T23:43:56.618Z (7 months ago)
- Topics: commands, execute, shell
- Language: Go
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# workingdir
Package for running quick commands and simple interaction with directories.
### Quick example
```go
package mainimport (
wd "github.com/xyproto/workingdir"
)func main() {
print(wd.Run("echo hello"))
}
```### Another example
```go
package mainimport (
"fmt"
wd "github.com/xyproto/workingdir"
)func main() {
dir, err := wd.New("/tmp")
if err != nil {
panic(err)
}
fmt.Printf("There are %d entries in %s\n", len(dir.List()), dir.Path())
fmt.Printf("Current date: %s\n", dir.TrimRun("date --iso-8601"))
}
```### General info
* License: MIT
* Author: Alexander F. Rødseth <xyproto@archlinux.org>
* Version: 0.1