Problem: to combine PATHs with filenames, such that I can easily source many files.
I have two files A and B. ls gives their names clearly.
I run
pwd `ls`
I get the error message
too many arguments
I did not find an option for pwd which would allow me to have more than one argument.
How can you combine pwd's output to filenames....
I found the following command in Bash which Zsh does not have in the same buttons at the thread.
Ctrl-x-e
It opens the current input in terminal to an editor.
How can you have the same command in Zsh?
...
I need to print the following sequence for illustration purposes in two columns
a-z
which has alphabets from a to z such that they are in 13-character columns.
How can you echo the characters from a to z into two columns?
...
I have the following code which should put programs startable in Bash.
if [ "`uname`" = "Darwin" ]; then
compctl -f -x 'p[2]' -s "`/bin/ls -d1 /Applications/*/*.app
/Application:/*.app | sed 's|^.*/\([^/]*\)\.app.*|\\1|;s/ /\\\\ /g'`"
-- open
alias run='open -a'
fi
However, it does not work in my Zsh at all. I ...
I put the newest git-completion.bash to my .zshrc and I get
/Users/Masi/bin/shells/git/git-completion.bash:2116: command not found: complete
/Users/Masi/bin/shells/git/git-completion.bash:2118: command not found: complete
The lines are
complete -o bashdefault -o default -o nospace -F _git git 2>/dev/null \
|| complete -o defaul...
I have been in love with zsh for a long time, and more recently I have been discovering the advantages of the ipython interactive interpreter over python itself. Being able to cd, to ls, to run or to ! is indeed very handy. But now it feels weird to have such a clumsy shell when in ipython, and I wonder how I could integrate my zsh and m...
I get the following messages often, for instance when coping dev files to a master branch
cp: /Users/Masi/gitHub/shells/zsh/dvorak: No such file or directory
cp: /Users/Masi/gitHub/shells/zsh/dvorak2: No such file or directory
I would like to be asked about the creation of the given folders such that my initial command will be run if ...
So I recently made an .app wrapper for a zsh script, but when I run it, the icon for the app keeps hopping in the Dock.
The app is basically:
% find Example.app -type f
Example.app/Contents/Info.plist
Example.app/Contents/MacOS/wrapper.sh
% cat Example.app/Contents/Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLI...
Sorry if my google fu is too weak, but: I simply want to adjust zsh so that I can tab complete
someappname -s
using the contents (filenames) of ~/somedir
For example:
someapp -s f<tab>
should cycle through completions based on the files starting with the letter f in ~/somedir . So I might end up with a command line like: "someapp...
Torvalds seems to have the following prompt.
[torvalds@g5 git]$
The first word is username. g5 seems to be a branch in Git repo, while git shows that it is a branch in Git.
My current prompt
PROMPT="$"
How can you have a similar prompt as Torvalds'?
...
One recommends me the following code apparently only in .zshrc without explaining its purpose clearly.
typeset -U PYTHONPATH
I am interested in how you can use the code in .bashrc. My Bash goes upset about the command.
How can you use the command in Bash?
...
I run the following codes separately as my prompt unsuccessfully in .zshrc. This suggests me that apparently I do not have a program called __git_ps1. It is not in MacPorts.
#1
PROMPT="$(__git_ps1 " \[\033[1;32m\] (%s)\[\033[0m\]")\$"$
#2
PROMPT="$(__git_ps1 " (%s)")\$"$
#3
# Get the name of the branch we are on
git_prompt_i...
This question is based on the thread.
I have the following Git-prompt at the moment.
I get the following warning after cding to a non-Git folder.
fatal: Not a git repository (or any of the parent directories): .git
fatal: git diff [--no-index] takes two paths
fatal: Not a git repository (or any of the parent directo...
In my .zshrc I've set up suffix completion aliases like this so that I can open files more easily:
alias -s -- txt='mate -w'
Which allows me to open text files in my text editor without prepending the editor command.
There is a problem, however, when I am attempting to open a file with a capitalized suffix. ZSH will recognize '.txt' ...
I've inherited a zsh script which sets up a bunch of environment variables for some simulations. It wants to edit the $path variable so that some perl scripts can be found:
typeset -U path
path=( ${SIMENV_BIN} $path )
However, when I source the script (source setup.source) the $path variable remains untouched. If I copypaste these li...
I have a C program that displays it's command-line by iterating through the argv variable.
#include <stdio.h>
int main(int argc, char *argv[]){
int i = 0;
printf("----------\n");
for(i = 0; i < argc; i++)
printf("%s\n", argv[i]);
return 0;
}
I invoked the program in a folder containing a large C++ source tree lik...
How can you get similar highlightings to Zsh's Less than Bash's Less in Ubuntu?
I switched from OS X to Ubuntu. My Less do not work as expected in Zsh.
Manuals in my Less are green and black with or without the following code.
# comment these out in Ubuntu
export LESS_TERMCAP_mb=$'\E[01;31m' # begin blinking
exp...
When zsh is set as a login shell on Mac OS X, when it is started by iTerm, zsh doesn't consider that it's being run as a login shell, although it's started as ‘-zsh’ (‘-’ is put as the first character of arg[0]) which is supposed to mean that it should start as a login shell.
So, when I set the login shell to bash, bash recognizes this ...
In my quest to configure my shell to work exactly how I want it with respect to the alt/meta key I am having some trouble. Recently I added "bindkey -m" to my .zshrc and now whenever I start a zsh shell (ie open a terminal window) I get this error "warning: `bindkey -m' disables multibyte support".
Now since I don't care much about mult...
First, let me state that this is a programming question (and thus does not belong on superuser et. al.) because I'm talking shell programming. This could almost be a golf question, but I do not have an answer to begin with, so any help would be appreciated :-)
So, the story is: I like to pipe stuff into less with the --quit-if-one-scree...