1
0
mirror of https://github.com/Tarrasch/zsh-autoenv.git synced 2025-12-14 18:25:12 +02:00

Add helper functions for $PATH manipulation (#90)

This commit is contained in:
Daniel Hahler
2018-09-14 03:46:43 +02:00
committed by GitHub
parent 2c8cfbcea8
commit c60241f9d9
3 changed files with 70 additions and 0 deletions

29
tests/autoenv_utils.t Normal file
View File

@@ -0,0 +1,29 @@
Tests for provided utils/helpers.
$ source $TESTDIR/setup.zsh || return 1
$ PATH=
$ autoenv_prepend_path custom_path
$ echo $PATH
custom_path
$ autoenv_prepend_path custom_path
$ echo $PATH
custom_path
$ autoenv_prepend_path another_path a_third_one
$ echo $PATH
a_third_one:another_path:custom_path
$ autoenv_remove_path another_path a_third_one
$ echo $PATH
custom_path
$ autoenv_remove_path does_not_exist
[1]
$ echo $PATH
custom_path
$ autoenv_remove_path custom_path
$ echo PATH:$PATH
PATH: