@@ -1191,31 +1191,35 @@ echo @foo@
11911191 <replaceable>file</replaceable>.</para></listitem>
11921192 </varlistentry>
11931193
1194−
1195− <varlistentry xml:id='fun-stripHash'>
1196− <term><function>stripHash</function>
1197− <replaceable>path</replaceable></term>
1194+ <varlistentry xml:id='fun-baseHash'>
1195+ <term>
1196+ <function>baseHash</function>
1197+ <replaceable>path</replaceable>
1198+ <replaceable>suffix</replaceable>
1199+ </term>
11981200 <listitem><para>Strips the directory and hash part of a store
11991201 path, storing the name part in the environment variable
1200− <literal>strippedName</literal>. For example:
1202+ <literal>strippedName</literal>. If <literal>suffix</literal> is also
1203+ provided, the suffix will also be removed. For example:</para>
12011204
12021205<programlisting>
1203−stripHash "/nix/store/9s9r019176g7cvn2nvcw41gsp862y6b4-coreutils-8.24"
1206+baseHash "/nix/store/9s9r019176g7cvn2nvcw41gsp862y6b4-coreutils-8.24"
12041207# prints coreutils-8.24
1205−echo $strippedName
12061208</programlisting>
12071209
1208− If you wish to store the result in another variable, then the
1209− following idiom may be useful:
1210−
12111210<programlisting>
1212−name="/nix/store/9s9r019176g7cvn2nvcw41gsp862y6b4-coreutils-8.24"
1213−someVar=$(stripHash $name; echo $strippedName)
1211+baseHash "/nix/store/0016702zbydafsr20n9l1dcw7x2bf6jj-arraysugar-0.1.0.gem" .gem
1212+# prints arraysugar-0.1.0
12141213</programlisting>
1214+ </listitem>
12151215
1216− </para></listitem>
12171216 </varlistentry>
12181217
1218+ <varlistentry xml:id='fun-stripHash'>
1219+ <term><function>stripHash</function>
1220+ <replaceable>path</replaceable></term>
1221+ <listitem><para>Deprecated. Use baseHash instead.</para></listitem>
1222+ </varlistentry>
12191223
12201224</variablelist>
12211225