Giter Club home page Giter Club logo

shx-for-emacs's Introduction

shx for Emacs

https://melpa.org/packages/shx-badge.svg https://stable.melpa.org/packages/shx-badge.svg https://github.com/riscy/shx-for-emacs/workflows/test/badge.svg

img/screenshot.png

Table of Contents

Description

shx or “shell-extras” extends comint-mode in Emacs (e.g. M-x shell).

It’s compatible with any underlying REPL (zsh, bash, psql, ipython, etc.).

It parses the output stream in a few useful ways:

  • Display graphics and plots in the shell with a simple markup language (e.g. <view image.png>)
  • Add event-driven and timed behaviors to any shell session
  • Open any filename or URL by arrowing up to it and pressing RET (shx will even try to guess the correct directory)
  • Yank any line to the prompt by arrowing up to it and pressing C-RET
  • Check the time a command was run by mousing over its prompt

shx makes it easy to add new shell commands written in elisp. Some are already built in:

  • :clear clears the buffer (like clear or Command-K on macOS)
  • :e filename.txt opens a file for editing
  • :ssh user@host:port starts a remote shell session using tramp
  • :view image_file.png embeds an image in the shell
  • :plotline data_file.txt embeds a line plot
  • etc.

It also extends shell-mode’s syntax highlighting, recenters and highlights content for better viewing when you run commands like comint-previous-prompt and comint-kill-input, and improves compatibility with evil-mode by anticipating when to switch to insert mode.

Use M-x shx RET to start a new shell session with shx-mode enabled.

This version is tested with Emacs 26.1. Check out the release log.

Install

From MELPA

M-x package-install RET shx RET to install shx from MELPA.

From GNU Guix

guix install emacs-shx to install shx from GNU Guix.

Manually

Add the following to your .emacs:

(add-to-list 'load-path "~/path/to/shx/") ; add shx.el's directory to the load-path
(require 'shx)                            ; load shell-extras

Setup

Quick-start

Type M-x shx RET. Try out the following commands:

  1. :e ~/.bashrc to edit your .bashrc (for example)
  2. :man ls to display the man page for ls
  3. :help to a start a completing read for other shx commands

Enable automatically

If you like shx-mode, you can enable it everywhere:

(shx-global-mode 1)  ; toggle shx-mode on globally

Now shx will run automatically in any comint-mode buffer. If you don’t want shx to run in every comint-mode buffer, you can use M-x shx-mode on a case-by-case basis, or just add hooks to the mode in question, for example:

(add-hook 'inferior-python-mode-hook #'shx-mode)

Customize

Use M-x customize-group RET shx RET to see shx’s many customization options. Here’s an example customization using setq:

(setq
  ;; resync the shell's default-directory with Emacs on "z" commands:
  shx-directory-tracker-regexp "^z "
  ;; vastly improve display performance by breaking up long output lines
  shx-max-output 1024
  ;; prevent input longer than macOS's typeahead buffer from going through
  shx-max-input 1024
  ;; prefer inlined images and plots to have a height of 250 pixels
  shx-img-height 250
  ;; don't show any incidental hint messages about how to use shx
  shx-show-hints nil
  ;; flash the previous comint prompt for a full second when using C-c C-p
  shx-flash-prompt-time 1.0
  ;; use `#' to prefix shx commands instead of the default `:'
  shx-leader "#")

Key bindings

Key bindingDescription
C-RETIf the cursor is not on the prompt, paste the current line to the input
RETIf the cursor is on a filename or a URL, try to open it
SPCIf the prompt is :, send SPC straight through to the process
qIf the prompt is :, send q straight through to the process

Note the prompt will be : when reading through the output of less or a man page if you run the following:

(setenv "LESS" "--dumb --prompt=s")

Markup in the shell

shx’s markup can enhance basic command-line applications and drive other events.

If the output ever contains <view mountains.png> on a line by itself, then a scaled rendering of mountains.png will be inlined within the text in the shell. This works because view is a shx command. shx will execute any (safe) shx command that appears with the following syntax:

<command arg1 arg2 ...>

where command is a shx command and arg1 ... argn is a space-separated list of arguments. Arguments don’t need to be surrounded by quotes – the command will figure out how to parse them.

You can use this markup to create a barplot (:plotbar) after collecting some stats, or generate an :alert when a task is finished, and so forth.

Extra shell commands

shx’s ‘extra’ commands are invoked by typing a : followed by the command’s name. (You can change the : prefix by customizing the shx-leader variable.) These commands are written in elisp and so can access all of Emacs’ facilities. Type :help to see a complete listing of shx commands.

One command I use frequently is the :edit (shorthand :e) command:

# edit the .emacs file:
:edit ~/.emacs

# use tramp to edit .emacs on a remote host through ssh:
:e /ssh:remote-host.com:~/.emacs

# use tramp to edit .bashrc on a running docker container:
:e /docker:02fbc948e009:~/.bashrc

# edit a local file as root
:sedit /etc/passwd

Thanks to CeleritasCelery it’s also possible to use environment variables in the argument list:

:e $HOME/.emacs.d

(To see an environment variable’s value, use (getenv "<var>").)

The :ssh and :docker commands are popular for opening “remote” shells:

# open a shell on a remote host:
:ssh [email protected]

# connect to a running docker container
:docker 8a8335d63ff3

# reopen the shell on the localhost:
:ssh

Jordan Besly points out that you can customize the default interpreter for each “remote” using connection-profile-set-local-variables.

I also use the :kept and :keep commands frequently:

# write a complicated command:
wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py

# save the last command:
:keep

# search for commands having to do with pip:
:kept pip

Because these commands are written in elisp, shx gives M-x shell a lot of the same advantages as eshell. You can even evaluate elisp code directly in the buffer (see :help eval).

General commands

CommandDescription
:alertReveal the buffer with an alert. Useful for markup
:clearClear the buffer
:dateShow the date (even when the process is blocked)
:diff file1 file2Launch an Emacs diff between two files
:edit fileEdit a file. Shortcut: :e <file>
:eval (elisp-sexp)Evaluate some elisp code. Example: :eval (pwd)
:find <filename>Run a fuzzy-find for <filename>
:goto-url <url>Completing-read for a URL
:header New headerChange the current header-line-format
:kept regexpShow a list of your ‘kept’ commands matching regexp
:keepAdd the previous command to the list of kept commands
:man topicInvoke the Emacs man page browser on a topic
:ssh <host>Restart the shell on the specified host

There are more than this – type :help for a listing of all user commands.

Graphical commands

CommandDescription
:view image_file.jpgDisplay an image
:plotbar data_file.txtDisplay a bar plot
:plotline data_file.txtDisplay a line plot
:plotmatrix data_file.txtDisplay a heatmap
:plotscatter data_file.txtDisplay a scatter plot
:plot3d data_file.txtDisplay a 3D plot

These are for displaying inline graphics and plots in the shell buffer. You can control how much vertical space an inline image occupies by customizing the shx-img-height variable.

Note convert (i.e. ImageMagick) and gnuplot need to be installed. If the binaries are installed but these commands aren’t working, customize the shx-path-to-convert and shx-path-to-gnuplot variables to point to the binaries. Also note these graphical commands aren’t yet compatible with shells launched on remote hosts (e.g. over ssh or in a Docker container).

Asynchronous commands

CommandDescription
:delay <sec> <command>Run a shell command after a specific delay
:pulse <sec> <command>Repeat a shell command forever with a given delay
:repeat <count> <sec> <command>Repeat a shell command <count> times
:stop <num>Cancel a repeating or delayed command

Use these to delay, pulse, or repeat a command a specific number of times. Unfortunately these only support your typical shell commands, and not shx’s extra (colon-prefixed) commands. So this possible:

# Run the 'pwd' command 10 seconds from now:
:delay 10 pwd

But this is not possible:

# Run the 'pwd' shx command 10 seconds from now (DOES NOT WORK)
:delay 10 :pwd

Adding new commands

New shx commands are written by defining single-argument elisp functions named shx-cmd-COMMAND-NAME, where COMMAND-NAME is what the user would type to invoke it.

Example: a command to rename the buffer

If you evaluate the following (or add it to your .emacs),

(defun shx-cmd-rename (name)
  "(SAFE) Rename the current buffer to NAME."
  (if (not (ignore-errors (rename-buffer name)))
      (shx-insert 'error "Can't rename buffer.")
    (shx-insert "Renaming buffer to " name "\n")
    (shx--hint "Emacs won't save buffers starting with *")))

then each shx buffer will immediately have access to the :rename command. When it’s invoked, shx will also display a hint about buffer names.

Note the importance of defining a docstring. This documents the command so that typing :help rename will give the user information on what the command does. Further, since the docstring begins with (SAFE), it becomes part of shx’s markup language. So in this case if:

<rename A new name for the buffer>

appears on a line by itself in the output, the buffer will try to automatically rename itself.

Example: invoking ediff from the shell

A command similar to this one is built into shx:

(defun shx-cmd-diff (files)
  "(SAFE) Launch an Emacs `ediff' between FILES."
  (setq files (shx-tokenize files))
  (if (not (eq (length files) 2))
      (shx-insert 'error "diff <file1> <file2>\n")
    (shx-insert "invoking ediff...\n")
    (shx--asynch-funcall #'ediff (mapcar #'expand-file-name files))))

Note that files is supplied as a string, but it’s immediately parsed into a list of strings using shx-tokenize. Helpfully, this function is able to parse various styles of quoting and escaping, for example (shx-tokenize "'file one' file\\ two") evaluates to ("file one" "file two").

Example: a command to browse URLs

If you execute the following,

(defun shx-cmd-browse (url)
  "Browse the supplied URL."
  (shx-insert "Browsing " 'font-lock-keyword-face url)
  (browse-url url))

then each shx buffer will have access to the :browse command.

Note the docstring does not specify that this command is SAFE. This means <browse url> will not become part of shx’s markup. That makes sense in this case, since you wouldn’t want to give a process the power to open arbitrary URLs without prompting.

Related

If you’re here, these might be interesting:

And if running a dumb terminal in Emacs isn’t for you, here are some alternatives:

shx-for-emacs's People

Contributors

celeritascelery avatar lafrenierejm avatar neeasade avatar riscy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shx-for-emacs's Issues

Fix gnuplot commands under Windows build of Emacs

Plotting shell commands can work under the Windows build of Emacs.

One requirement of course is to have gnuplot installed (either through MSYS or Cygwin, both got tested).

There is just a small specificity that would need to be changed to make shx compatible with this setup.

It has to do with quoting inside shx-insert-plot:

This line:

plot-command " \"" (shell-quote-argument filename) "\" "

Would have to be conditionally replaced with:

plot-command " " (shell-quote-argument filename) " "

This might have to do with the way shell-quote-argument behaves under windows:

(shell-quote-argument "aa")             ; => "\"aa\""

I've also attempted to play around with the value of w32-quote-process-args but did not end up with anything that works.

view image dont work on Windows because of builtin Windows 'convert'

after installing imagemagick successfully on Windows using scoop package manager, view cant show image because convert still points to Windows builtin convert.

image

by changing shx-path-to-convert to magick, we can show the image.

(setq shx-path-to-convert "magick")

image


another thing is that if we use magick convert instead of magick command according to installation notes:

'imagemagick' (7.1.1-33) was installed successfully!
Notes
'convert.exe' is deprecated in v7 (it also conflicts with the builtin Windows 'convert' utility). Use 'magick convert ...' instead.

magick will complain that:

WARNING: The convert command is deprecated in IMv7, use "magick"

however, using just magick is fine.

Use "helm find file" instead of "helm completion at point"

I'm using helm on spacemacs.
Is it possible to use helm find file at point instead of helm completion at point when using ls or cd commands at the prompt ?
helm find file at point is used for me when I want to open a file or directory with RET when arrowing up to it.
The helm find file at point is much more user friendly.

Empty prompts if window config changes

I'm sorry to post this issue here, but I'm desperately searching for advice.
I noticed that when I'm using zsh for shell-mode, each time the
window configuration changes, an empty prompt is spawned.
So leaving it opened in the background for some time results in a cluttered shell-buffer.
Strangely, this is not the case for bash.

I thought this is a good place to get help, since it gathers most shell-mode hackers.
I'm thankful for any advice. Feel free to close this immediately. Anyways, dank package!

MELPA?

Hi there,

Somehow I just stumbled across this package. This is very cool! Are you planning to submit it to MELPA?

Directory tracking over remote connection

If I am over ssh connection then :e <filename> is searching for the filename in the \tmp directory instead of the current directory. Is this a bug in my setup or is it desired?

I am on Emacs-27, Ubuntu 20.04. Installed the shx from Melpa and called it by M-x shx

Feature request :su and :ssh-sudo

for example, I can type:

C-xC-f /
/ssh:serv1|sudo:root@serv1:
RET

And immediately be tramp root on the remote server. Sudo is more useful than su in this case because not everyone has the root password on a remote server, but many people do have sudo -i access to root.

Additionally if we put in ~/.authinfo or ~/.authinfo.gpg sudo password credentials for the remote server,

machine serv1 login root port sudo password MYSUDOPASSWORD

and if in ~/.ssh/config we have something like,

Host serv1
HostName serv1.example.com
User MYUSERNAME

We can securely tramp as root on remote servers via sudo not needing a password or anything. It can be quite handy. I'd love to have this with a shell-mode shortcut similar to :ssh

In like manner,

:su would be nice for quickly becoming tramp root on your local machine, with e.g. something similar to,

(cd (concat "/su:" (system-name) ":"))
(shell)

and this would not require root's password again, if stored as follows in ~/.authinfo.gpg

machine HOSTNAME login root password MYPASSWORD

Ctrl-RET doesn't copy the command text; it tries to find a file (likely not a bug in shx)

Hi, I am trying out shx (cloned from gitlab today) with emacs 28.2. If I move point to an earlier command and press C-RET, I expected the text of that command to be copied to the current prompt. But instead I get "Find file or URL: ~/" in the minibuffer. To reproduce

% emacs -q
In the *scratch* buffer run

(add-to-list 'load-path "~/git_working/shx-for-emacs/")
(require 'shx)

Then M-x shx to start a new shell buffer. Wait for the prompt to appear and enter echo hello followed by RET. The command runs. Then C-p a couple of times to move up to the previous prompt, and C-RET. But instead of copying the echo hello text to the current prompt to run again, it thinks I want to open a file.

The buffer does have shx active, as shown by (Shell:run shx) at the bottom.

I thought maybe it was the prompt printed by the shell that wasn't being recognized, so I tried setting the PS1 environment variable to a plain %, but that didn't help. The shell buffer is fontifying the prompt text differently to the commands I entered and the output of those commands.

You know, I think I may have found the problem. But I'll post this bug report just in case, as a helper for anyone else hitting the same issue. If I do C-h k to describe the key sequence, then press C-RET, it tells me

RET runs the command shx-send-input-or-open-thing

That's RET, not C-RET, so somehow the Ctrl key is not getting through. This connecting to a Linux box from a Windows desktop with PuTTY.

shx does not seem to work in ielm buffers

I used m-x shx-global-mode, which interferes with m-x ielm.

ielm will behave very oddly, outputing streams of hex rather than doing anything useful.

Is there a way to inhibit shx-global-mode in ielm buffers?

shx can't display remote image files

Thank you for developing shx. It really makes emacs shell buffers better.

When I open a remote shell, I can't use the :view command to display an image. I get the following error

ubuntu@vdc:~$ :view Snowflake.png 
convert: unable to open image `/ssh:ubuntu@vdc:/home/ubuntu/Snowflake.png': No such file or directory @ error/blob.c/OpenBlob/2924.
convert: no images defined `/tmp/tmp4vDiai.png' @ error/convert.c/ConvertImageCommand/3229.

Because shx is trying to run convert locally but passing it a tramp file name.

Give the choice to respawn dead shell at remote location

Hello,

First of all, thanks for this really neat package. I'm using it daily and enjoying it.

I would like to propose a customization toggle for the behavior of respawning dead shell buffers.

I can submit a PR if you want, but would first like to propose the idea.

Current behavior

When the comint process in interactive shell buffer dies, shx makes it come back to life whihc is really handy.

This is handled by the first cond of shx-send-input.

The only problem is that when the shell was remote, it will respawn in a local shell instead.

Expected behavior

I understand that some users might want this behavior by default, but what I would personally expect is to have it respawned at the previous location (i.e. on the remote server).

I work daily with lots of remote server connections and have helper functions for connecting to them and naming the shell buffers according to the remote location.

I guess a var could be defined to let the user choose the behavior (respawn local or keep old location).

In the meantime, I have overridden shx-send-input in my own config to keep my sanity.

"shx.el passes byte-compilation" test fails on Emacs 29.1

Hi,

Currently, on GNU Guix (see: https://ci.guix.gnu.org/build/3331960/log/raw)

starting phase `check'
✔ shx-tokenize works with apostrophes.
✔ shx-tokenize works with partial apostrophes.
✔ shx-tokenize returns nil when quoting doesn't match.
✔ shx-tokenize works with apostrophes and quotation marks.
✔ shx-tokenize works with escaped spaces.
✔ shx-tokenize works with escaped quotation marks.
✔ shx-tokenize works with escaped characters
✔ shx-tokenize works with a directory specified.
✔ shx--safe-as-markup-p recognizes unsafe command
✔ shx--safe-as-markup-p recognizes a safe command
✔ shx--safe-as-markup-p handles undocumented command
✔ shx--replace-from-list acts sequentially
✔ shx--replace-from-list performs the correct replacements
✔ shx.el passes checkdoc
✔ shx-cmd-syntax recognizes command with arguments
✔ shx-cmd-syntax recognizes alphabetical command names
✔ shx-cmd-syntax recognizes hyphenated command names
✔ shx--quote-regexp matches escaped regexps correctly
✔ shx--quote-regexp matches unescaped regexps correctly

In toplevel form:
shx.el:99:2: Warning: custom-declare-variable `shx-max-input' docstring has wrong usage of unescaped single quotes (use \= or different quoting)

In shx-send-input-or-copy-line:
shx.el:168:47: Warning: ‘point-at-bol’ is an obsolete function (as of 29.1); use ‘line-beginning-position’ or ‘pos-bol’ instead.
shx.el:168:62: Warning: ‘point-at-eol’ is an obsolete function (as of 29.1); use ‘line-end-position’ or ‘pos-eol’ instead.

In shx--propertize-prompt:
shx.el:215:7: Warning: ‘point-at-bol’ is an obsolete function (as of 29.1); use ‘line-beginning-position’ or ‘pos-bol’ instead.

In shx--parse-output-for-markup:
shx.el:241:15: Warning: ‘point-at-bol’ is an obsolete function (as of 29.1); use ‘line-beginning-position’ or ‘pos-bol’ instead.
shx.el:242:15: Warning: ‘point-at-eol’ is an obsolete function (as of 29.1); use ‘line-end-position’ or ‘pos-eol’ instead.

In shx--search-forward:
shx.el:274:13: Warning: ‘point-at-eol’ is an obsolete function (as of 29.1); use ‘line-end-position’ or ‘pos-eol’ instead.

In shx-tokenize-filenames:
shx.el:354:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting)

In shx--current-prompt:
shx.el:381:11: Warning: ‘point-at-bol’ is an obsolete function (as of 29.1); use ‘line-beginning-position’ or ‘pos-bol’ instead.

In shx--current-input:
shx.el:390:5: Warning: ‘point-at-eol’ is an obsolete function (as of 29.1); use ‘line-end-position’ or ‘pos-eol’ instead.

In shx-insert-plot:
shx.el:578:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting)

In shx--shell-quote-no-quotation-marks:
shx.el:594:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting)

In shx--asynch-sentinel:
shx.el:661:15: Warning: ‘point-at-bol’ is an obsolete function (as of 29.1); use ‘line-beginning-position’ or ‘pos-bol’ instead.
shx.el:662:36: Warning: ‘point-at-eol’ is an obsolete function (as of 29.1); use ‘line-end-position’ or ‘pos-eol’ instead.

In shx-cmd-grep:
shx.el:842:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting)

In shx-flash-prompt:
shx.el:1152:59: Warning: ‘point-at-eol’ is an obsolete function (as of 29.1); use ‘line-end-position’ or ‘pos-eol’ instead.

In shx--with-shx-cwd:
shx.el:1176:35: Warning: ‘point-at-bol’ is an obsolete function (as of 29.1); use ‘line-beginning-position’ or ‘pos-bol’ instead.
✘ shx.el passes byte-compilation
✔ shx--shell-command finds the default shell
✔ shx--get-timer-list is empty
✔ shx--shx-timer-list grows by 1
✔ shx--get-timer-list becomes empty
✔ shx--shell-quote-no-quotation-marks escapes string
✔ shx-el passes check-declare-file
✔ shx-cat concatenates strings correctly
✔ shx-cat propertizes text correctly
✔ shx--get-user-cmd returns nil for empty string
✔ shx--get-user-cmd returns command with correct prefix
✔ shx-tokenize-filenames works with relative and absolute paths.
error: in phase 'check': uncaught exception:
%exception #<&invoke-error program: "emacs" arguments: ("--batch" "--quiet" "--script" "test/script.el") exit-status: 1 term-signal: #f stop-signal: #f> 
phase `check' failed after 0.6 seconds

This is happening using the latest commit of the master branch.

History commands for shx in a new session

Hi,

When opening a new shell session, it seems that shx never recalls the history of command lines entered before by pressing "Ctrl" and up, down arrow keys. The only command that I can get is :eval (shx-wordwrap 90)

Hence, I'd like to ask if shx supports such feature?

Thanks!

shx aliases?

Is there a way to create an shx-cmd-* that will allow me to send input to the shell afterwards? Essentially replacing the need to shell functions and aliases.

For example, If I want to set a tool path I could call shx-cmd-setpath with :setpath and then use Emacs superior functionality to find the tool path I want. after that I could send the proper environment variables to the shell.

I was looking into it, but couldn't seem to find a way to do this.

Add :asciibar shx command

Add an asciibar shx command that works like plotbar (q.v. the function shx-cmd-plotbar), but instead of embedding an image, it draws simple horizontal barplots to the console.

The output should be something like the following:

$ cat >| bar.dat
"Item 1": 3
"Item Two": 4
^D
$ :asciibar bar.dat
Item 1   ############
Item Two ################

Every input line is treated as command in history

When prompted by a command line program, the response ends up as a command in the command history of shx. For example, when I run sudo pacman -S file and type y to confirm the installation and then click the up button on my keyboard after the command is finished, y appears as a command. This is true for any prompt or anything that is interpreted by the command line app I've run.

Is there a reason for this? I'm wondering if it's on purpose or if it's an unintended effect.

Thank you

Parsing arguments in custom functions

I saw this on reddit and am super excited to try out this package! I did have one quick question though. I noticed that when writing your own shx functions it will take all the command line arguments present and put them in a big string. It is then the responsibility of the function to parse out the arguments. Why does it not pass the arguments as a list as one might expect? Is this a technical limitation?

Open file via mouse click

This shx-mode is so useful, thanks !
Just a newbie question, could it be possible to open files via (ctrl+) mouse-click ?
It is sometimes much quicker to do so.

:ssh input lag with company mode

If I use company-mode with :ssh my typing becomes delayed until the company completion frame pops up. Normally I have company set to pop up in 0.1 seconds but it takes about 5 seconds while using :ssh. When I am typing no text appears in this 5 second time frame.

I do not have any problems with company and shx when I am not using :ssh.

I do not have the same problem with auto-complete-mode.

If I turn off shx mode and use regular ssh from shell-mode, I do not have any delay and company works fine.

my company settings are very basic, this is all I have changed:

(setq company-idle-delay 0.1
      company-minimum-prefix-length 3
      company-show-numbers t)

Shx disable undo typing a command?

Hi,

I notice that after installing the shx package, I could not undo typing the current command. For example, in shell mode when typing ls *.txt, if I delete the text *.txt, I cannot undo it by undo (C-/). There is a message informs that "No undo information in this buffer"

I'd like to double check with you is this caused by shx?

Thank you!

request: change the behavior of :ssh

I'd like if the :ssh shx function would takeover the current buffer and inherit it's name rather than becoming a new buffer named *shx* -- do you think that is too opinionated?

shx-mode in eshell

Is there anyway to use shx-mode with eshell? When I run shx-mode in shell, I get this when I hit return which makes it unusable:
shx-point-on-input-p: Wrong type argument: processp, nil

feature request for :e -- understand tramp

it would be nice if :e when used in a tramp shell using an absolute path used the remote completion and file -- ie :e /etc/environment should be the remote file, not the local one.

ipython in shx with tramp

Hi,
I am not sure I am using shx in a proper way, but my use case is the following: I edit files on a remote machine using tramp. Once there, if I run shx, I get a shell on the remote machine, which is great.

However, sometimes I want to run ipython on this remote machine, but if I run it from shx, I don't get the proper ipython prompt and I get this message:

WARNING: your terminal doesn't support cursor position requests (CPR).

Is there a way to configure shx so that the ipyton shell works OK?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.