fc built in missing from dash ( i.e.,dash shell history doesn't work )?
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
4
down vote
favorite
In dash
manual, under Builtins
section there exists explanation on fc
built in which controls shell history and re-executes commands from it, FCEDIT
and HISTSIZE
also are mentioned there. Yet when I try to execute it dash
gives command not found error.
$ echo one
one
$ fc -l 1
dash: 2: fc: not found
$ fc
dash: 3: fc: not found
Question is, why ? Is it one of the standard and conscious choices that Ubuntu developers made or I may need to enable fc
somehow ?
I have found Debian bug report that mentions fc
, but the patch mentioned there is for i386 and last activity on the report has been in 2008, so nothing regarding Ubuntu so far. And historically, fc has had fixes and exists in versions for different BSD releases, so there's gotta be something Ubuntu-specific or Debian-specific here.
command-line dash-shell
add a comment |Â
up vote
4
down vote
favorite
In dash
manual, under Builtins
section there exists explanation on fc
built in which controls shell history and re-executes commands from it, FCEDIT
and HISTSIZE
also are mentioned there. Yet when I try to execute it dash
gives command not found error.
$ echo one
one
$ fc -l 1
dash: 2: fc: not found
$ fc
dash: 3: fc: not found
Question is, why ? Is it one of the standard and conscious choices that Ubuntu developers made or I may need to enable fc
somehow ?
I have found Debian bug report that mentions fc
, but the patch mentioned there is for i386 and last activity on the report has been in 2008, so nothing regarding Ubuntu so far. And historically, fc has had fixes and exists in versions for different BSD releases, so there's gotta be something Ubuntu-specific or Debian-specific here.
command-line dash-shell
add a comment |Â
up vote
4
down vote
favorite
up vote
4
down vote
favorite
In dash
manual, under Builtins
section there exists explanation on fc
built in which controls shell history and re-executes commands from it, FCEDIT
and HISTSIZE
also are mentioned there. Yet when I try to execute it dash
gives command not found error.
$ echo one
one
$ fc -l 1
dash: 2: fc: not found
$ fc
dash: 3: fc: not found
Question is, why ? Is it one of the standard and conscious choices that Ubuntu developers made or I may need to enable fc
somehow ?
I have found Debian bug report that mentions fc
, but the patch mentioned there is for i386 and last activity on the report has been in 2008, so nothing regarding Ubuntu so far. And historically, fc has had fixes and exists in versions for different BSD releases, so there's gotta be something Ubuntu-specific or Debian-specific here.
command-line dash-shell
In dash
manual, under Builtins
section there exists explanation on fc
built in which controls shell history and re-executes commands from it, FCEDIT
and HISTSIZE
also are mentioned there. Yet when I try to execute it dash
gives command not found error.
$ echo one
one
$ fc -l 1
dash: 2: fc: not found
$ fc
dash: 3: fc: not found
Question is, why ? Is it one of the standard and conscious choices that Ubuntu developers made or I may need to enable fc
somehow ?
I have found Debian bug report that mentions fc
, but the patch mentioned there is for i386 and last activity on the report has been in 2008, so nothing regarding Ubuntu so far. And historically, fc has had fixes and exists in versions for different BSD releases, so there's gotta be something Ubuntu-specific or Debian-specific here.
command-line dash-shell
edited Apr 21 at 18:36
asked Apr 21 at 18:15
![](https://i.stack.imgur.com/U1Jy6.jpg?s=32&g=1)
![](https://i.stack.imgur.com/U1Jy6.jpg?s=32&g=1)
Sergiy Kolodyazhnyy
64.9k9129282
64.9k9129282
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
3
down vote
accepted
Check line number 57-59 in src/builtins.def.in
of the dash source code:
#ifndef SMALL
histcmd -u fc
#endif
SMALL is defined if --with-libedit
is not set in configure, which is the case for our dash/sh. I guess it's about optimzing the memory footprint.
Also Changelog says:
2005-10-29 Herbert Xu <herbert@gondor.apana.org.au>
[...]
* Disable histcmd completely when SMALL is defined.
[...]
If not compiling with --with-libedit
was a deliberate choice or not is beyond my knowledge.
You're right. Apparently,--with-libedit
strips out whole lot of features that rely on it. It kinda goes back to my older question askubuntu.com/a/704719/295286 Kinda becomes predictable :)
â Sergiy Kolodyazhnyy
Apr 21 at 19:02
To put it differently: Poor ubuntu dash is crippled, bound to just serve as /bin/sh. I admit a package with a full version of dash would be nice to have in addition.
â Sebastian Stark
Apr 21 at 19:07
Yeah, agreed. And frankly, I think it's even more restricted than POSIX/bin/sh
. I can see advantage in speed for older hardware, but we're kinda in 2018 already, and keeping/bin/sh
doesn't provide that much speed up. Taking advantage of newer hardware with multicore processors seems to be better.
â Sergiy Kolodyazhnyy
Apr 21 at 19:11
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
Check line number 57-59 in src/builtins.def.in
of the dash source code:
#ifndef SMALL
histcmd -u fc
#endif
SMALL is defined if --with-libedit
is not set in configure, which is the case for our dash/sh. I guess it's about optimzing the memory footprint.
Also Changelog says:
2005-10-29 Herbert Xu <herbert@gondor.apana.org.au>
[...]
* Disable histcmd completely when SMALL is defined.
[...]
If not compiling with --with-libedit
was a deliberate choice or not is beyond my knowledge.
You're right. Apparently,--with-libedit
strips out whole lot of features that rely on it. It kinda goes back to my older question askubuntu.com/a/704719/295286 Kinda becomes predictable :)
â Sergiy Kolodyazhnyy
Apr 21 at 19:02
To put it differently: Poor ubuntu dash is crippled, bound to just serve as /bin/sh. I admit a package with a full version of dash would be nice to have in addition.
â Sebastian Stark
Apr 21 at 19:07
Yeah, agreed. And frankly, I think it's even more restricted than POSIX/bin/sh
. I can see advantage in speed for older hardware, but we're kinda in 2018 already, and keeping/bin/sh
doesn't provide that much speed up. Taking advantage of newer hardware with multicore processors seems to be better.
â Sergiy Kolodyazhnyy
Apr 21 at 19:11
add a comment |Â
up vote
3
down vote
accepted
Check line number 57-59 in src/builtins.def.in
of the dash source code:
#ifndef SMALL
histcmd -u fc
#endif
SMALL is defined if --with-libedit
is not set in configure, which is the case for our dash/sh. I guess it's about optimzing the memory footprint.
Also Changelog says:
2005-10-29 Herbert Xu <herbert@gondor.apana.org.au>
[...]
* Disable histcmd completely when SMALL is defined.
[...]
If not compiling with --with-libedit
was a deliberate choice or not is beyond my knowledge.
You're right. Apparently,--with-libedit
strips out whole lot of features that rely on it. It kinda goes back to my older question askubuntu.com/a/704719/295286 Kinda becomes predictable :)
â Sergiy Kolodyazhnyy
Apr 21 at 19:02
To put it differently: Poor ubuntu dash is crippled, bound to just serve as /bin/sh. I admit a package with a full version of dash would be nice to have in addition.
â Sebastian Stark
Apr 21 at 19:07
Yeah, agreed. And frankly, I think it's even more restricted than POSIX/bin/sh
. I can see advantage in speed for older hardware, but we're kinda in 2018 already, and keeping/bin/sh
doesn't provide that much speed up. Taking advantage of newer hardware with multicore processors seems to be better.
â Sergiy Kolodyazhnyy
Apr 21 at 19:11
add a comment |Â
up vote
3
down vote
accepted
up vote
3
down vote
accepted
Check line number 57-59 in src/builtins.def.in
of the dash source code:
#ifndef SMALL
histcmd -u fc
#endif
SMALL is defined if --with-libedit
is not set in configure, which is the case for our dash/sh. I guess it's about optimzing the memory footprint.
Also Changelog says:
2005-10-29 Herbert Xu <herbert@gondor.apana.org.au>
[...]
* Disable histcmd completely when SMALL is defined.
[...]
If not compiling with --with-libedit
was a deliberate choice or not is beyond my knowledge.
Check line number 57-59 in src/builtins.def.in
of the dash source code:
#ifndef SMALL
histcmd -u fc
#endif
SMALL is defined if --with-libedit
is not set in configure, which is the case for our dash/sh. I guess it's about optimzing the memory footprint.
Also Changelog says:
2005-10-29 Herbert Xu <herbert@gondor.apana.org.au>
[...]
* Disable histcmd completely when SMALL is defined.
[...]
If not compiling with --with-libedit
was a deliberate choice or not is beyond my knowledge.
edited Apr 21 at 18:55
answered Apr 21 at 18:48
![](https://i.stack.imgur.com/33gTl.jpg?s=32&g=1)
![](https://i.stack.imgur.com/33gTl.jpg?s=32&g=1)
Sebastian Stark
4,703938
4,703938
You're right. Apparently,--with-libedit
strips out whole lot of features that rely on it. It kinda goes back to my older question askubuntu.com/a/704719/295286 Kinda becomes predictable :)
â Sergiy Kolodyazhnyy
Apr 21 at 19:02
To put it differently: Poor ubuntu dash is crippled, bound to just serve as /bin/sh. I admit a package with a full version of dash would be nice to have in addition.
â Sebastian Stark
Apr 21 at 19:07
Yeah, agreed. And frankly, I think it's even more restricted than POSIX/bin/sh
. I can see advantage in speed for older hardware, but we're kinda in 2018 already, and keeping/bin/sh
doesn't provide that much speed up. Taking advantage of newer hardware with multicore processors seems to be better.
â Sergiy Kolodyazhnyy
Apr 21 at 19:11
add a comment |Â
You're right. Apparently,--with-libedit
strips out whole lot of features that rely on it. It kinda goes back to my older question askubuntu.com/a/704719/295286 Kinda becomes predictable :)
â Sergiy Kolodyazhnyy
Apr 21 at 19:02
To put it differently: Poor ubuntu dash is crippled, bound to just serve as /bin/sh. I admit a package with a full version of dash would be nice to have in addition.
â Sebastian Stark
Apr 21 at 19:07
Yeah, agreed. And frankly, I think it's even more restricted than POSIX/bin/sh
. I can see advantage in speed for older hardware, but we're kinda in 2018 already, and keeping/bin/sh
doesn't provide that much speed up. Taking advantage of newer hardware with multicore processors seems to be better.
â Sergiy Kolodyazhnyy
Apr 21 at 19:11
You're right. Apparently,
--with-libedit
strips out whole lot of features that rely on it. It kinda goes back to my older question askubuntu.com/a/704719/295286 Kinda becomes predictable :)â Sergiy Kolodyazhnyy
Apr 21 at 19:02
You're right. Apparently,
--with-libedit
strips out whole lot of features that rely on it. It kinda goes back to my older question askubuntu.com/a/704719/295286 Kinda becomes predictable :)â Sergiy Kolodyazhnyy
Apr 21 at 19:02
To put it differently: Poor ubuntu dash is crippled, bound to just serve as /bin/sh. I admit a package with a full version of dash would be nice to have in addition.
â Sebastian Stark
Apr 21 at 19:07
To put it differently: Poor ubuntu dash is crippled, bound to just serve as /bin/sh. I admit a package with a full version of dash would be nice to have in addition.
â Sebastian Stark
Apr 21 at 19:07
Yeah, agreed. And frankly, I think it's even more restricted than POSIX
/bin/sh
. I can see advantage in speed for older hardware, but we're kinda in 2018 already, and keeping /bin/sh
doesn't provide that much speed up. Taking advantage of newer hardware with multicore processors seems to be better.â Sergiy Kolodyazhnyy
Apr 21 at 19:11
Yeah, agreed. And frankly, I think it's even more restricted than POSIX
/bin/sh
. I can see advantage in speed for older hardware, but we're kinda in 2018 already, and keeping /bin/sh
doesn't provide that much speed up. Taking advantage of newer hardware with multicore processors seems to be better.â Sergiy Kolodyazhnyy
Apr 21 at 19:11
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1027012%2ffc-built-in-missing-from-dash-i-e-dash-shell-history-doesnt-work%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password