fuck.bashrc: Added usage message to failure state
This commit is contained in:
parent
5d1b1c30e0
commit
1f63e97472
2 changed files with 8 additions and 1 deletions
|
@ -3,6 +3,9 @@ function fuck {
|
|||
local nth_last=${1:-1}
|
||||
if [[ "$nth_last" =~ ^[0-9]+$ ]]; then
|
||||
sudo $(fc -ln -$nth_last -$nth_last)
|
||||
else
|
||||
echo "Usage: fuck [offset]"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue