diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 0000000..d2f795d --- /dev/null +++ b/CHANGELOG @@ -0,0 +1,19 @@ +# Change Log +All notable changes to this project will be documented in this file. +This project adheres to [Semantic Versioning](http://semver.org/). + +## Unreleased + +## [0.1.1] - 2020-03-12 + +### Added + +* `home` button switches to the first tab +* Opening a browser window to edit an alias with the `:e` command +* Support for switching between tabs using the `tab` key + +## [0.1.0] - 2020-03-07 + +### Added + +* Initial release diff --git a/lib/tefter_cli/app/state.ex b/lib/tefter_cli/app/state.ex index 31700ec..46cacfc 100644 --- a/lib/tefter_cli/app/state.ex +++ b/lib/tefter_cli/app/state.ex @@ -11,7 +11,7 @@ defmodule TefterCli.App.State do @ctrl_b key(:ctrl_b) @ctrl_a key(:ctrl_a) @ctrl_l key(:ctrl_l) - @ctrl_s key(:ctrl_s) + @search_keys [key(:ctrl_s), key(:home)] @ctrl_h key(:ctrl_h) @f5 key(:f5) @tab key(:tab) @@ -68,7 +68,7 @@ defmodule TefterCli.App.State do Enum.at(tabs, rem(Enum.find_index(tabs, &(&1 == state[:tab])) + 1, length(tabs))) ) - {%{token: "" <> _}, {:event, %{key: @ctrl_s}}} -> + {%{token: "" <> _}, {:event, %{key: key}}} when key in @search_keys -> put_in(state[:tab], :search) {%{token: "" <> _}, {:event, %{key: @ctrl_l}}} ->