Merge pull request #281 from erijo/zsh-tramp
This commit is contained in:
commit
c7a789c871
2 changed files with 10 additions and 7 deletions
14
yadm
14
yadm
|
@ -1004,13 +1004,17 @@ function enter() {
|
||||||
require_shell
|
require_shell
|
||||||
require_repo
|
require_repo
|
||||||
|
|
||||||
shell_opts=""
|
local -a shell_opts
|
||||||
shell_path=""
|
local shell_path=""
|
||||||
if [[ "$SHELL" =~ bash$ ]]; then
|
if [[ "$SHELL" =~ bash$ ]]; then
|
||||||
shell_opts="--norc"
|
shell_opts=("--norc")
|
||||||
shell_path="\w"
|
shell_path="\w"
|
||||||
elif [[ "$SHELL" =~ [cz]sh$ ]]; then
|
elif [[ "$SHELL" =~ [cz]sh$ ]]; then
|
||||||
shell_opts="-f"
|
shell_opts=("-f")
|
||||||
|
if [[ "$SHELL" =~ zsh$ && "$TERM" = "dumb" ]]; then
|
||||||
|
# Disable ZLE for tramp
|
||||||
|
shell_opts+=("--no-zle")
|
||||||
|
fi
|
||||||
shell_path="%~"
|
shell_path="%~"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1025,7 +1029,7 @@ function enter() {
|
||||||
[ "${#shell_cmd[@]}" -eq 0 ] && echo "Entering yadm repo"
|
[ "${#shell_cmd[@]}" -eq 0 ] && echo "Entering yadm repo"
|
||||||
|
|
||||||
yadm_prompt="yadm shell ($YADM_REPO) $shell_path > "
|
yadm_prompt="yadm shell ($YADM_REPO) $shell_path > "
|
||||||
PROMPT="$yadm_prompt" PS1="$yadm_prompt" "$SHELL" $shell_opts "${shell_cmd[@]}"
|
PROMPT="$yadm_prompt" PS1="$yadm_prompt" "$SHELL" "${shell_opts[@]}" "${shell_cmd[@]}"
|
||||||
return_code="$?"
|
return_code="$?"
|
||||||
|
|
||||||
if [ "${#shell_cmd[@]}" -eq 0 ]; then
|
if [ "${#shell_cmd[@]}" -eq 0 ]; then
|
||||||
|
|
3
yadm.1
3
yadm.1
|
@ -208,8 +208,7 @@ Emacs Tramp and Magit can manage files by using this configuration:
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
.RS
|
.RS
|
||||||
With this config, use (magit-status "/yadm::"). If you find issue with Emacs 27 and zsh,
|
With this config, use (magit-status "/yadm::").
|
||||||
trying running (setenv "SHELL" "/bin/bash").
|
|
||||||
.RE
|
.RE
|
||||||
.TP
|
.TP
|
||||||
.BI git-crypt " options
|
.BI git-crypt " options
|
||||||
|
|
Loading…
Reference in a new issue