{"id":16819706,"url":"https://github.com/knz/go-libedit","last_synced_at":"2025-03-23T15:31:29.527Z","repository":{"id":47015721,"uuid":"102268227","full_name":"knz/go-libedit","owner":"knz","description":"Go wrapper around the BSD libedit replacement to GNU readline","archived":false,"fork":false,"pushed_at":"2023-06-21T13:34:39.000Z","size":310,"stargazers_count":6,"open_issues_count":3,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-18T21:52:26.585Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/knz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-03T13:56:20.000Z","updated_at":"2024-02-12T13:50:01.000Z","dependencies_parsed_at":"2024-06-18T21:40:30.848Z","dependency_job_id":null,"html_url":"https://github.com/knz/go-libedit","commit_stats":{"total_commits":62,"total_committers":6,"mean_commits":"10.333333333333334","dds":0.564516129032258,"last_synced_commit":"657a11e944a9782fae9666515bd6e91a20264d0a"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knz%2Fgo-libedit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knz%2Fgo-libedit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knz%2Fgo-libedit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knz%2Fgo-libedit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/knz","download_url":"https://codeload.github.com/knz/go-libedit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245122799,"owners_count":20564377,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T10:54:25.400Z","updated_at":"2025-03-23T15:31:28.984Z","avatar_url":"https://github.com/knz.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-libedit \n\nGo wrapper around `libedit`, a replacement to GNU readline using the BSD license.\n\n[![travis](https://travis-ci.org/knz/go-libedit.svg?branch=master)](https://travis-ci.org/knz/go-libedit)\n\nHow to use:\n\n- `go build` / `go install`\n- see `test/example.go` for a demo.\n- basic idea: call `Init()` once. Then call `SetLeftPrompt()` and\n  `GetLine()` as needed. Finally call `Close()`.\n\n## How to force using the system-wide libedit on GNU/Linux\n\nBy default, the **go-libedit** package uses the bundled `libedit`\nsources on GNU/Linux, so that `go get` works out of the box.\n\nTo force the package to use a system-wide libedit instead, edit `unix/editline_unix.go` as follows:\n\n- remove the line containing `#cgo linux CFLAGS`\n- change the line containing `#cgo linux CPPFLAGS` to read: `#cgo linux CPPFLAGS: -I/usr/include/editline -Ishim`\n- change the line containing `#cgo linux LDFLAGS` to read: `#cgo linux LDFLAGS: -ledit`\n\n## macOS/OSX due to restrictions due to changes macOS Mojave\n\nmacOS Mojave is shipped with a broken/restricted libedit where the\ncompletion API is not published. Because it is not possible to\nautomatically detect macOS versions, **go-libedit** will use a reduced\nautocompletion facility on all versions of macOS instead.\n\nThis autocompletion facility lacks the following features from libedit:\n\n- it cannot autocomplete file and directory names.\n- it does not display a list of possible completions. Only the fact\n  that more than 1 completion is available is signalled using\n  a terminal beep.\n\n## How to refresh the bundled libedit sources\n\n(Only needed when upgrading the bundled `libedit` to a newer version.)\n\nThis procedure should be ran on a Debian/Ubuntu system.\n\n1. ensure that `/etc/apt/sources.list` contains source repositories, i.e. the `deb-src`  lines are uncommented. Run `apt-get update` as necessary.\n2. run:\n\n   ```\n   $ sudo apt-get install libbsd libbsd-dev libncurses-dev`\n   $ cd src\n   $ bash refresh.sh\n   ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknz%2Fgo-libedit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fknz%2Fgo-libedit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknz%2Fgo-libedit/lists"}