Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: insert a partial command into the command line
- X-seq: zsh-users 10454
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: insert a partial command into the command line
- Date: Wed, 28 Jun 2006 20:13:26 -0700
- In-reply-to: <04667443@xxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <04667443@xxxxxxxxxxxxxxxx>
On Jun 24, 3:24pm, Artem Chuprina wrote:
}
} xterm -e zsh -i -t
}
} and it will do the most valuable thing of this - allow me to write a
} command with completion and then exit. But I need to write all the
} command and manually add '&' to detach it.
Put this in your ~/.zshrc file:
if [[ -o interactive && -o single_command ]]
then
print -z "$*"
function auto-bg {
BUFFER="{ $BUFFER } &|"
zle .accept-line
}
zle -N accept-line auto-bg
fi
Now you run zsh like
xterm -e zsh -s -t -i "ssh some.host.name "
The -s is needed to prevent zsh from treating the argument as the name
of a script file.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author