<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://forum.ubuntu-fr.org/extern.php?action=feed&amp;tid=361237&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Forum Ubuntu-fr.org / [ALIAS]Probleme lors de creation d'alias cd]]></title>
		<link>http://forum.ubuntu-fr.org/viewtopic.php?id=361237</link>
		<description><![CDATA[Les sujets les plus récents dans [ALIAS]Probleme lors de creation d'alias cd.]]></description>
		<lastBuildDate>Tue, 24 Nov 2009 23:43:15 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Réponse à&#160;:  [ALIAS]Probleme lors de creation d'alias cd]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3094005#p3094005</link>
			<description><![CDATA[<div class="codebox"><pre class="vscroll"><code># Auto-generated file. DO NOT EDIT
if [[ &quot;x$BASH&quot; == &quot;x&quot; ]]; then
	# Do not run in zsh or other shells
	return
fi

function __autopackage_addBashPath
{
	local name=$1
	local path=$2
	local append=$3
	local kind
	local tmp
	local array
	declare -a array

	local IFS=&#039;:&#039;
	array=(${!name});
	for DIR in &quot;${array[@]}&quot;; do
		if [[ &quot;$DIR&quot; = &quot;$path&quot; ]]; then
			return 0
		fi
	done

	if [[ &quot;${!name}&quot; = &quot;&quot; ]]; then
		eval &quot;export $name=\&quot;$path\&quot;&quot;
	elif $append; then
		eval &quot;export $name=\&quot;$path:\$$name\&quot;&quot;
	else
		eval &quot;export $name=\&quot;\$$name:$path\&quot;&quot;
	fi
	return 0
}

__autopackage_addBashPath &quot;PATH&quot; /home/n3o/.local/bin false</code></pre></div><p>?????? <img src="http://forum.ubuntu-fr.org/img/smilies/roll.png" width="15" height="15" alt="roll" /> je vois pas ?</p>]]></description>
			<author><![CDATA[dummy@example.com (n3o51)]]></author>
			<pubDate>Tue, 24 Nov 2009 23:43:15 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3094005#p3094005</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [ALIAS]Probleme lors de creation d'alias cd]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3093907#p3093907</link>
			<description><![CDATA[<p>Merci pour tes précisions <img src="http://forum.ubuntu-fr.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (n3o51)]]></author>
			<pubDate>Tue, 24 Nov 2009 22:53:21 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3093907#p3093907</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [ALIAS]Probleme lors de creation d'alias cd]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3093878#p3093878</link>
			<description><![CDATA[<div class="codebox"><pre><code> 
 
[[ -f &quot;/home/n3o/.config/autopackage/paths-bash&quot; ]] &amp;&amp; . &quot;/home/n3o/.config/autopackage/paths-bash&quot;</code></pre></div><p>Exécute le fichier paths-bash si et seulement si il existe. A toi de regarder ce que ce fichier contient.</p>]]></description>
			<author><![CDATA[dummy@example.com (FRUiT)]]></author>
			<pubDate>Tue, 24 Nov 2009 22:44:24 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3093878#p3093878</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [ALIAS]Probleme lors de creation d'alias cd]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3093855#p3093855</link>
			<description><![CDATA[<p>Pour cd :</p><p>la commande &#039;builtin&#039; ne marche que dans bashrc. Tu dois faire une fonction &#039;cd&#039; dans bashrc et non dans les alias.</p><div class="codebox"><pre><code> 
 
function cd ()
{
  builtin cd &quot;$*&quot; &gt; /dev/null 2&gt;&amp;1
  case $? in
    0) env echo -e &quot; \033[32m$(\pwd) \033[0;0m($(($(\ls -l | wc -l)-1)) items)&quot; ;;
    *) return $? ;;
  esac
}</code></pre></div><p>Dans ce cas la commande &#039;builtin cd&#039; sert à indiquer que tu souhaites utiliser la commande interne bash &#039;cd&#039; et non appeler récursivement ta fonction (nommée également &#039;cd&#039; pour overrider la commande interne).</p>]]></description>
			<author><![CDATA[dummy@example.com (FRUiT)]]></author>
			<pubDate>Tue, 24 Nov 2009 22:38:45 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3093855#p3093855</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [ALIAS]Probleme lors de creation d'alias cd]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3093778#p3093778</link>
			<description><![CDATA[<div class="codebox"><pre><code>cd() {
builtin cd &quot;$@&quot; &amp;&amp; echo &quot; \(wd now: $PWD&quot;&#039;
}</code></pre></div><p>celaresoud mon probéme par contre pourquoi cela ne fonctionne pas c&#039;est la méme chose peut-etre <img src="http://forum.ubuntu-fr.org/img/smilies/smile.png" width="15" height="15" alt="smile" />&#160; ?</p><p>EDIT : oui effectivement a retenir <strong>builtin</strong> j&#039;ai essayé de trouvé ce que c&#039;est mais je comprends pas <img src="http://forum.ubuntu-fr.org/img/smilies/smile.png" width="15" height="15" alt="smile" /> </p><p>par contre depuis je sais pas quand je voit ça dans mon bashrc c&#039;est quoi ? </p><br /><div class="codebox"><pre><code>[[ -f &quot;/home/n3o/.config/autopackage/paths-bash&quot; ]] &amp;&amp; . &quot;/home/n3o/.config/autopackage/paths-bash&quot;</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (n3o51)]]></author>
			<pubDate>Tue, 24 Nov 2009 22:09:51 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3093778#p3093778</guid>
		</item>
		<item>
			<title><![CDATA[[ALIAS]Probleme lors de creation d'alias cd]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3093654#p3093654</link>
			<description><![CDATA[<p>Bonsoir voila je viens de faire un alias :</p><p>cd : </p><div class="codebox"><pre><code>alias cd=&#039;cd &amp;&amp; echo \(wd now: $PWD&#039;</code></pre></div><p>Le probléme c&#039;est qui ne change pas de PWD </p><p>Pour exemple :</p><div class="codebox"><pre><code>┌─→(n3o@matrix 24/11/2009)--------------------------------------------------(~)
@
└─→(22:27)─&gt;cd Bureau/                                                (19 min)
(wd now: /home/n3o Bureau/
┌─→(n3o@matrix 24/11/2009)--------------------------------------------------(~)
@
└─→(22:27)─&gt;pwd                                                          (19 min)
/home/n3o</code></pre></div><p>Que faire ?</p><p>Merci par avance </p><br /><p>===========<br />Bonne soirée</p>]]></description>
			<author><![CDATA[dummy@example.com (n3o51)]]></author>
			<pubDate>Tue, 24 Nov 2009 21:31:29 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3093654#p3093654</guid>
		</item>
	</channel>
</rss>
