Skip to content
This repository was archived by the owner on Mar 22, 2021. It is now read-only.

Commit 8c56271

Browse files
committed
Remove pwd alias for currentdir
Name of the POSIX tool `pwd` is a shorthand for "print working directory". Using it as an alias for `currentdir` is misleading, as nothing is printed. Furthermore, `pwd` is sometimes used as a shorthand for the password database.
1 parent 1efe886 commit 8c56271

3 files changed

Lines changed: 0 additions & 10 deletions

File tree

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,6 @@ Returns:
113113
- A table of all entries in `directory` without the special entries (`.`
114114
and `..`).
115115

116-
### pwd {#system-pwd}
117-
118-
`pwd ()`
119-
120-
An alias for [`currentdir`](#system-currentdir)
121-
122116
### setenv {#system-setenv}
123117

124118
`setenv (var, value)`

src/Foreign/Lua/Module/System.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ pushModule = do
4242
addFunction "env" env
4343
addFunction "getenv" getenv
4444
addFunction "ls" ls
45-
addFunction "pwd" currentdir
4645
addFunction "setenv" setenv
4746
addFunction "tmpdirname" tmpdirname
4847
addFunction "with_tmpdir" with_tmpdir

test/system-module-tests.lua

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ assert(pcall(system.ls, 'README.md') == false)
3737

3838
-- currentdir
3939
assert(type(system.currentdir()) == 'string')
40-
-- pwd is an alias for currentdir
41-
assert(system.currentdir() == system.pwd())
42-
4340

4441
-- Complex scripts
4542
function in_tmpdir (callback)

0 commit comments

Comments
 (0)