no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | linux:shell_commands:up [2022/02/18 07:41] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== .bashrc up ====== | ||
+ | To cd up a certain number of times, add this to your .bashrc file | ||
+ | <code bash> | ||
+ | up() { | ||
+ | local d="" | ||
+ | local limit=" | ||
+ | if [ -z " | ||
+ | limit=1 | ||
+ | fi | ||
+ | |||
+ | for ((i=1; | ||
+ | d=" | ||
+ | done | ||
+ | |||
+ | if ! cd " | ||
+ | echo "Path shallower than $limit"; | ||
+ | fi | ||
+ | } | ||
+ | </ |