Shunpo: Minimalist bash tool to make directory navigation a little bit faster
1–10 of 54 posts
Re: Shunpo: Minimalist bash tool to make directory navigation a little bit faster
#2The only thing I'm missing from zsh is path aware auto completion... supposedly this works if you enable the sqlite history for nushell but iirc it was buggy.
Re: Shunpo: Minimalist bash tool to make directory navigation a little bit faster
#3Re: Shunpo: Minimalist bash tool to make directory navigation a little bit faster
#4syntax:
projects
alias: function projects() {
if [ -z "$1" ]; then
echo "please provide a project name"
return
fi
local allMatches=$(find ~/Documents/projects -maxdepth 2 -type d -name "*$1*" -print)
local firstMatch=$(echo "$allMatches" | head -n ${2:-1} | tail -n 1)
if [ -z "$firstMatch" ]; then
echo "no matches found"
return
else
if [ $(echo "$allMatches" | wc -l) -gt 1 ]; then
echo "matches found:"
echo "$allMatches" | awk '{print NR ") " $0}'
fi
cd "$firstMatch"
fi
}Re: Shunpo: Minimalist bash tool to make directory navigation a little bit faster
#5I really like "jump" which I have aliased to "j". It auto learns and you can also pin shortcut names so I don't have to fuss configuring it but also can control certain ones. Great trade off between usability and configurability. Can't find the repo but "brew install jump" works :)
Personally, I've been using z (https://github.com/rupa/z>) for ages and never really needed more.
Re: Shunpo: Minimalist bash tool to make directory navigation a little bit faster
#6Re: Shunpo: Minimalist bash tool to make directory navigation a little bit faster
#7 devhome () {
cd $DEV_HOME/${~1}(/)
}
This assumes an environment variable DEV_HOME is assigned to be the location of the top-level directory for a given project. An example of its use is: devhome mod*/foo/src/**/some-dir
0 - https://www.zsh.org/Re: Shunpo: Minimalist bash tool to make directory navigation a little bit faster
#8https://github.com/zsh-users/zsh-autosuggestions?tab=readme-...
Re: Shunpo: Minimalist bash tool to make directory navigation a little bit faster
#9I have a utility called ZSH Autosuggestions, and it's probably one of the most useful things on my computer. It shows you a sort of preview of the most recent command you typed that matches the prefix of the current command you are typing. It's basically an automatic tool that bookmarks commands based on usage. I think the best bookmark systems are ones which simply track your entire history and suggest relevant page…
Auto completion, abbreviations, better syntax, and especially the auto complete is like magic. It also seems to "know" in which working directories some commands work and won't suggest them if they arent.
Re: Shunpo: Minimalist bash tool to make directory navigation a little bit faster
#10I have a utility called ZSH Autosuggestions, and it's probably one of the most useful things on my computer. It shows you a sort of preview of the most recent command you typed that matches the prefix of the current command you are typing. It's basically an automatic tool that bookmarks commands based on usage. I think the best bookmark systems are ones which simply track your entire history and suggest relevant page…
This is essentially a fish built-in. I used to use zsh before, but since changing to fish I've never looked back. Auto completion, abbreviations, better syntax, and especially the auto complete is like magic. It also seems to "know" in which working directories some commands work and won't suggest them if they arent.
Extremely useful on a daily basis.