I would like to invoke my own command line editor in bash or zsh when Alt+Enter is being pressed. It should do some editing and submit result to the shell on Enter. So basically my editor takes current command line content and returns a modified one. Any ideas how to approach integration? I do know how to work with ANSI terminals, just wondering how to integrate my editor console app to the shell in this way.
Custom command line editor in Linux
298 views Asked by Dmitry Nogin At
2
There are 2 answers
Related Questions in LINUX
- Is there some way to use printf to print a horizontal list of decrementing hex digits in NASM assembly on Linux
- Why does Hugo generate different taxonomy-related HTML on different OS's?
- Writes in io_uring do not advance the file offset
- Why `set -o pipefail` gives different output even though the pipe is not failing
- what really controls the permissions: UID or eUID?
- Compiling eBPF program in Docker fails due to missing '__u64' type
- Docker container unable to make HTTPS requests to external API
- Whow to use callback_query_handler in Python 3.10
- Create kea runtime directory at startup in Yocto image
- Problem on CPU scheduling algorithms in OS
- How to copy files into the singularity sandbox?
- Android kernel error: undefined reference to `get_hw_version_platform'
- Is there a need for BPF Linux namespace?
- Error when trying to execute a binary compiled in a Kali Linux machine on an Ubuntu system
- Issue with launching application after updating ElectronJs to version 28.0.0 on Windows and Linux
Related Questions in BASH
- When does Bash read heredocs?
- Why `set -o pipefail` gives different output even though the pipe is not failing
- Run an external command within jq to manipulate each values of a particular key
- API key 401 error in .env.development file
- How to "Enable mobile data" on a Huawei E3372 4G USB dongle using a bash script in Windows
- ImageMagick / Bash : pipe ignored(?) when filename format variable used
- MacOS Bash-Script: while read p and echo
- Parse command line arguments and write useful usage message without additional code
- JQ JSON - Values to Array
- why variable substitution is so different?
- postbank_pdf2csv: how to setup with Cygwin in Windows?
- Custom Bash functions & custom statements - Need some advice
- unexpected operator == in square brackets when trying to use gum lib
- How to disable a bash builtin inside a docker container
- Use sed or rename find series of alphabet then replace with with the same alphabet and a dash -
Related Questions in COMMAND-LINE-INTERFACE
- API key 401 error in .env.development file
- NPM Command Line Tool - Command not working
- How to pass the result of a computed property to another component in Vue
- Unexpected argument on sqlcmd command line
- Passing an argument to a file in linux
- Run multiple CLI commands inside ONE child process, but HANDLE each output separately in Node
- Ignoring folders in The Silver Searcher `ag`
- "Unable to load the service index for source https://api.nuget.org/v3/index.json " error when running pac install latest power shell in my local pc
- Values after flag parsed with first argument
- non-ASCII characters in CLI output in powershell script
- Creating aliases for Github Copilot CLI (ghcs, ghce not recognised)
- Setup for a CLI python program
- procedure/alias [a portion of] a somewhat long MySQL command?
- Is there a way to retrieve the version (git commit hash) of a provided tag on the provider side
- CLI can't recognize the "more" commands
Related Questions in ZSH
- ZSH function parameters conundrum
- Expect: Any way to match a specific rule only once?
- The zsh command returns an error when I use a variable in the parameters
- Text selection replacement in ZSH
- Getting a double prompt with zsh and oh-my-zsh. Additionally source ~/.zshrc takes over 20 seconds to complete
- How to remove trailing slash from ZSH’s _files results?
- Starting Node.js on MacOS programmatically
- VSCode task with pyenv and zsh
- am reinstalling flutter and I can't seem to run it, with PATH variables in the .bashrc and .zshrc all configured
- Cannot Pass Whitespace Containing Shell Arguments - Double Quotes, Escape Chars etc. Not Working
- cd ~[TAB] doesn't behave as expected
- Running the `code` command creates two new windows on wsl + tmux
- Integrated terminal in VSCode not allowing me to use zsh
- Getting zsh command not found wp-scripts error
- How to escape a command line for logging?
Related Questions in ANSI-TERM
- Custom command line editor in Linux
- How can I get a WSL window with full colour support in Windows GUI Emacs?
- How to get GHCi running correctly within ansi-term window in Emacs?
- clickable overlay in ansi-term
- Change font color in Emacs ansi-term mode
- Issues accessing Node.js command history in Emacs ansi-term
- In emacs, what is the best way to run an external program in another window that can be closed by a single key command after executing program exits?
- Issues with newline character while using ansi-term in emacs
- Sending bash commands to an open terminal buffer in emacs
- Where to find emacs ansi-term bindings
- Htop in emacs' ansi-term won't resize
- Send EOF (^D) to emacs ansi-term
- Emacs: Opening a file within the same Emacs session from a tmux session in ansi-term
- Emacs 24.4 and multi-term
- Customized command-line prompt not working with ansi-term
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
For Bash:
There is a Readline command that opens the current command in an editor,
edit-and-execute-command. By default, it is bound toC-x C-e, and it opens the command in what$VISUALis set to, or$EDITOR, or with Emacs.You can set
$VISUALto your editor by exporting it into the environment, for example in~/.bashrc:and bind it to Alt+Enter with
on the command line, or
in
~/.inputrc.