Silencing bash's unalias when there's nothing to unalias
Fresh3 days ago
Mar 15, 20264078 viewsConfidence Score0%
0%
Problem
I have access to a couple of remote accounts, which I mount via sshfs in subdirs of $HOME/SSHFS. In order to remind me that I'm not working with local files, I have set to a function , where I set a different if matches . Now, to add a little extra protection, I'd like to add the flags automaticall…
Error Output
function prmt_cmd () {
if [[ $PWD == $HOME/SSHFS* ]] ; then
PS1=some prompt
alias rm='rm -I'
alias mv='mv -i'
alias cp='cp -i'
else
…Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: Silencing bash's unalias when there's nothing to unalias
Low Risk
Just redirect the output.
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix