一般形式
“~username”或“~+”或“~-”或“~N”或“~+N”或“~-N”。其中username指linux中用户的用户名,N代表数字。
注意点
- 如果username无效或tilde展开失败,则word保持不变
待完善
“~”展开为变量$HOME
“~/foo”展开为$HOME/foo
“~fred/foo”展开为用户fred家目录下的子目录foo
“~+”展开为变量$PWD的值
“-”展开为${OLDPWD-’-’}
“~N”展开为The string that would be displayed by ‘dirs +N’
“~+N”展开为The string that would be displayed by ‘dirs +N’
“~-N”展开为The string that would be displayed by ‘dirs -N’
网友评论