{"id":32779361,"url":"https://github.com/ghtaarn/history.jl","last_synced_at":"2026-06-23T23:31:12.289Z","repository":{"id":187140117,"uuid":"532223940","full_name":"GHTaarn/History.jl","owner":"GHTaarn","description":"History functionality in the Julia REPL similar to what bash provides","archived":false,"fork":false,"pushed_at":"2025-12-06T13:10:46.000Z","size":29,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-10T07:54:23.674Z","etag":null,"topics":["command-line","history","julia","repl"],"latest_commit_sha":null,"homepage":"","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GHTaarn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-09-03T10:15:04.000Z","updated_at":"2025-12-06T13:10:50.000Z","dependencies_parsed_at":"2024-01-11T06:44:36.723Z","dependency_job_id":"33f48b29-5fcc-42e2-b7d7-90ced57a5658","html_url":"https://github.com/GHTaarn/History.jl","commit_stats":null,"previous_names":["ghtaarn/history.jl"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/GHTaarn/History.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GHTaarn%2FHistory.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GHTaarn%2FHistory.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GHTaarn%2FHistory.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GHTaarn%2FHistory.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GHTaarn","download_url":"https://codeload.github.com/GHTaarn/History.jl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GHTaarn%2FHistory.jl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34711176,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["command-line","history","julia","repl"],"created_at":"2025-11-04T16:05:53.157Z","updated_at":"2026-06-23T23:31:12.266Z","avatar_url":"https://github.com/GHTaarn.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# History.jl\n\nA [Julia](https://www.julialang.org) package for getting REPL history\nfunctionality similar to what [Bash](https://www.gnu.org/software/bash) provides.\n\n## Installation\n\nIn the Julia REPL type:\n\n```julia\n] add https://github.org/GHTaarn/History.jl\n```\n(If you are using an unstable version of Julia, [do this instead](#Unsupported-julia-versions))\n## Use\n\nIn the Julia REPL type:\n\n```julia\nusing History\n```\n\nHereafter, typing an '!' character at the beginning of a line in the Julia\nREPL will activate `History` mode.\n\nIn `History` mode, a line starting with a '/' character will return the\nhistory entries whose text contains the string on the rest of the line\n(using '/' was inspired by [less](https://en.wikipedia.org/wiki/Less_(Unix))\nand [vi](https://www.vim.org)).\nA line starting with a '^' character will return the history entries whose\ntext starts with the string on the rest of the line\n(using '^' was inspired by\n[regular expressions](https://docs.julialang.org/en/v1/manual/strings/#man-regex-literals)).\n\nIn `History` mode, a line consisting of only an '!' character will print out\nexactly enough recent REPL history to fill your screen. Any '!' characters\nimmediately followed by a positive integer will substitute the text from\nthe corresponding historic input line into the rest of the current line\nimmediately before the line is executed.\nA negative integer after an '!' character will be substituted\nwith the text of the input line the given number of lines ago.\n\nTab completion: If the current input line contains an '!' character followed\nby an integer before the cursor, then the above substitution will be performed.\nIn all other cases, normal julia mode tab completion will be performed.\nIn tab completion, `!0` can be used to refer to the current input line as it\nlooks when tab is pressed.\n\n### Examples\n\nThe following examples are performed without tab completion, but using tab\ncompletion will often avoid a lot of confusion and be more useful.\n\n```julia-repl\njulia\u003e using History\nREPL mode history initialized. Press ! to enter and backspace to exit.\n\nHistory\u003e sin(8)\n0.9893582466233818\n\nHistory\u003e !-1\n0.9893582466233818\n\nHistory\u003e println(\"!-2\")\nsin(8)\n\nHistory\u003e println(\"!-2 \")\n!-1 \n\nHistory\u003e true\ntrue\n\nHistory\u003e !!-1\nfalse\n\nHistory\u003e println(\"!-1 and !-2\")\n!!-1 and true\n\nHistory\u003e \n```\n\n```\nHistory\u003e !\n10×3 Matrix{Any}:\n 4315  :julia    \"exit()\"\n 4316  :julia    \"using History\"\n 4317  :history  \"sin(8)\"\n 4318  :history  \"!-1\"\n 4319  :history  \"println(\\\"!-2\\\")\"\n 4320  :history  \"println(\\\"!-2 \\\")\"\n 4321  :history  \"true\"\n 4322  :history  \"!!-1\"\n 4323  :history  \"println(\\\"!-1 and !-2\\\")\"\n 4324  :history  \"!\"\n\nHistory\u003e !!4321 ? !4317 : 2*!4317\n1.9787164932467636\n\nHistory\u003e ^!\n3×3 Matrix{Any}:\n 4318  :history  \"!-1\"\n 4322  :history  \"!!-1\"\n 4324  :history  \"!\"\n 4325  :history  \"!!4321 ? !4317 : 2*!4317\"\n\nHistory\u003e /tln\n4×3 Matrix{Any}:\n 4319  :history  \"println(\\\"!-2\\\")\"\n 4320  :history  \"println(\\\"!-2 \\\")\"\n 4323  :history  \"println(\\\"!-1 and !-2\\\")\"\n 4327  :history  \"/tln\"\n\nHistory\u003e \n```\n\n### Exported functions\n\nThere are 4 exported functions: `history`, `histexec` `histsearch` and\n`histsave`. You can\nread more about these in their docstrings by typing the following in the Julia\nmode REPL:\n\n```julia\n?history\n?histexec\n?histsearch\n?histsave\n```\n\n### Activation at startup\nFrom a shell script or on the OS shell commandline:\n```bash\njulia -i -e 'atreplinit(x-\u003eeval(Meta.parse(\"using History\")))'\n```\n\nOR\n\nIn `~/.julia/config/startup.jl`:\n```julia\natreplinit() do repl\n    @eval using History\nend\n```\n### Other usage tips\n\nThe `History` package is designed to be used in combination with Julias\nexisting history capabilities such as `Ctrl-R`, `Ctrl-S`, `Up arrow` and\n`Down arrow` (documented [here](https://docs.julialang.org/en/v1/stdlib/REPL/#Search-modes)).\n\nThe [TerminalPager](https://juliapackages.com/p/terminalpager) package can be\na useful companion to `History.jl`s [exported functions](#Exported-functions).\n`TerminalPager` also has a little known commandline mode that can be entered with\na `|` as the first key press from the Julia mode commandline.\n\nThe [OhMyREPL](https://juliapackages.com/p/ohmyrepl) package also has some\nhistory functionality and seems to work alongside `History.jl` provided that\nOhMyREPL is loaded before `History.jl`, e.g.:\n\n```julia\nusing OhMyREPL\nusing History\n```\n\nBe aware that the\n[numbered prompts](https://docs.julialang.org/en/v1/stdlib/REPL/#Numbered-prompt)\nintroduced in Julia 1.9 use a different numbering convention than `History.jl`\ndoes.\n\n#### Unsupported Julia versions\n\nBecause this package makes use of undocumented features in Julia, compatibility\nhas been restricted to stable Julia 1.x releases. Use of this package with\nunstable Julia releases is not recommended and not supported, but is often\npossible if it is\ninstalled with `Pkg.add(url=\"https://github.com/GHTaarn/History.jl\", rev=\"nocompat\")`.\n\n## Known bugs\n\n1. Commands entered in `History` mode produce errors when [Revise](https://juliapackages.com/p/revise) needs to recompile\n2. In `History` mode, incomplete lines produce a stack trace instead of a line change when the `Return` key is pressed\n\nFor the first bug, if possible and acceptable, the workaround is to tab\ncomplete the line and then exit `History` mode (with the `Home` key followed\nby `Backspace`) just before the `Return` key is pressed. Alternatively, a\nreload must be triggered before the `History` mode command is executed e.g.\nby prepending the command with `Revise.retry();`.\n\nFor the second bug, a workaround is to use the `Meta`+`Return` key combination\ninstead of only `Return`. Exiting `History` mode as above is also an option\nand if necessary, `History` mode can be reentered (by pressing the `Home` key\nfollowed by the `!` key) subsequently.\n\n## Feedback\n\nFirstly, if you like this package and find it useful, please give it a star\non the [Github page](https://github.com/GHTaarn/History.jl).\nIf you find any bugs, please report them\n[here](https://github.com/GHTaarn/History.jl/issues)\nor [submit a pull request](https://github.com/GHTaarn/History.jl/pulls).\nBefore doing this, please read\n[the CONTRIBUTING.md file](docs/CONTRIBUTING.md).\n\nIf what you want to write is neither an issue nor a pull request, feel free\nto use the\n[discussions](https://github.com/GHTaarn/History.jl/discussions) page.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghtaarn%2Fhistory.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghtaarn%2Fhistory.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghtaarn%2Fhistory.jl/lists"}