I am trying to do something like
alias ftp='echo do not use ftp. Use sftp instead.'
just so that ftp
will not be accidentally used. But I noticed that
ftp abcd.com
will cause the command to echo
do not use ftp. Use sftp instead. abcd.com
because the abcd.com
is taken to be an argument for echo
.
Is there a way to make Bash not add abcd.com
to the substitution, or make echo
not take it as extra arguments? (Is there a solution for each approach?)
I supposed I could make it
alias ftp='sftp'
but I just want to make the command stop all together to remind myself not to use ftp
.
ftp
in different way, but if you'd like to do so - useprintf
instead ofecho
:printf "Do not use ftp. Use sftp instead.\n\c"
– Costas Nov 26 '14 at 11:00echo
to thesftp
alias? i.e.alias ftp='echo "Do not use ftp"; sftp'
. You'll get the reminder, while also being forced to usesftp
. – Josh Jolly Nov 26 '14 at 11:05ftp
– nonopolarity Nov 26 '14 at 11:14