All Questions

Tagged with
Filter by
Sorted by
Tagged with
3
votes
1answer
315 views

Zsh preexec - How to trim all leading indentations from a codeblock?

Say I copy the following codeblock from a .md handbook which incldes some information and a few codeblocks (hence it's not a script file): ⇨⇨⇨⇨( ⇨⇨⇨⇨Indented commands... ⇨⇨⇨⇨) The Zsh preexec ...
10
votes
4answers
3k views

Why does cut fail with bash and not zsh?

I create a file with tab-delimited fields. echo foo$'\t'bar$'\t'baz$'\n'foo$'\t'bar$'\t'baz > input I have the following script named zsh.sh #!/usr/bin/env zsh while read line; do <<&...
0
votes
1answer
493 views

Expand parameter in quotes in zsh

I want to pass function arguments to zsh’s emulate to evaluate a command in bash emulation: $ .bash() { emulate bash -c "$*" } $ .bash 'source /path/to/script.sh' It’s ok but I want this without ...
2
votes
3answers
1k views

How to sort filenames with spaces in them and concatenate the files?

I have the misfortune of dealing with filenames that contain spaces. I want to concatenate files of which filenames contain spaces. I also want to sort the filenames numerically. Obviously the ...
4
votes
1answer
413 views

Trailing spaces when copying from gnome-terminal using zsh

When copying text from gnome-terminal with zsh trailing whitespace is also copied. For example copying the following clearly adds a vertical scollbar on stackexchange site as trailing whitespace the ...