<commit_before>go-linoise
==========

<< Describe project >>


## Installation

In the first, there is to install [go-term][4]. And then:

	$ goinstall github.com/kless/go-linoise/linoise


## Configuration

There are several values by default:

+ In the buffer: *BufferCap*, *BufferLen*.
+ In the history file: *HistoryCap*, *HistoryPerm*.
+ In the main code: *Input*, *Output*.


## Operating instructions

	package main

	import (
		"fmt"
		"os"
		"path"

		"github.com/kless/go-linoise/linoise"
		"github.com/kless/go-term/term"
	)

	var historyFile = path.Join(os.TempDir(), "go_linoise")


	func main() {
		fmt.Println("Press ^D to exit\n")

		term.MakeRaw(os.Stdin.Fd())
		defer term.RestoreTermios()

		hist, err := linoise.NewHistory(historyFile)
		if err != nil {
			fmt.Fprintf(os.Stderr, err.String())
		}
		hist.Load()

		ln := linoise.NewLine(hist, "linoise> ")
		if err = ln.Run(); err != nil && err != linoise.ErrCtrlD {
			fmt.Println(err)
		} else {
			hist.Save()
		}

		//os.Remove(historyFile)
	}


## Copyright and licensing

***Copyright 2010  The "go-linoise" Authors***  
See file AUTHORS and CONTRIBUTORS (if any).

Licensed under **Simplified BSD License**.  
See file LICENSE.


## Contact

To contact, send e-mail through [github][1].


## Known bugs

To reporting bugs, please login and create a new issue [here][2].


## Credits and acknowledgments

For credits, see file AUTHORS and CONTRIBUTORS (if any).


## ChangeLog

For changes between releases, see file NEWS; and for changes between the commits,
see the [commit history][3].


* * *
*Generated by [gowizard](http://github.com/kless/gowizard)*


[1]: http://github.com/kless
[2]: http://github.com/kless/go-linoise/issues
[3]: http://github.com/kless/go-linoise/commits/master
[4]: http://github.com/kless/go-term
<commit_msg>Completing documentation<commit_after>go-linoise
==========

**go-linoise** is a simple library for line editing, licensed under BSD, and as
replacement to GNU Readline. It is based in [linenoise][4].


## Installation

In the first, there is to install [go-term][5]. And then:

	$ goinstall github.com/kless/go-linoise/linoise


## Configuration

There are several values by default:

+ In the buffer: *BufferCap*, *BufferLen*.
+ In the history file: *HistoryCap*, *HistoryPerm*.
+ In the main code: *Input*, *Output*.


## Operating instructions

	package main

	import (
		"fmt"
		"os"
		"path"

		"github.com/kless/go-linoise/linoise"
		"github.com/kless/go-term/term"
	)

	var historyFile = path.Join(os.TempDir(), "go_linoise")


	func main() {
		fmt.Println("Press ^D to exit\n")

		term.MakeRaw(os.Stdin.Fd())
		defer term.RestoreTermios()

		hist, err := linoise.NewHistory(historyFile)
		if err != nil {
			fmt.Fprintf(os.Stderr, err.String())
		}
		hist.Load()

		ln := linoise.NewLine(hist, "linoise> ")
		if err = ln.Run(); err != nil && err != linoise.ErrCtrlD {
			fmt.Fprintf(os.Stderr, err.String())
		} else {
			hist.Save()
		}

		//os.Remove(historyFile)
	}


## Copyright and licensing

***Copyright 2010  The "go-linoise" Authors***  
See file AUTHORS and CONTRIBUTORS (if any).

Licensed under **Simplified BSD License**.  
See file LICENSE.


## Contact

To contact, send e-mail through [github][1].


## Known bugs

To reporting bugs, please login and create a new issue [here][2].


## Credits and acknowledgments

For credits, see file AUTHORS and CONTRIBUTORS (if any).

I would like to thank <NAME> for building *linenoise*, and to do it
under a liberal license.


## ChangeLog

For changes between releases, see file NEWS; and for changes between the commits,
see the [commit history][3].


* * *
*Generated by [gowizard](http://github.com/kless/gowizard)*


[1]: http://github.com/kless
[2]: http://github.com/kless/go-linoise/issues
[3]: http://github.com/kless/go-linoise/commits/master
[4]: http://github.com/antirez/linenoise
[5]: http://github.com/kless/go-term

{'fraction_non_alphanumeric': 0.15154612829031433, 'fraction_numerical': 0.006644518272425249, 'mean_word_length': 3.773170731707317, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1810549', 'n_tokens_mistral': 1479, 'n_tokens_neox': 1352, 'n_words': 381}