I run unsuccessfully in my .zshrc
unalias rm
rm() { mv $* /tmp/wastebasket }
I get at the startup
/Users/Masi/.zshrc:unalias:34: no such hash table element: rm
I noticed that the hash table problem has been an unresolved bug in Ubuntu for run-help.
I am not sure whether the bug applies to Mac and to rm -command too.
How can you ...
I put the following to my .zshrc
if [[ $STY = '' ]] then screen -xR; fi
I get Bash when I start terminal now, although I have /bin/zsh at Terminal > Settings in Mac.
Which variable do I need to change to make Zsh my login shell in Screen?
...
I have the following code in my .Zshrc
function google; {
$VIEW "http://www.google.com/search?q='url-encode "${(j: :)@}"'"
}
I get
google masi
google:1: no such file or directory: http://www.google.com/search?q='url-encode masi'
How can you get Google Search to work in Zsh...
I have File1
A,B,C
and File2
D,E,F
I am trying to have
AD, AE, AF, BD, BE, BF, CD, CE, CF
unsuccessfully by
echo {`cat File1`}{`cat File2`}
giving
{A,B,C}{D,E,F}
How can you solve the problem by Zsh/AWK?
...
Problem: to understand the following timestamp
1241036430
at ~/.history
: 1241036336:0;vim ~/.zshrc
: 1241036379:0;vim ~/bin/HideTopBar
: 1241036421:0;ls
: 1241036430:0;cat ~/.history
when I have
setopt EXTENDED_HISTORY
HISTFILE=~/.history
in .zshrc.
How can you read the timestamp?
...
The following command gives many manuals of Zsh
man zsh<tab>
I would like to browse them fast to search the word compinit.
How can you search the word compinit fast in the manuals in Zsh?
...
I run the following code
zgrep -c compinit /usr/share/man/man{1..9}/zsh*
I get
zsh: no matches found: /usr/share/man/man2/zsh*
This is strange, since the following works
echo Masi{1..9}/masi
This suggests me that the problem may be a bug in Zsh.
Is the above a bug in Zsh for {1..9}?
...
I have the following system variable in .zshrc
manuals='/usr/share/man/man<1-9>'
I run unsuccessfully
zgrep -c compinit $manuals/zsh*
I get
zsh: no matches found: /usr/share/man/man<1-9>/zsh*
The command should be the same as the following command which works
zgrep -c compinit /usr/share/man/man<1-9>/zsh*
How can you run the ...
I get the following in including MacPorts' Bash tab completion to Zsh
/opt/local/etc/bash_completion:[:48: unrecognized condition: `2'
[ -- cut -- ]
/opt/local/etc/bash_completion:[:62: unrecognized condition: `2'
/opt/local/etc/bash_completion:69: command not found: shopt
[ -- cut -- ]
/opt/local/etc/bash_completion:3015: command not f...
I put unsuccessfully Zsh installed by MacPorts as my login shell by setting the following path to Settings
/opt/local/bin/zsh
I put it to the Advanced options at the User accounts too. I get the following error
I put the following path unsuccessfully to Settings
/opt/local/var/macports/software/zsh/4.2.7_0+mp_completion
I get the...
I know the article which code does not work for me. I have pasted all its codes to my .zshrc.
I have the following code in my .Zshrc
RPROMPT='%{\[0;33m%}%1v%{\[0m%}'
It should indicate whether you have jobs or not. However, it does not do that for me.
I would like to get a X to the right prompt to indicate that you have a job open.
...
Problem: to navigate backwards with TAB in Zsh similarly as in Firefox by
Shift-TAB
Example of what Shift-TAB should do
I run the following code in terminal
ls <TAB>
I get
A B C D E F G H I J K H L M N...
I see the following in Zsh as I press TAB
I navigate to the folder J by TAB. Then, I observe that I pressed once too ofte...
I have the following in .zshrc
setopt multios
I am trying to do the following with the above option enabled in Zsh
ls -1 | tee file.txt | less
I run the following command unsuccessfully
ls -1 | file.txt | less
and the following too
ls -1, file.txt, less
How can you use multiple outputs in Zsh without the command tee?
...
I want my Zsh to be Dvorak friendly in Screen.
I am trying to make the following bindings in Zsh such that I can use them in Ctl-a Esc mode in moving
h => d
j => l
k => t
l => n
I have not yet found any ways to do that.
How can you make the following keybindings in Screen, such that I can use them in the mode C-A Esc?
...
Penz says that the problem could be solved by Multios and coproc features in the thread.
However, I am unsure about the solution.
I do know that you can use multios as
ls -1 > file | less
but I have never used such that you have two inputs.
How can you use these features to have a pipe loop in Zsh?
...
Zsh has the following keyboard shortcut for Man
Esc-h
I would like to have a similar keyboard shortcut for info such as
Esc-i
How can you make such a keyboard shortcut for Info?
...
I get the following when I start my Zsh.
Usage: prompt <options>
Options:
-c Show currently selected theme and parameters
-l List currently available prompt themes
-p [<themes>] Preview given themes (defaults to all)
-h [<theme>] Display help (for given theme)
-s <theme> Set and sa...
I work in a place that has gazillions of tools which require tons of options, so I rely on my shell's history significantly. I even back it up every now and then just to make sure I don't lose useful, lengthy commands.
I just typed one of these commands and I want to make sure it's flushed to the history file, but I have a long-running ...
Problem: to have a tab completion which takes two words and calculates the best match from them for Man, and then returns the best matches
Example: The following pseudo-code should give me at least Zsh's reverse-menu-complete -command. Right now, I cannot search manuals inside manuals without zgrep.
man zsh:reverse <TAB>
where ":" is...
The code in my Zsh
#!/bin/zsh
q=$1
open "http://mathworld.wolfram.com/$q.html"
I put the input to the app
triangle
I get an error at Wolfram, since the first letter must be a big one.
How can you change the case for the first letter in the variable q?
...