Git Product home page Git Product logo

tcl-linenoise's Introduction

Tcl Binding to the Linenoise minimal line editor

  • Welcome to TclLinnoise, a line editor based on the linenoise library.

Website

  • The main website of this project is https://andreas-kupries.github.io/tcl-linenoise

    It provides access to archives for various revisions and the full documentation, especially the guides to building and using it.

    Because of the latter this document contains only the most basic instructions on getting, building, and using TclLinenoise.

Versions

  • Version 1 is the actively developed version of TclLineNoise.

Getting, Building, and Using TclLineNoise

  • Retrieve the sources:

    % git clone http://github.com/andreas-kupries/tcl-linenoise

    Your working directory now contains a directory tcl-linenoise.

  • Build and install it:

    Install requisites: linenoise itself.

    Create a link from within the tcl-linenoise top directory to linenoise itself. Or copy linenoise into a subdirectory of that name.

    % cd tcl-linenoise

    % tclsh ./build.tcl install

    The generated package is placed into the [info library] directory of the tclsh used to run build.tcl. This may require administrative (root) permissions, depending on the system setup.

  • It is expected that a working C compiler is available. Installation and setup of such a compiler is platform and vendor specific, and instructions for doing so are very much outside of scope for this document. Please find and read the documentation, how-tos, etc. for your platform or vendor.

  • With tcl-linenoise installed try out one of the examples:

Documentation

tcl-linenoise's People

Contributors

andreas-kupries avatar bogdan107 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tcl-linenoise's Issues

Make proper release

Notes

  • Release should contain the linenoise sources

From chat

rkeene: aku, One option is to have a "release" branch that corresponds to the contents of the release tarball that forks at the release point, then tag that commit on the release branch

aku: Oh. I see. Make a branch where the linenoise sources are in the repo, and thus automatically in the tarball github will create.

rkeene: Basically create the tarball, create the branch (can Git have multiple branches with the same name ?), then get rid of everything in the branch, and replace it with stuff in the tarball, tag that commit as the release

Note: The above dance gets around github's insistence that the "sources" of a release should be a tagged commit in the repository. They automatically link to the commit and auto-generate archives. The result normally is not a proper release with RE artifacts.

fix namescape in policy.tcl

I have an error when load linenoise package:

package require linenoise
can't create procedure "::linenoise::history::TempFile": unknown namespace
while evaluating package require linenoise

This fix in policy.tcl resolve an error:

--- a/policy.tcl  2023-01-07 01:20:12.256624629 +0200
+++ b/policy.tcl  2023-01-07 01:16:46.820239749 +0200
@@ -10,7 +10,7 @@
 ## The saving and loading primitives are wrapped for proper
 ## integration of the exported commands within Tcl's VFS.
 
-namespace eval linenoise::history {}
+namespace eval ::linenoise::history {}
 
 if {[package vsatisfies [package present Tcl] 8.6]} {
     # Tcl 8.6, and higher. We have "file tempfile".
@@ -178,7 +178,7 @@
     return [::linenoise::history_getmax]
 }
 
-namespace eval linenoise::history {
+namespace eval ::linenoise::history {
     namespace ensemble create -map {
        add     ::linenoise::history_add
        clear   ::linenoise::history_clear
@@ -377,7 +377,7 @@
 
 # # ## ### ##### ######## ############# #####################
 
-namespace eval linenoise {
+namespace eval ::linenoise {
     # primitive commands:
     # - columns
     # - prompt (with completion) | wrapped

The fix is :: symbols in the name of the namespace string in the policy.tcl file.

Reason

This command at line 13:

namespace eval linenoise::history {}

create namespace with the implicit declared name [namespace current]::linenoise::history, where [namespace current] may have any other name, than the root namespace ::.

The next instruction at the line 18:

proc ::linenoise::history::TempFile {} {

use absolutely declared namespace name ::linenoise::history, not implicit declared namespace name [namespace current]::linenoise::history.

So, this two lines (13 and 18) use different namespaces.

I think, that name of declared namespace MUST be consistent with namespace in procedure names.

Please, fix the file.

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.