shell - cd from zsh displays wrong name of cwd (~variable) -
i have shell script run via alias in zsh
using alias wd=". /path/to/wd"
. script executes ruby
program , cd
s output of it. works, after cd
command, directory shows "~result" instead of actual name.
a simplified version of shell script follows
#!/bin/sh result=$(ruby engine.rb $*) cd $result
it has cd using variable, "result", that's name gets.
if if change directory , wrong name still used.
tried bash
works correctly, zsh
issue.
this appears case of static named directory being used. because value of result
path (presumably) beginning /
, zsh
using variable "name" of path , abbreviating when displays full path in prompt. see man zshexpn
under "static named directories" details.
Comments
Post a Comment