2020-05-10 01:38:07 +03:00
|
|
|
@mesg '-------------pwd-------------'
|
|
|
|
|
2020-05-09 08:48:35 +03:00
|
|
|
function _pwd -a dir
|
|
|
|
cd $dir
|
2020-05-19 06:03:25 +03:00
|
|
|
tide_decolor (_tide_pwd)
|
2020-05-09 08:48:35 +03:00
|
|
|
end
|
2020-05-05 00:22:08 +03:00
|
|
|
|
2020-05-19 06:03:25 +03:00
|
|
|
set -l unwr "$tide_pwd_unwritable_icon "
|
2020-05-05 00:22:08 +03:00
|
|
|
|
2020-05-16 02:27:26 +03:00
|
|
|
@test '/' (_pwd '/') = $unwr'/ '
|
|
|
|
@test '/usr' (_pwd '/usr') = $unwr'/usr '
|
|
|
|
@test '/usr/share' (_pwd '/usr/share') = $unwr'/usr/share '
|
|
|
|
@test '~' (_pwd "$HOME") = '~ '
|
|
|
|
@test '~/.config' (_pwd "$HOME/.config") = '~/.config '
|
|
|
|
@test '~/.config/fish' (_pwd "$HOME/.config/fish") = '~/.config/fish '
|
2020-05-05 00:22:08 +03:00
|
|
|
|
2020-05-09 08:48:35 +03:00
|
|
|
set -l longDir "$HOME/alfa/bravo/charlie/delta/echo/foxtrot/golf/hotel/inda/juliett/kilo/lima/mike/november/oscar/papa"
|
|
|
|
if not test -e $longDir
|
|
|
|
mkdir -p $longDir
|
2020-05-05 00:22:08 +03:00
|
|
|
end
|
2020-05-16 02:27:26 +03:00
|
|
|
@test 'Long dir' (_pwd "$longDir") = '~/a/b/c/d/e/f/golf/hotel/inda/juliett/kilo/lima/mike/november/oscar/papa '
|
2020-05-09 08:48:35 +03:00
|
|
|
rm -r $longDir
|