Simple ZSH function and files with spaces in their name
问题 I have put the following function into my ~/.zshrc file: function note() { vim $HOME/Dropbox/$1.md } When I call it with note "20150209-132501-Recx-new note today.md" for example it creates a new file but with the file name "20150209-132501-Recx-new". I realise this is a simple question but how do I get it to create the note with the full name? 回答1: The shell performs parameter substitution and word-splitting in this order. This means you eventually execute vim /home/username/Dropbox/20150209