#shelltip — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #shelltip, aggregated by home.social.
-
filename_without_extension="${filename%.*}"
https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html
-
@pfm not to brag (too much) but I'm well beyond that point :D I implemented a small system of fav directory, where each of them gets an alias https://gist.github.com/maxlath/724d015d0144880824c3a65482a38e25
-> that's the simple version, mine also has `before cd` and `after cd` hooks, where I typically `ls` or start a server, etcI'm not sure I would have implemented it back in the days if I had knew #autojump existed though https://github.com/wting/autojump
-
[#shelltip of the day]
cd to/some/very/annoyingly/long/path
# accidentally cd to home directory
cd# cd back to that previous directory
cd -