summaryrefslogtreecommitdiff
path: root/doc/execline-cd.html
blob: 18759d1ec0fb45fe43fd571d4f703b51041a8ee5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<html>
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 <meta http-equiv="Content-Language" content="en" />
 <title>execline: the execline-cd command</title>
 <meta name="Description" content="execline: the execline-cd command" />
 <meta name="Keywords" content="execline command cd chdir execline-cd" />
 <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> -->
</head>
<body>

<p>
<a href="index.html">execline</a><br />
<a href="//skarnet.org/software/">Software</a><br />
<a href="//skarnet.org/">skarnet.org</a>
</p>

<h1> The <tt>execline-cd</tt> program </h1>

<p>
<tt>execline-cd</tt> changes the current working directory to a
given directory, then executes a program.
</p>

<h2> Interface </h2>

<pre>
     execline-cd <em>dir</em> <em>prog...</em>
</pre>

<p>
<tt>execline-cd</tt> performs a
<a href="https://pubs.opengroup.org/onlinepubs/9699919799/functions/chdir.html">chdir()</a>
system call on <em>dir</em>, then execs into <em>prog...</em>.
</p>

<h2> Notes </h2>

<ul>
 <li> By default, <tt>execline-cd</tt> can also be invoked as <tt>cd</tt>:
there is a <tt>cd</tt> program which is a symbolic link to <tt>execline-cd</tt>. </li>
 <li> When execline has been configured with the <tt>--enable-pedantic-posix</tt>
option, the <tt>cd</tt> binary is a symbolic link to the
<a href="posix-cd.html">posix-cd</a> binary instead, so a <tt>cd</tt> command
in an execline script will invoke <a href="posix-cd.html">posix-cd</a> instead
of <tt>execline-cd</tt>. </li>
 <li> Existing scripts that call <tt>cd</tt> will keep working no matter the
chosen configuration. </li>
</ul>


</body>
</html>