0
votes
1answer
34 views

Must pass urls in quotes

I'm trying pass a URL to mpv for it to play it as a network stream. This can be done in bash with the following syntax: $ mpv http://myvideosite.com However, zsh wants to evaluate the URL as ...
16
votes
6answers
701 views

How to type several file names with fewer key strokes

If I want to convert a pdf to a png image with imagemagick I do something like: convert -trim -density 400 this_is_a_very_long_filename_of_my_pdf_file.pdf ...
0
votes
2answers
86 views

zsh: What does the command “time + number” do in zsh

When I type time + number in zsh: # atupal at local in /tmp/atupal/setup/bin [10:01:49] $ time 1 /tmp/atupal/setup/bin/lib/python2.7 # atupal at local in /tmp/atupal/setup/bin/lib/python2.7 ...
5
votes
1answer
81 views

Do not set $? to non-zero on Control+C

My $PS1 in Zsh includes this expression: %(?. %?.) It means «if exit code of previous command ($?) is true, show $?, else show nothing». This is generally useful, but one thing annoys me: shells set ...
2
votes
1answer
92 views

zsh - check arguments of a command before executing it

Question: Is there an easy way how I can teach zsh to check the command line before executing it? I know that I can completely wrap a specific program with an extra script, but this is not what I want ...
3
votes
2answers
270 views

Avoiding temporary files in zsh [duplicate]

Possible Duplicate: Shell programming, avoiding tempfiles Say I have the file data.txt, and the command cmd. cmd takes one argument, a file. Or, you could use stdin. Now, say data.txt is ...
3
votes
3answers
545 views

Fastest way to open all files in a directory with multiple file extensions on commandline

If I want to open all mp4 files in a directory, I can simply do something like totem *.mp4. But how can I open all mp4 and all flv files in that directory with one command. I.e. I want to do something ...
2
votes
2answers
364 views

Executing zsh rehash after build

I have a build script that can change what binaries are in my $PATH (it doesn't edit $PATH itself, but it adds/deletes files to folders that are already in $PATH). zsh's autocompletion doesn't update ...
7
votes
2answers
500 views

Shell Script for going through a dir recursively and chmodding based on conditions of file type

Can anyone point me to either code or a tutorial for writing a shell script that can recursively go through an entire directory structure (starting at the current working directory, or given an ...
2
votes
2answers
280 views

Shell Prompt Customization? [closed]

I have used oh_my_zsh (and tinkered with bash_it) on multiple systems and have generally been happy with it, though I hate it's auto-correction feature and generally turn it off. My usual shell is ...
13
votes
1answer
969 views

zsh Interpret/ignore commands beginning with '#' as comments

In bash, if I type a command beginning with a '#', bash ignores it as a comment. Ie, the following is ignored at the bash prompt: > # Hi there! Whereas in zsh: > # Hi there ! zsh: bad ...
1
vote
2answers
145 views

How to change the interpret of a variable in `zsh`?

I set a variable TEMPP='-I ../dir1 -I ../dir2' then I run gcc -M $TEMPP somefile.c It seems not to include ../dir1 and ../dir2 in the search list of the include file, and if there is a space at the ...
5
votes
5answers
330 views

Conflict between my prompt definition and cat in zsh

I have a file on a remote filesystem that I know has a short text string in it (a sequence of numbers in a single line). If I open the file on a text editor like nano or Emacs I can see the string. ...
2
votes
2answers
937 views

Home key not working in terminal

I am using GNOME Terminal 2.7.3 and zsh 4.3.9 (x86_64-unknown-linux-gnu) Home and End are not working. Nothing happens and nothing gets displayed when I press them. but they work when I press shift + ...
55
votes
9answers
2k views

Remember a half-typed command while I check something

I often find myself in the following position: I've started typing a long command at the bash prompt, but half-way through I find out I need to check something with another command. This is a problem ...
3
votes
3answers
758 views

Is there a way to make the prompt definition multiline?

This is my current prompt definition: PS1=$'%F{063}%1~%f %(1v.%F{099}%1v %f.)%F{063}%%%f ' RPROMPT='$VIMODE %m' and I'm working on integrating this. Basically I'm starting to find it very ...