From 0a05b98bbe6a6b3e7648c1ffab9fb18f803344a6 Mon Sep 17 00:00:00 2001 From: Terminator X Date: Sun, 5 Sep 2021 16:08:52 +0530 Subject: [PATCH] Updated Concepts (markdown) --- Concepts.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Concepts.md b/Concepts.md index e242b10..26939cd 100644 --- a/Concepts.md +++ b/Concepts.md @@ -231,6 +231,17 @@ Key ^L clears and Esc exits all prompts. The handy REPL command prompt ] understands environment variables (like `$PWD`). Refer to your shell's documentation (e.g. `BASH_ENV` for bash, `~/.zshenv` for zsh) to use aliases and functions. To fuzzy-select commands from your shell history at the command prompt and issue them after editing (like [fc](http://manpages.ubuntu.com/manpages/bionic/man1/fc.1posix.html)), copy the plugin `fzhist` (as `h` maybe?) in your `$PATH`. +The native command prompt remembers only the last executed command in the current session. To access and use the shell's history add a shell function similar to: + +``` +h () +{ + fzf <~/.zsh_history | tr -d '\n' | xsel -bi +} +``` + +Then paste the selected command at the prompt using Ctrl-Sihft-V, optionally edit and run. + All binary questions are confirmed by y or Y. #### Special variables