Hi
If I have files "something1" and "something2" in a folder, how do I make ZSH's tab completion fill in only the common characters? For example, I would type:
som<Tab>
and I want it to fill in with "something", not "something1".
Current zstyles:
zstyle ':completion:*' special-dirs true
zstyle ':completion::complete:*' use-cache on...
Hello,
I work with some log system which creates a log file every hour, like follows:
SoftwareLog.2010-08-01-08
SoftwareLog.2010-08-01-09
SoftwareLog.2010-08-01-10
I'm trying to tail to follow the latest log file giving a pattern (e.g. SoftwareLog*) and I realize there's:
tail -F (tail --follow=name --retry)
but that only follow o...
Hi,
In Bash, I can use the following code:
[ "$sshcmd" = "" ] && sshcmd="ssh -someopts myhost"
$sshcmd "echo hello world"
In ZSH, the same code does not work because it tries to find a "ssh -someopts myhost" executable. How can I do the same thing in ZSH?
Thanks, Albert
...
I want to get a ZSH list from a line-separated output. In my case, from the following command:
ssh myhost ls /Applications
I tried $(ssh myhost ls /Applications) but that doesn't work (it splits also at spaces).
...
Hi,
I want to do sth. like this:
foo=(a b c)
foo-=b
echo $foo # should output "a c"
How can I remove an entry from an array? foo-=b does not work.
The removal should work no matter where the entry is.
...
For example, I have a=(1 2 3) and I want to get a=(foo1 foo2 foo3). What would be an easy/clean way to get that?
...
Code:
HOST=localhost
PORT=1234
RSYNCCMD="rsync -avP -e \"ssh -p $PORT\""
${(z)RSYNCCMD} root@$HOST:"\"/foo\"" /bar
Output:
rsync: Failed to exec ssh -p 1234: No such file or directory (2)
...
If I enter the same thing (rsync -avP -e "ssh -p 1234" ...) directly into the console, it works.
How do I fix it?
...
I just started using Zsh lately for some of the integrated support in the shell prompt for my Git status etc.
When I type in ruby -v, to confirm the version of ruby I'm running, Zsh asks if I want to change the command to _ruby. Well after saying no at the prompt and the command completing as expected I continue to get the question at t...
I use this alias in my .bashrc but doesn't seem to work in zsh using .zshrc. Other aliases I use are working fine so I know the .zshrc is source other aliases.
alias rubydev3="cd ~/code/ruby/rails/rails3projects/"
This is the error message:
cd:cd:10: no such file or directory: /home/jryan/code/ruby/rails/rails3tutorial/
I don't know...
hi,
i know this is probably a silly question. But i googled and searched here, didn't get answer.
in Bash, when I was typing a command, i press Ctrl+u, all characters from the beginning of the line to the cursor are gonna be removed. However, in zsh, if I pressed ctrl+u, the whole line is gone.
How to do the same in Zsh?
Thank you.
...
When using eshell or ansi-term and bash emacs changes the default-directory variable depending on what directory you are in.
So if I move to /home/user/code/project and then use ido-find-file to open a file it starts ido with the CWD. If I use ksh (my normal shell) or zsh (tried for testing) it doesnt work. Is there a setting or is this...
Zsh manual mentions that option -a means ALL_EXPORT,
ALL_EXPORT (-a, ksh: -a)
All parameters subsequently defined are automatically exported.
While export makes the variable available to sub-processes, the how can the same variable foo be local?
...
What is the best way to use zsh completion outside zsh? I know that I can redefine compadd builtin with custom function and parse its options, but is there a better way?
I want to add omni completion for shell scripts to Vim based on zsh completion system.
...
Hi All,
I have written a script that relies on other server responses (uses wget to pull data), and I want it to always be run in the background unquestionably. I know one solution is to just write a wrapper script that will call my script with an '&' appended, but I want to avoid that clutter.
Is there a way for a bash (or zsh) script...
Is there a way in zsh or bash to have a status line? e.g. in VI it will let you know that you are in insert mode with
-- INSERT --
Is there an eqivalent for the command line?
...
I would like the change my zsh prompt style for every virtualenv instances that i use or create.
My actual promp is like this:
declare PS1="%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}%3~
%{$reset_color%}"
When i activate a virtualenv it just add some an information before the prompt:...
Hi,
I want to execute following command in shell script
cp /somedire/*.(txt|xml|xsd) /destination/dir/
But this does not run inside shell script. Any quick help?
createjob.sh: line 11: syntax error near unexpected token `('
My shell is zsh.
Thanks
Nayn
...
I have the following python code:
import pty
import subprocess
os=subprocess.os
from subprocess import PIPE
import time
import resource
pipe=subprocess.Popen(["cat"], stdin=PIPE, stdout=PIPE, stderr=PIPE, \
close_fds=True)
skip=[f.fileno() for f in (pipe.stdin, pipe.stdout, pipe.stderr)]
pid, child_fd = pty.fork()...
I'm using cucumber to run some tests. It colorizes its output using ANSI escapes. This is great, but currently its producing more output than I care about, and shoving things I do care about off the screen. There doesn't seem to be a way to eliminate the other lines from within cucumber, but I can pipe the output through grep to pare ...
Zsh completion is a rather complex beast, and I find the man-page very difficult to read, especially it's missing (simple) examples of all the various optspec forms etc. I haven't managed to find anything online myself yet so help would be most appreciated.
As an example here's what I'm struggling with at the moment, and the zshcompsys...