Command history in Vmd text mode - vmd

How can I activate command history or autocomplete in VMD text mode (vmd shell)
vmd >
I use it in Linux Ubuntu, when I use arrow keys it prints characters like ^[[A.

The rlwrap package automatically provides this functionality to vmd's text mode:
$ sudo apt install rlwrap

Related

ZSH Couldn't Auto Complete Suggestion

I'm running the latest Fedora with GNOME version 43.2. I've installed ZSH and oh-my-zsh on my system. When I tried to type "sudo dnf remove auda" and hit the tab button for autocompletion, I received the following suggestion from ZSH. In other word, hitting TAB after auda will append the zsh: sqlite3 as you see below.
# Attempting to remove audacious
sudo dnf remove audazsh: sqlite3: command not found...
Install pacsudo dnf remove auda
# Another example trying to remove Gimp
sudo dnf remove gizsh: sqlite3: command not found...
Install pacsudo dnf remove gi
It seems any command ZSH and oh-my-zsh with auto-suggestion plugin will work just fine but not the application name itself.
Anyone run into this issue? It's quite annoying. I'd rather it not suggest anything instead of appending gibberish to the command.

Cursor keys dont work in vim when running zsh on wsl through cmder or conemu

I'm running ubuntu 1804 on windows using the WSL. Everything is set up fine and works correctly. I've also installed ZSH and oh-my-zsh, again this is all good and everything looks like its working fine. Everything except the arrow keys whilst using vim or man pages or some other command line tools.
The up and down keys work on the command line when scrolling through history and also for select commands like nano. Also if I boot into bash rather than zsh the arrow keys do work in vim and man pages, in fact they work everywhere.
If i boot into bash, then switch to zsh on the command line manually the arrow keys then work everywhere.
So my cmder config for zsh
c:/_distros/ubuntu1804/ubuntu1804.exe -c zsh -cur_console:pm
and for bash
set "PATH=%ConEmuBaseDirShort%\wsl;%PATH%" & %ConEmuBaseDirShort%\conemu-cyg-64.exe --wsl -cur_console:pm:/mnt
The one for bash uses the conemu-cyg-64.exe program that comes from conemu which is a symbiont of POSIX enabled pty and WinAPI full-featured terminal.
Apparently you can use this tool with zsh but i cant manage to make it work i get the error
{PID:10592} failed to run shell (2): No such file or directory
{PID:10592} shell: `/usr/bin/zsh` `-l` `-i`
{PID:10592} dir: `/cygdrive/c/Program Files/cmder`
ConEmuC: Root process was alive less than 10 sec, ExitCode=0.
Press Enter or Esc to close console...
and this is the task in cmder
set "PATH=%ConEmuBaseDirShort%\wsl;%PATH%" & %ConEmuBaseDirShort%\conemu-cyg-64.exe /usr/bin/zsh -l -i -cur_console:pm:/mnt
So I think that if i can boot into zsh using conemu-cyg-64 that the cursor keys will probably work in commands like vim and the man pages. Any help or advice getting that working would be brilliant.
EDIT:
On my ubuntu install zsh is installed at /usr/bin/zsh, but there is no file or folder /cygdrive/c/Program Files/cmder
Many thanks to #Maximus for pointing me in the right direction. The answer was right under my nose at the bash on windows page of conemu. A small change to the command i was using before. the zsh needs to go on the end rather than before the --wsl.
The correct task to ensure that cursor keys work on all apps in the terminal is:
set "PATH=%ConEmuBaseDirShort%\wsl;%PATH%" & %ConEmuBaseDirShort%\conemu-cyg-64.exe --wsl -cur_console:pnm:/mnt -t zsh -l

elm : install elm format extension

I have installed elm-format package (using amp install elm-format) and I want to run it from the command line , example elm-format mypage.elm
In order to run it from the command line it should be available in one of the environment path let's say usr/local/bin while the elm-format directory is installed in the following path Users/myuser/.atom/packages and none is available in env path
what should I move to the PATH (usr/local/bin) , is the whole folder or an executable file
note : when i run ls Users/myuser/.atom/packages/elm-format i get the followings :
CHANGELOG.md README.md keymaps menus src
LICENSE.md example lib package.json
I will answer my question since I have solved it.
first you have to install the elm-format binary file using your browser form the following URL
after installing the binary file extract it add the path to the environment path
for windows user add elm-format.exe or mac user add elm-format
since I am a mac user I used the below command to add it :
mv ~/Download/elm-format /usr/local/bin/elm-format
after installing the binary now we need to install elm-format extention for the appropriate editor
since I am using atom editor I have used the following command apm install elm -format
now we can used elm-format command line to format the elm page
command line : elm-format pagename.elm
According to npm website You could install elm-format by npm install -g elm-format.
For anyone using VS Code (on a Mac / Linux system):
1) Choose Download ZIP in the 'Clone or Download' dropdown on the elm-format Github repo.
2) To move the elm-format executable to your 'PATH', open the Terminal application and enter the following command:
mv ~/Downloads/elm-format /usr/local/bin/elm-format
3) Open VS Code and install the extension elm-format.
4) Still in VS Code, open User Settings. (Do this by pressing CMD + SHIFT + P to open the available commands search bar and type User Settings -- press enter. Alternatively, you can use the shortcut CMD + , to open the User Settings.)
5) In the file that shows up on the right side of the editor (your personal settings overrides), add the following line:
"elm-format.formatOnSave": true
Save.
Cheers!
For Atom configures: https://atom.io/packages/language-elm for Syntax highlighting and autocompletion, for auto format on saving https://atom.io/packages/elm-format
For the others IDE https://guide.elm-lang.org/install.html (VScode, Atom, Sublime, Vim,...)

How do I start Atom editor on dev mode?

I want to Modify ex-mode package
I tried below commands, but atom -d . does not work.
This command does not open atom window.
How can I open atom with dev mode?
Commands:
export ATOM_REPOS_HOME=~/github/atom
apm dev ex-mode
cd ~/github/atom/ex-mode
atom -d . # this command does not work
With atom --dev . you just open the folder that you are in in dev mode.
You will se a red message on the middle of the status bar.
If you want to modify the package you can copy into ~/.atom/dev/packages/<package-name> and you will be able to enable/disable both.

Why isn't my ZSH shell not changing the prompt?

I was using bash before switching to zsh.
On my ~/.zsh I have export PS1="\w ~ " but it is not making those changes to reflect the prompt. I want my prompt to show something like Documents/Rails_App/views ~
I have opened a new tab and closed re-opened the app.
The first level prompt of Zsh can be set in with either PROMPT, prompt or PS1.
Zsh uses other escapes than Bash. Most notably do they start with % not \. The equivalent to Bash's \w would be %~.
So just putting setting the following line in your ~/.zshrc should do the trick:
PROMPT='%~ ~'
Note: There is (usually) no need to export PROMPT in Zsh - or Bash for that matter.
If it does not work for you, it most likely has to do with Oh-My-Zsh as it already provides its own settings for PROMPT. So you have to make sure that you set PROMPT after Oh-My-Zsh has been sourced.
If you used the template that came with Oh-My-Zsh it should be after this line:
source $ZSH/oh-my-zsh.sh
On Debian distro.
After installing zsh from standard source apt install zsh comment #prompt adam1 inside .zshrc file and reload settings source ~/.zshrc.
Now add custom prompt: PROMPT='Greetings %n '
Image: zsh custom prompt
Use _PROMPT in zsh:
export _PROMPT='%d ~ '

Resources