Improve uniq_path function
This commit is contained in:
@@ -78,7 +78,7 @@ function remove_path() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function uniq_path() {
|
function uniq_path() {
|
||||||
echo "$PATH" | tr ":" "\n" | awk '!seen[$0]++' | tr "\n" ":" | sed -r 's/:+/:/g' | sed -r 's/^:|:$//g'
|
path | awk '!seen[$0]++' | tr "\n" ":" | sed -r 's/:+/:/g' | sed -r 's/^:|:$//g'
|
||||||
}
|
}
|
||||||
|
|
||||||
function set_uniq_path() {
|
function set_uniq_path() {
|
||||||
|
|||||||
Reference in New Issue
Block a user