Awesome Open Source
Awesome Open Source

Zsh Quiet-Accept-Line

Build Status

Zsh plugin is to enable to run typed zsh command without triggering a new prompt and saving the query to the history

asciicast

Usage

This plugins define 3 zle widgets:

  • quiet-accept-line bound to C-x RET/C-x C-m: run the current typed command, without output a new prompt
  • silent-accept-line bound to C-x C-j: run the current typed command, without output a new prompt. output wil be suppressed
  • last-quiet-accept-line bound to C-x C-k: restore to the prompt the last command that was run with `quiet/silent-accept-line``

Optionaly status code of the quietly runned command can be display. To do so, set ZLE_QAL_STATUS_DISPLAY to true, on or yes. (QAL stands for Quiet Accept Line)

Installation

Just source quiet-accept-line content, or if you use a plugin manager set adrieankhisbe/zsh-quiet-accept-line as plugin:

  • for antigen, just add zsh-quiet-accept-line to your bundles as adrieankhisbe/zsh-quiet-accept-line antigen bundle adrieankhisbe/zsh-quiet-accept-line
  • for zplug, add zplug "adrieankhisbe/zsh-quiet-accept-line"

Configuration

Keys can be configured based on the following variables: ZLE_QAL_QUIET_KEY, ZLE_QAL_SILENT_KEY, and ZLE_QAL_LAST_KEY. (default being ^X^M, ^X^J and ^X^K)

Output of the status code can be customized with the following variable:

  • ZLE_QAL_STATUS_DURATION: how long status is displayed, blocking the prompt (default 0.5s)
  • ZLE_QAL_STATUS_OK: what is output for successful command (default green ✔ with prompt color escape %{%})
  • ZLE_QAL_STATUS_KO: what is output for failing command (default red ✖ with prompt color escape %{%}) note that status is saved to ZLE_QAL_STATUS variable

About

This plugin was driven by the need to improve tmux-resurrect zsh history saving that was poluting terminal with fc commands. After some research I end up on the following stack overflow question, that inspired the initial implementation.


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Shell (226,066) 
Zsh (3,230) 
History (700) 
Zsh Plugin (339) 
Related Projects
Advertising 📦 9
All Projects
Application Programming Interfaces 📦 120
Applications 📦 181
Artificial Intelligence 📦 72
Blockchain 📦 70
Build Tools 📦 111
Cloud Computing 📦 79
Code Quality 📦 28
Collaboration 📦 30
Command Line Interface 📦 48
Community 📦 81
Companies 📦 60
Compilers 📦 60
Computer Science 📦 74
Configuration Management 📦 39
Content Management 📦 167
Control Flow 📦 197
Data Formats 📦 77
Data Processing 📦 266
Data Storage 📦 132
Economics 📦 60
Frameworks 📦 198
Games 📦 122
Graphics 📦 103
Hardware 📦 148
Integrated Development Environments 📦 47
Learning Resources 📦 147
Legal 📦 28
Libraries 📦 119
Lists Of Projects 📦 21
Machine Learning 📦 336
Mapping 📦 61
Marketing 📦 15
Mathematics 📦 55
Media 📦 228
Messaging 📦 97
Networking 📦 304
Operating Systems 📦 84
Operations 📦 120
Package Managers 📦 52
Programming Languages 📦 229
Runtime Environments 📦 96
Science 📦 42
Security 📦 375
Social Media 📦 26
Software Architecture 📦 70
Software Development 📦 68
Software Performance 📦 57
Software Quality 📦 127
Text Editors 📦 45
Text Processing 📦 131
User Interface 📦 310
User Interface Components 📦 465
Version Control 📦 29
Virtualization 📦 68
Web Browsers 📦 38
Web Servers 📦 25
Web User Interface 📦 194