In the Sermon on the Mount, Jesus said, "Those who hunger and thirst for righteousness are blessed, for they will be filled. There is a natural progression from spiritual bankruptcy (Matthew 5:3) to spiritual repentance (5:4) to spiritual humility (5:5) to spiritual desire (5:6). Spiritual bankruptcy leaves no room for pride, so "righteousness" can't mean "self-righteousness." Instead, it means living according to the will of God. This is what D. A. Carson wrote:
The person who hungers and thirsts for righteousness, then, hungers and thirsts for conformity to God's will. He is not drifting aimlessly in a sea of empty religiosity; still less is he puttering about distracted by inconsequential trivia . . . He wants to be righteous, not simply because he fears God, but because righteousness has become for him the most eminently desirable thing in the world.
And the promise is that as we desire righteousness, we will be filled. It reminds me of the woman at the well. Her life was a bit of a disaster, but she kept on. When she met Jesus at the well (in the middle of the day to avoid the town gossips), she heard words of life. He told her about a better water than the kind in the bottom of that well. He said, "Whoever drinks from the water that I will give him will never get thirsty again - ever! In fact, the water I will give him will become a well of water springing up within him for eternal life."