I have an alias that is set up like this.
alias X='`xclip -o --selection primary`'
now this works great if I just want to echo my clipboard value. But I would really like to be able to use it as an argument to other commands.
I've tried it as a function as well but that doesn't seem to work either.
I suppose i could store it just as a string and do
but I would prefer to avoid any syntax like that.
From what I've noticed thus far it doesn't seem like arguments get expanded at all it only seems to work if its the first thing typed.
I mean I know could
alias X="ssh xclip..." but I want this to work for every command not just ssh.
So I guess the question is how can I expand a single letter when it is a command argument?