I want to make a custom function for displaying svn commits by user. Here is fish code for that.
function svn_log_by_user --description 'print svn commmits by user in current svn directory'
svn log | sed -n "/$argv/,/-----$/p" | more
end
But it has error like the one below:
fish: The '$' character begins a variable name. The character '/', which directly followed a '$', is not allowed as a part of a variable name, and variable names may not be zero characters long. To learn more about variable expansion in fish, type 'help expand-variable'.
Does anyone has idea for that?
Thanks in advance.
it's complaining about the line:
svn log | sed -n "/$argv/,/-----$/p" | more
^here
You need to escape the second $
, like so:
svn log | sed -n "/$argv/,/-----\$/p" | more