Show HN: Bish – Shell scripting with a modern feel
1–10 of 44 posts
Re: Show HN: Bish – Shell scripting with a modern feel
#2Re: Show HN: Bish – Shell scripting with a modern feel
#3Why not fish (friendly interactive shell)?
It feels like bish is trying to make using bash as a programming language tolerable.
Re: Show HN: Bish – Shell scripting with a modern feel
#4 for (f in files) {
print(f);
}
}# cwd, ls, and cd are all builtin functions.
dir = cwd();
files = ls();
print("Files in current directory $dir:");
printall(files);
cd("/");
files = ls();
print("Files in root directory:");
printall(files);
Whats wrong with this, much shorter Bash sequence:
echo Files in current directory `pwd`:
ls
cd /
echo Files in root directory:
ls
Re: Show HN: Bish – Shell scripting with a modern feel
#5def printall(files) { for (f in files) { print(f); } } # cwd, ls, and cd are all builtin functions. dir = cwd(); files = ls(); print("Files in current directory $dir:"); printall(files); cd("/"); files = ls(); print("Files in root directory:"); printall(files); Whats wrong with this, much shorter Bash sequence: echo Files in current directory `pwd`: ls cd / echo Files in root directory: ls
Re: Show HN: Bish – Shell scripting with a modern feel
#6Why not fish (friendly interactive shell)?
Not the OP, but I was under the impression that fish de-emphasizes shell scripting/programming and puts more emphasis on the interactive experience. It feels like bish is trying to make using bash as a programming language tolerable.
Re: Show HN: Bish – Shell scripting with a modern feel
#7def printall(files) { for (f in files) { print(f); } } # cwd, ls, and cd are all builtin functions. dir = cwd(); files = ls(); print("Files in current directory $dir:"); printall(files); cd("/"); files = ls(); print("Files in root directory:"); printall(files); Whats wrong with this, much shorter Bash sequence: echo Files in current directory `pwd`: ls cd / echo Files in root directory: ls
[1] https://github.com/yramagicman/dotfiles/blob/master/bin/upda...
Re: Show HN: Bish – Shell scripting with a modern feel
#8def printall(files) { for (f in files) { print(f); } } # cwd, ls, and cd are all builtin functions. dir = cwd(); files = ls(); print("Files in current directory $dir:"); printall(files); cd("/"); files = ls(); print("Files in root directory:"); printall(files); Whats wrong with this, much shorter Bash sequence: echo Files in current directory `pwd`: ls cd / echo Files in root directory: ls